|
5 | 5 | The motivation for creating this utility was to provide a mechanism to organize elements,
|
6 | 6 | with the ability to specify multiple ordering criteria.
|
7 | 7 |
|
| 8 | +## Content |
| 9 | + |
| 10 | +1. [Getting started](#getting-started) |
| 11 | +1. [Including the library](#including-the-library) |
| 12 | +1. [Examples](#examples) |
| 13 | +1. [Shimming-polyfills](#shimming-polyfills) |
| 14 | +1. [Running the project](#running-the-project) |
| 15 | + |
8 | 16 | ## Getting started
|
9 | 17 |
|
10 | 18 | To include this library into your package manager with `npm` or `yarn`
|
@@ -203,6 +211,42 @@ sortBy(arr, (o) => [o.name.toUpperCase(), -o.age, o.a]);
|
203 | 211 | */
|
204 | 212 | ```
|
205 | 213 |
|
| 214 | +## Shimming-polyfills |
| 215 | + |
| 216 | +This library is written using some of the new ES5/ES6 features. If you have |
| 217 | +to support Non-standard-compliant browsers like Internet Explorer, you can |
| 218 | +polyfill some of the missing features with the following alternatives: |
| 219 | + |
| 220 | +**Using [es6-shim](https://github.com/paulmillr/es6-shim)** |
| 221 | + |
| 222 | +```html |
| 223 | +<!-- put this script FIRST, before all other scripts --> |
| 224 | +<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.35.3/es6-shim.min.js"></script> |
| 225 | +``` |
| 226 | + |
| 227 | +**Using [polyfill.io](https://polyfill.io/v2/docs/)** |
| 228 | + |
| 229 | +```html |
| 230 | +<!-- put this script FIRST, before all other scripts --> |
| 231 | +<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script> |
| 232 | +``` |
| 233 | + |
| 234 | +[Polyfill.io](https://polyfill.io/v2/docs/examples) reads the `User-Agent` |
| 235 | +header of each request and returns the polyfills that are suitable for the |
| 236 | +requesting browser. |
| 237 | + |
| 238 | +If you want to request specific polyfills, you can pass a query parameter |
| 239 | +to the url, for example: |
| 240 | + |
| 241 | +```html |
| 242 | +<!--[if IE]> |
| 243 | +<script src="https://polyfill.io/v2/polyfill.min.js?features=default-3.3&flags=always"></script> |
| 244 | +<![endif]--> |
| 245 | +``` |
| 246 | + |
| 247 | +Read the list of available features: |
| 248 | +[Features and Browsers Supported](https://polyfill.io/v2/docs/features/). |
| 249 | + |
206 | 250 | ## Running the project
|
207 | 251 |
|
208 | 252 | If you want to fork or build your own, you must run this project.
|
@@ -272,7 +316,7 @@ Given a version number MAJOR.MINOR.PATCH, increment the:
|
272 | 316 |
|
273 | 317 | To report an issue and keep traceability of bug-fixes, please report to:
|
274 | 318 |
|
275 |
| -* https://github.com/jherax/array-sort-by/issues |
| 319 | +- https://github.com/jherax/array-sort-by/issues |
276 | 320 |
|
277 | 321 | ## License
|
278 | 322 |
|
|
0 commit comments