|
1 |
| -# Toast UI CodeSnippet |
| 1 | +# TOAST UI CodeSnippet |
2 | 2 |
|
3 | 3 | `tui-code-snippet` is group of utility methods to make ease with developing javascript applications.
|
4 | 4 |
|
5 |
| -It includes several features like `class simulation`, `browser detecting`, `type checking` and +30 more. |
| 5 | +It includes several features like `class simulation`, `browser detecting`, `type checking` and more. |
6 | 6 |
|
7 | 7 | `tui-code-snippet` supports IE8+ and modern browsers and already has been used for [open source javascript components](https://github.com/nhn/) and many commercial projects in [NHN](http://www.nhn.com) corporation.
|
8 | 8 |
|
9 |
| -## Feature |
10 |
| -* browser.js |
11 |
| - * Browser detecting modules |
12 |
| -* collection.js |
13 |
| - * Modules to Process collecitons |
14 |
| - * Support util methods for collecitons |
15 |
| -* customEvent.js |
16 |
| - * Custom event modules |
17 |
| - * Add/Remove/fire custom events |
18 |
| -* defineClass.js |
19 |
| - * Defined classes module |
20 |
| -* enum.js |
21 |
| - * Const value modules |
22 |
| - * Making immutability values but IE8 low |
23 |
| -* func.js |
24 |
| - * Function modules |
25 |
| -* hashMap.js |
26 |
| - * Hash map modules |
27 |
| - * Managing data by key/value |
28 |
| -* inheritance.js |
29 |
| - * Simple inheritance modules (Nicholas C. Zakas, YUI Library) |
| 9 | +## Documents |
| 10 | + |
| 11 | +* [Getting Started](https://github.com/nhn/tui.code-snippet/blob/master/docs/getting-started.md) |
| 12 | +* [APIs](https://nhn.github.io/tui.code-snippet/latest/) |
| 13 | +* [v2.0 Migration Guide](https://github.com/nhn/tui.code-snippet/blob/master/docs/v2.0-migration-guide.md) |
| 14 | + |
| 15 | +## Features |
| 16 | + |
| 17 | +* array |
| 18 | + * Handle arrays |
| 19 | +* browser |
| 20 | + * Detect browser |
| 21 | +* collection |
| 22 | + * Process collections |
| 23 | + * Support util methods for collections |
| 24 | +* customEvents |
| 25 | + * Add/Remove/fire custom events |
| 26 | +* defineClass |
| 27 | + * Define classes |
| 28 | +* domEvent |
| 29 | + * Add, remove, fire DOM events |
| 30 | + * Control mouse events |
| 31 | +* domUtil |
| 32 | + * Control the information of DOM |
| 33 | + * Add, remove, find DOM class name |
| 34 | +* enum |
| 35 | + * Manage constant value |
| 36 | + * Make immutability values but IE8 low |
| 37 | +* formatDate |
| 38 | + * Format date strings |
| 39 | +* inheritance |
| 40 | + * Simple inheritance (Nicholas C. Zakas, YUI Library) |
30 | 41 | * Call supur constructor of superclass
|
31 | 42 | * Have to get inheritance before define child
|
32 |
| - * Using mixin and inner object |
33 |
| -* object.js |
34 |
| - * Object modules |
35 |
| - * Support utils to control object |
36 |
| -* string.js |
37 |
| - * String processing modules |
38 |
| - * Support utils such as decodeHTMLEntity, encodeHTMLEntity |
39 |
| -* type.js |
40 |
| - * Check data type |
41 |
| -* window.js |
42 |
| - * Window object modules |
43 |
| - * You need 'postDataBridgeUrl' options to avoid IE11 popup form submit bug. |
44 |
| - * Different domain have x-domain issue. |
45 |
| -* defineNamespace.js |
46 |
| - * Support utils to define namespace |
47 |
| -* formatDate.js |
48 |
| - * Formating date strings modules |
49 |
| -* defineModule.js |
50 |
| - * Support utils to define modules |
51 |
| - |
52 |
| -## Documentation |
53 |
| -* API: [https://nhn.github.io/tui.code-snippet/latest/](https://nhn.github.io/tui.code-snippet/latest/) |
54 |
| -* Tutorial: [https://github.com/nhn/fe.javascript/wiki/Toast-UI-CodeSnippet](https://github.com/nhn/fe.javascript/wiki/Toast-UI-CodeSnippet) |
55 |
| - |
56 |
| -## Tested Browsers |
57 |
| -* browser: |
58 |
| - * IE8 ~ IE11 |
59 |
| - * Edge |
60 |
| - * Chrome |
61 |
| - * Firefox |
62 |
| - * Safari |
63 |
| - |
64 |
| -## Usage |
65 |
| -### Use `npm` |
| 43 | + * Use mixin and inner object |
| 44 | +* object |
| 45 | + * Support utils to control object |
| 46 | +* request |
| 47 | + * Request image ping |
| 48 | +* string |
| 49 | + * Support utils such as decodeHTMLEntity, encodeHTMLEntity |
| 50 | +* tricks |
| 51 | + * Creates a debounced function and a throttled function |
| 52 | +* type |
| 53 | + * Check data type |
| 54 | + |
| 55 | +## Installation |
66 | 56 |
|
67 | 57 | Install the latest version using `npm` command:
|
68 | 58 |
|
69 |
| -``` |
70 |
| -$ npm install tui-code-snippet --save |
| 59 | +``` sh |
| 60 | +$ npm install --save tui-code-snippet |
71 | 61 | ```
|
72 | 62 |
|
73 |
| -or want to install the each version: |
| 63 | +or install the each version: |
74 | 64 |
|
75 | 65 | ```
|
76 |
| -$ npm install tui-code-snippet@<version> --save |
| 66 | +$ npm install --save tui-code-snippet@<version> |
77 | 67 | ```
|
78 | 68 |
|
79 |
| -To access as module format in your code: |
80 |
| - |
81 |
| -```javascript |
82 |
| -var util = require('tui-code-snippet'); |
83 |
| -``` |
| 69 | +## Usage |
84 | 70 |
|
85 |
| -### Use `bower` |
86 |
| -Install the latest version using `bower` command: |
| 71 | +Import only functions that you need in your code: |
87 | 72 |
|
88 |
| -``` |
89 |
| -$ bower install tui-code-snippet |
90 |
| -``` |
91 |
| - |
92 |
| -or want to install the each version: |
| 73 | +```javascript |
| 74 | +var func = require('tui-code-snippet/<folder>/<function>'); |
93 | 75 |
|
94 |
| -``` |
95 |
| -$ bower install tui-code-snippet#<tag> |
| 76 | +// for example, |
| 77 | +var inArray = require('tui-code-snippet/array/inArray'); |
| 78 | +var customEvents = require('tui-code-snippet/customEvents/customEvents'); |
96 | 79 | ```
|
97 | 80 |
|
98 |
| -To access as namespace format in your code: |
| 81 | +The folder structure can be found [here](https://github.com/nhn/tui.code-snippet/tree/production). |
99 | 82 |
|
100 |
| -```javascript |
101 |
| -var util = tui.util; |
102 |
| -``` |
| 83 | +## Browser Support |
103 | 84 |
|
104 |
| -### Download |
105 |
| -* [Download bundle files from `dist` folder](https://github.com/nhn/tui.code-snippet/tree/production/dist) |
106 |
| -* [Download all sources for each version](https://github.com/nhn/tui.code-snippet/releases) |
| 85 | +| <img src="https://user-images.githubusercontent.com/1215767/34348387-a2e64588-ea4d-11e7-8267-a43365103afe.png" alt="Chrome" width="16px" height="16px" /> Chrome | <img src="https://user-images.githubusercontent.com/1215767/34348590-250b3ca2-ea4f-11e7-9efb-da953359321f.png" alt="IE" width="16px" height="16px" /> Internet Explorer | <img src="https://user-images.githubusercontent.com/1215767/34348380-93e77ae8-ea4d-11e7-8696-9a989ddbbbf5.png" alt="Edge" width="16px" height="16px" /> Edge | <img src="https://user-images.githubusercontent.com/1215767/34348394-a981f892-ea4d-11e7-9156-d128d58386b9.png" alt="Safari" width="16px" height="16px" /> Safari | <img src="https://user-images.githubusercontent.com/1215767/34348383-9e7ed492-ea4d-11e7-910c-03b39d52f496.png" alt="Firefox" width="16px" height="16px" /> Firefox | |
| 86 | +| :---------: | :---------: | :---------: | :---------: | :---------: | |
| 87 | +| Yes | 8+ | Yes | Yes | Yes | |
107 | 88 |
|
108 | 89 | ## License
|
109 |
| -[MIT LICENSE](https://github.com/nhn/tui.code-snippet/blob/master/LICENSE) |
| 90 | + |
| 91 | +This software is licensed under the [MIT](https://github.com/nhn/tui.code-snippet/blob/master/LICENSE) © [NHN](https://github.com/nhn). |
0 commit comments