angular-slickgrid 4.2.7 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +181 -181
  3. package/docs/assets/lib/multiple-select/README.md +17 -17
  4. package/esm2020/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +5 -6
  5. package/esm2020/app/modules/angular-slickgrid/constants.mjs +1 -1
  6. package/esm2020/app/modules/angular-slickgrid/extensions/index.mjs +1 -1
  7. package/esm2020/app/modules/angular-slickgrid/extensions/slickRowDetailView.mjs +2 -2
  8. package/esm2020/app/modules/angular-slickgrid/global-grid-options.mjs +1 -1
  9. package/esm2020/app/modules/angular-slickgrid/index.mjs +1 -1
  10. package/esm2020/app/modules/angular-slickgrid/models/angularComponentOutput.interface.mjs +1 -1
  11. package/esm2020/app/modules/angular-slickgrid/models/angularGridInstance.interface.mjs +1 -1
  12. package/esm2020/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.mjs +1 -1
  13. package/esm2020/app/modules/angular-slickgrid/models/gridOption.interface.mjs +1 -1
  14. package/esm2020/app/modules/angular-slickgrid/models/index.mjs +1 -1
  15. package/esm2020/app/modules/angular-slickgrid/models/rowDetailView.interface.mjs +1 -1
  16. package/esm2020/app/modules/angular-slickgrid/models/slickGrid.interface.mjs +1 -1
  17. package/esm2020/app/modules/angular-slickgrid/modules/angular-slickgrid.module.mjs +1 -1
  18. package/esm2020/app/modules/angular-slickgrid/services/angularUtil.service.mjs +1 -1
  19. package/esm2020/app/modules/angular-slickgrid/services/bsDropdown.service.mjs +1 -1
  20. package/esm2020/app/modules/angular-slickgrid/services/container.service.mjs +1 -1
  21. package/esm2020/app/modules/angular-slickgrid/services/index.mjs +1 -1
  22. package/esm2020/app/modules/angular-slickgrid/services/translater.service.mjs +1 -1
  23. package/esm2020/app/modules/angular-slickgrid/services/utilities.mjs +1 -1
  24. package/esm2020/app/modules/angular-slickgrid/slickgrid-config.mjs +1 -1
  25. package/esm2020/public_api.mjs +1 -1
  26. package/fesm2015/angular-slickgrid.mjs +5 -6
  27. package/fesm2015/angular-slickgrid.mjs.map +1 -1
  28. package/fesm2020/angular-slickgrid.mjs +5 -6
  29. package/fesm2020/angular-slickgrid.mjs.map +1 -1
  30. package/i18n/en.json +89 -89
  31. package/i18n/fr.json +90 -90
  32. package/package.json +12 -12
  33. package/test/cypress/node_modules/@cypress/request/README.md +0 -1038
  34. package/test/cypress/node_modules/@cypress/xvfb/README.md +0 -48
  35. package/test/cypress/node_modules/@cypress/xvfb/node_modules/debug/README.md +0 -437
  36. package/test/cypress/node_modules/@types/node/README.md +0 -16
  37. package/test/cypress/node_modules/@types/sinonjs__fake-timers/README.md +0 -16
  38. package/test/cypress/node_modules/@types/sizzle/README.md +0 -16
  39. package/test/cypress/node_modules/@types/yauzl/README.md +0 -16
  40. package/test/cypress/node_modules/@types/yauzl/node_modules/@types/node/README.md +0 -16
  41. package/test/cypress/node_modules/aggregate-error/README.md +0 -61
  42. package/test/cypress/node_modules/ansi-colors/README.md +0 -315
  43. package/test/cypress/node_modules/ansi-escapes/README.md +0 -245
  44. package/test/cypress/node_modules/ansi-regex/README.md +0 -78
  45. package/test/cypress/node_modules/ansi-styles/README.md +0 -152
  46. package/test/cypress/node_modules/arch/README.md +0 -71
  47. package/test/cypress/node_modules/asn1/README.md +0 -50
  48. package/test/cypress/node_modules/assert-plus/README.md +0 -162
  49. package/test/cypress/node_modules/astral-regex/README.md +0 -46
  50. package/test/cypress/node_modules/async/README.md +0 -60
  51. package/test/cypress/node_modules/asynckit/README.md +0 -233
  52. package/test/cypress/node_modules/at-least-node/README.md +0 -25
  53. package/test/cypress/node_modules/aws-sign2/README.md +0 -4
  54. package/test/cypress/node_modules/aws4/README.md +0 -183
  55. package/test/cypress/node_modules/balanced-match/README.md +0 -91
  56. package/test/cypress/node_modules/base64-js/README.md +0 -34
  57. package/test/cypress/node_modules/bcrypt-pbkdf/README.md +0 -45
  58. package/test/cypress/node_modules/blob-util/README.md +0 -623
  59. package/test/cypress/node_modules/bluebird/README.md +0 -57
  60. package/test/cypress/node_modules/brace-expansion/README.md +0 -129
  61. package/test/cypress/node_modules/buffer/README.md +0 -410
  62. package/test/cypress/node_modules/buffer-crc32/README.md +0 -47
  63. package/test/cypress/node_modules/cachedir/README.md +0 -27
  64. package/test/cypress/node_modules/caseless/README.md +0 -45
  65. package/test/cypress/node_modules/chalk/README.md +0 -293
  66. package/test/cypress/node_modules/chalk/node_modules/supports-color/README.md +0 -76
  67. package/test/cypress/node_modules/check-more-types/README.md +0 -952
  68. package/test/cypress/node_modules/ci-info/README.md +0 -114
  69. package/test/cypress/node_modules/clean-stack/README.md +0 -76
  70. package/test/cypress/node_modules/cli-cursor/README.md +0 -55
  71. package/test/cypress/node_modules/cli-table3/README.md +0 -218
  72. package/test/cypress/node_modules/cli-truncate/README.md +0 -139
  73. package/test/cypress/node_modules/color-convert/README.md +0 -68
  74. package/test/cypress/node_modules/color-name/README.md +0 -11
  75. package/test/cypress/node_modules/colorette/README.md +0 -102
  76. package/test/cypress/node_modules/colors/README.md +0 -221
  77. package/test/cypress/node_modules/combined-stream/README.md +0 -138
  78. package/test/cypress/node_modules/commander/README.md +0 -737
  79. package/test/cypress/node_modules/common-tags/README.md +0 -687
  80. package/test/cypress/node_modules/core-util-is/README.md +0 -3
  81. package/test/cypress/node_modules/cross-spawn/README.md +0 -96
  82. package/test/cypress/node_modules/cypress/README.md +0 -25
  83. package/test/cypress/node_modules/cypress/mount-utils/README.md +0 -14
  84. package/test/cypress/node_modules/cypress/react/README.md +0 -414
  85. package/test/cypress/node_modules/cypress/vue/README.md +0 -678
  86. package/test/cypress/node_modules/cypress/vue2/README.md +0 -693
  87. package/test/cypress/node_modules/dashdash/README.md +0 -574
  88. package/test/cypress/node_modules/dayjs/README.md +0 -128
  89. package/test/cypress/node_modules/debug/README.md +0 -455
  90. package/test/cypress/node_modules/delayed-stream/README.md +0 -141
  91. package/test/cypress/node_modules/ecc-jsbn/README.md +0 -8
  92. package/test/cypress/node_modules/emoji-regex/README.md +0 -73
  93. package/test/cypress/node_modules/end-of-stream/README.md +0 -54
  94. package/test/cypress/node_modules/enquirer/README.md +0 -1752
  95. package/test/cypress/node_modules/escape-string-regexp/README.md +0 -27
  96. package/test/cypress/node_modules/eventemitter2/README.md +0 -809
  97. package/test/cypress/node_modules/execa/README.md +0 -656
  98. package/test/cypress/node_modules/executable/README.md +0 -64
  99. package/test/cypress/node_modules/extend/README.md +0 -81
  100. package/test/cypress/node_modules/extract-zip/README.md +0 -57
  101. package/test/cypress/node_modules/extract-zip/node_modules/debug/README.md +0 -455
  102. package/test/cypress/node_modules/extsprintf/README.md +0 -46
  103. package/test/cypress/node_modules/fd-slicer/README.md +0 -199
  104. package/test/cypress/node_modules/figures/README.md +0 -139
  105. package/test/cypress/node_modules/forever-agent/README.md +0 -4
  106. package/test/cypress/node_modules/form-data/README.md +0 -234
  107. package/test/cypress/node_modules/fs-extra/README.md +0 -264
  108. package/test/cypress/node_modules/fs.realpath/README.md +0 -33
  109. package/test/cypress/node_modules/get-stream/README.md +0 -124
  110. package/test/cypress/node_modules/getos/README.md +0 -79
  111. package/test/cypress/node_modules/getpass/README.md +0 -32
  112. package/test/cypress/node_modules/glob/README.md +0 -375
  113. package/test/cypress/node_modules/global-dirs/README.md +0 -72
  114. package/test/cypress/node_modules/graceful-fs/README.md +0 -133
  115. package/test/cypress/node_modules/has-flag/README.md +0 -89
  116. package/test/cypress/node_modules/http-signature/README.md +0 -80
  117. package/test/cypress/node_modules/human-signals/README.md +0 -155
  118. package/test/cypress/node_modules/ieee754/README.md +0 -51
  119. package/test/cypress/node_modules/indent-string/README.md +0 -70
  120. package/test/cypress/node_modules/inflight/README.md +0 -37
  121. package/test/cypress/node_modules/inherits/README.md +0 -42
  122. package/test/cypress/node_modules/ini/README.md +0 -102
  123. package/test/cypress/node_modules/is-ci/README.md +0 -50
  124. package/test/cypress/node_modules/is-fullwidth-code-point/README.md +0 -39
  125. package/test/cypress/node_modules/is-installed-globally/README.md +0 -31
  126. package/test/cypress/node_modules/is-path-inside/README.md +0 -63
  127. package/test/cypress/node_modules/is-stream/README.md +0 -57
  128. package/test/cypress/node_modules/is-typedarray/README.md +0 -16
  129. package/test/cypress/node_modules/isexe/README.md +0 -51
  130. package/test/cypress/node_modules/isstream/README.md +0 -66
  131. package/test/cypress/node_modules/jsbn/README.md +0 -175
  132. package/test/cypress/node_modules/json-schema/README.md +0 -3
  133. package/test/cypress/node_modules/json-stringify-safe/README.md +0 -52
  134. package/test/cypress/node_modules/jsonfile/README.md +0 -205
  135. package/test/cypress/node_modules/jsonfile/node_modules/universalify/README.md +0 -76
  136. package/test/cypress/node_modules/jsprim/README.md +0 -287
  137. package/test/cypress/node_modules/lazy-ass/README.md +0 -269
  138. package/test/cypress/node_modules/listr2/README.md +0 -17
  139. package/test/cypress/node_modules/lodash/README.md +0 -39
  140. package/test/cypress/node_modules/lodash.once/README.md +0 -18
  141. package/test/cypress/node_modules/log-symbols/README.md +0 -51
  142. package/test/cypress/node_modules/log-update/README.md +0 -97
  143. package/test/cypress/node_modules/log-update/node_modules/slice-ansi/README.md +0 -66
  144. package/test/cypress/node_modules/log-update/node_modules/wrap-ansi/README.md +0 -97
  145. package/test/cypress/node_modules/lru-cache/README.md +0 -166
  146. package/test/cypress/node_modules/merge-stream/README.md +0 -78
  147. package/test/cypress/node_modules/mime-db/README.md +0 -102
  148. package/test/cypress/node_modules/mime-types/README.md +0 -123
  149. package/test/cypress/node_modules/mimic-fn/README.md +0 -69
  150. package/test/cypress/node_modules/minimatch/README.md +0 -209
  151. package/test/cypress/node_modules/ms/README.md +0 -60
  152. package/test/cypress/node_modules/npm-run-path/README.md +0 -115
  153. package/test/cypress/node_modules/once/README.md +0 -79
  154. package/test/cypress/node_modules/onetime/README.md +0 -94
  155. package/test/cypress/node_modules/ospath/README.md +0 -53
  156. package/test/cypress/node_modules/p-map/README.md +0 -89
  157. package/test/cypress/node_modules/path-is-absolute/README.md +0 -59
  158. package/test/cypress/node_modules/path-key/README.md +0 -61
  159. package/test/cypress/node_modules/pend/README.md +0 -41
  160. package/test/cypress/node_modules/performance-now/README.md +0 -30
  161. package/test/cypress/node_modules/pify/README.md +0 -119
  162. package/test/cypress/node_modules/pretty-bytes/README.md +0 -131
  163. package/test/cypress/node_modules/proxy-from-env/README.md +0 -131
  164. package/test/cypress/node_modules/psl/README.md +0 -215
  165. package/test/cypress/node_modules/pump/README.md +0 -65
  166. package/test/cypress/node_modules/punycode/README.md +0 -122
  167. package/test/cypress/node_modules/qs/README.md +0 -475
  168. package/test/cypress/node_modules/request-progress/README.md +0 -78
  169. package/test/cypress/node_modules/restore-cursor/README.md +0 -26
  170. package/test/cypress/node_modules/rimraf/README.md +0 -101
  171. package/test/cypress/node_modules/rxjs/README.md +0 -147
  172. package/test/cypress/node_modules/rxjs/_esm2015/README.md +0 -147
  173. package/test/cypress/node_modules/rxjs/_esm5/README.md +0 -147
  174. package/test/cypress/node_modules/rxjs/src/README.md +0 -147
  175. package/test/cypress/node_modules/safe-buffer/README.md +0 -584
  176. package/test/cypress/node_modules/safer-buffer/README.md +0 -156
  177. package/test/cypress/node_modules/semver/README.md +0 -566
  178. package/test/cypress/node_modules/shebang-command/README.md +0 -34
  179. package/test/cypress/node_modules/shebang-regex/README.md +0 -33
  180. package/test/cypress/node_modules/signal-exit/README.md +0 -39
  181. package/test/cypress/node_modules/slice-ansi/README.md +0 -72
  182. package/test/cypress/node_modules/sshpk/README.md +0 -804
  183. package/test/cypress/node_modules/string-width/README.md +0 -50
  184. package/test/cypress/node_modules/strip-ansi/README.md +0 -46
  185. package/test/cypress/node_modules/strip-final-newline/README.md +0 -30
  186. package/test/cypress/node_modules/supports-color/README.md +0 -77
  187. package/test/cypress/node_modules/throttleit/README.md +0 -32
  188. package/test/cypress/node_modules/tmp/README.md +0 -365
  189. package/test/cypress/node_modules/tough-cookie/README.md +0 -527
  190. package/test/cypress/node_modules/tslib/README.md +0 -142
  191. package/test/cypress/node_modules/tunnel-agent/README.md +0 -4
  192. package/test/cypress/node_modules/tweetnacl/README.md +0 -459
  193. package/test/cypress/node_modules/type-fest/README.md +0 -760
  194. package/test/cypress/node_modules/universalify/README.md +0 -76
  195. package/test/cypress/node_modules/untildify/README.md +0 -30
  196. package/test/cypress/node_modules/uuid/README.md +0 -505
  197. package/test/cypress/node_modules/verror/README.md +0 -528
  198. package/test/cypress/node_modules/verror/node_modules/extsprintf/README.md +0 -46
  199. package/test/cypress/node_modules/which/README.md +0 -54
  200. package/test/cypress/node_modules/wrap-ansi/README.md +0 -91
  201. package/test/cypress/node_modules/wrappy/README.md +0 -36
  202. package/test/cypress/node_modules/yallist/README.md +0 -204
  203. package/test/cypress/node_modules/yauzl/README.md +0 -658
@@ -1,129 +0,0 @@
1
- # brace-expansion
2
-
3
- [Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
4
- as known from sh/bash, in JavaScript.
5
-
6
- [![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)
7
- [![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion)
8
- [![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/)
9
-
10
- [![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion)
11
-
12
- ## Example
13
-
14
- ```js
15
- var expand = require('brace-expansion');
16
-
17
- expand('file-{a,b,c}.jpg')
18
- // => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
19
-
20
- expand('-v{,,}')
21
- // => ['-v', '-v', '-v']
22
-
23
- expand('file{0..2}.jpg')
24
- // => ['file0.jpg', 'file1.jpg', 'file2.jpg']
25
-
26
- expand('file-{a..c}.jpg')
27
- // => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
28
-
29
- expand('file{2..0}.jpg')
30
- // => ['file2.jpg', 'file1.jpg', 'file0.jpg']
31
-
32
- expand('file{0..4..2}.jpg')
33
- // => ['file0.jpg', 'file2.jpg', 'file4.jpg']
34
-
35
- expand('file-{a..e..2}.jpg')
36
- // => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
37
-
38
- expand('file{00..10..5}.jpg')
39
- // => ['file00.jpg', 'file05.jpg', 'file10.jpg']
40
-
41
- expand('{{A..C},{a..c}}')
42
- // => ['A', 'B', 'C', 'a', 'b', 'c']
43
-
44
- expand('ppp{,config,oe{,conf}}')
45
- // => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
46
- ```
47
-
48
- ## API
49
-
50
- ```js
51
- var expand = require('brace-expansion');
52
- ```
53
-
54
- ### var expanded = expand(str)
55
-
56
- Return an array of all possible and valid expansions of `str`. If none are
57
- found, `[str]` is returned.
58
-
59
- Valid expansions are:
60
-
61
- ```js
62
- /^(.*,)+(.+)?$/
63
- // {a,b,...}
64
- ```
65
-
66
- A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
67
-
68
- ```js
69
- /^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
70
- // {x..y[..incr]}
71
- ```
72
-
73
- A numeric sequence from `x` to `y` inclusive, with optional increment.
74
- If `x` or `y` start with a leading `0`, all the numbers will be padded
75
- to have equal length. Negative numbers and backwards iteration work too.
76
-
77
- ```js
78
- /^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
79
- // {x..y[..incr]}
80
- ```
81
-
82
- An alphabetic sequence from `x` to `y` inclusive, with optional increment.
83
- `x` and `y` must be exactly one character, and if given, `incr` must be a
84
- number.
85
-
86
- For compatibility reasons, the string `${` is not eligible for brace expansion.
87
-
88
- ## Installation
89
-
90
- With [npm](https://npmjs.org) do:
91
-
92
- ```bash
93
- npm install brace-expansion
94
- ```
95
-
96
- ## Contributors
97
-
98
- - [Julian Gruber](https://github.com/juliangruber)
99
- - [Isaac Z. Schlueter](https://github.com/isaacs)
100
-
101
- ## Sponsors
102
-
103
- This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
104
-
105
- Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
106
-
107
- ## License
108
-
109
- (MIT)
110
-
111
- Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
112
-
113
- Permission is hereby granted, free of charge, to any person obtaining a copy of
114
- this software and associated documentation files (the "Software"), to deal in
115
- the Software without restriction, including without limitation the rights to
116
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
117
- of the Software, and to permit persons to whom the Software is furnished to do
118
- so, subject to the following conditions:
119
-
120
- The above copyright notice and this permission notice shall be included in all
121
- copies or substantial portions of the Software.
122
-
123
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
124
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
125
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
126
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
127
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
128
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
129
- SOFTWARE.
@@ -1,410 +0,0 @@
1
- # buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
2
-
3
- [travis-image]: https://img.shields.io/travis/feross/buffer/master.svg
4
- [travis-url]: https://travis-ci.org/feross/buffer
5
- [npm-image]: https://img.shields.io/npm/v/buffer.svg
6
- [npm-url]: https://npmjs.org/package/buffer
7
- [downloads-image]: https://img.shields.io/npm/dm/buffer.svg
8
- [downloads-url]: https://npmjs.org/package/buffer
9
- [standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
10
- [standard-url]: https://standardjs.com
11
-
12
- #### The buffer module from [node.js](https://nodejs.org/), for the browser.
13
-
14
- [![saucelabs][saucelabs-image]][saucelabs-url]
15
-
16
- [saucelabs-image]: https://saucelabs.com/browser-matrix/buffer.svg
17
- [saucelabs-url]: https://saucelabs.com/u/buffer
18
-
19
- With [browserify](http://browserify.org), simply `require('buffer')` or use the `Buffer` global and you will get this module.
20
-
21
- The goal is to provide an API that is 100% identical to
22
- [node's Buffer API](https://nodejs.org/api/buffer.html). Read the
23
- [official docs](https://nodejs.org/api/buffer.html) for the full list of properties,
24
- instance methods, and class methods that are supported.
25
-
26
- ## features
27
-
28
- - Manipulate binary data like a boss, in all browsers!
29
- - Super fast. Backed by Typed Arrays (`Uint8Array`/`ArrayBuffer`, not `Object`)
30
- - Extremely small bundle size (**6.75KB minified + gzipped**, 51.9KB with comments)
31
- - Excellent browser support (Chrome, Firefox, Edge, Safari 9+, IE 11, iOS 9+, Android, etc.)
32
- - Preserves Node API exactly, with one minor difference (see below)
33
- - Square-bracket `buf[4]` notation works!
34
- - Does not modify any browser prototypes or put anything on `window`
35
- - Comprehensive test suite (including all buffer tests from node.js core)
36
-
37
- ## install
38
-
39
- To use this module directly (without browserify), install it:
40
-
41
- ```bash
42
- npm install buffer
43
- ```
44
-
45
- This module was previously called **native-buffer-browserify**, but please use **buffer**
46
- from now on.
47
-
48
- If you do not use a bundler, you can use the [standalone script](https://bundle.run/buffer).
49
-
50
- ## usage
51
-
52
- The module's API is identical to node's `Buffer` API. Read the
53
- [official docs](https://nodejs.org/api/buffer.html) for the full list of properties,
54
- instance methods, and class methods that are supported.
55
-
56
- As mentioned above, `require('buffer')` or use the `Buffer` global with
57
- [browserify](http://browserify.org) and this module will automatically be included
58
- in your bundle. Almost any npm module will work in the browser, even if it assumes that
59
- the node `Buffer` API will be available.
60
-
61
- To depend on this module explicitly (without browserify), require it like this:
62
-
63
- ```js
64
- var Buffer = require('buffer/').Buffer // note: the trailing slash is important!
65
- ```
66
-
67
- To require this module explicitly, use `require('buffer/')` which tells the node.js module
68
- lookup algorithm (also used by browserify) to use the **npm module** named `buffer`
69
- instead of the **node.js core** module named `buffer`!
70
-
71
-
72
- ## how does it work?
73
-
74
- The Buffer constructor returns instances of `Uint8Array` that have their prototype
75
- changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of `Uint8Array`,
76
- so the returned instances will have all the node `Buffer` methods and the
77
- `Uint8Array` methods. Square bracket notation works as expected -- it returns a
78
- single octet.
79
-
80
- The `Uint8Array` prototype remains unmodified.
81
-
82
-
83
- ## tracking the latest node api
84
-
85
- This module tracks the Buffer API in the latest (unstable) version of node.js. The Buffer
86
- API is considered **stable** in the
87
- [node stability index](https://nodejs.org/docs/latest/api/documentation.html#documentation_stability_index),
88
- so it is unlikely that there will ever be breaking changes.
89
- Nonetheless, when/if the Buffer API changes in node, this module's API will change
90
- accordingly.
91
-
92
- ## related packages
93
-
94
- - [`buffer-reverse`](https://www.npmjs.com/package/buffer-reverse) - Reverse a buffer
95
- - [`buffer-xor`](https://www.npmjs.com/package/buffer-xor) - Bitwise xor a buffer
96
- - [`is-buffer`](https://www.npmjs.com/package/is-buffer) - Determine if an object is a Buffer without including the whole `Buffer` package
97
-
98
- ## conversion packages
99
-
100
- ### convert typed array to buffer
101
-
102
- Use [`typedarray-to-buffer`](https://www.npmjs.com/package/typedarray-to-buffer) to convert any kind of typed array to a `Buffer`. Does not perform a copy, so it's super fast.
103
-
104
- ### convert buffer to typed array
105
-
106
- `Buffer` is a subclass of `Uint8Array` (which is a typed array). So there is no need to explicitly convert to typed array. Just use the buffer as a `Uint8Array`.
107
-
108
- ### convert blob to buffer
109
-
110
- Use [`blob-to-buffer`](https://www.npmjs.com/package/blob-to-buffer) to convert a `Blob` to a `Buffer`.
111
-
112
- ### convert buffer to blob
113
-
114
- To convert a `Buffer` to a `Blob`, use the `Blob` constructor:
115
-
116
- ```js
117
- var blob = new Blob([ buffer ])
118
- ```
119
-
120
- Optionally, specify a mimetype:
121
-
122
- ```js
123
- var blob = new Blob([ buffer ], { type: 'text/html' })
124
- ```
125
-
126
- ### convert arraybuffer to buffer
127
-
128
- To convert an `ArrayBuffer` to a `Buffer`, use the `Buffer.from` function. Does not perform a copy, so it's super fast.
129
-
130
- ```js
131
- var buffer = Buffer.from(arrayBuffer)
132
- ```
133
-
134
- ### convert buffer to arraybuffer
135
-
136
- To convert a `Buffer` to an `ArrayBuffer`, use the `.buffer` property (which is present on all `Uint8Array` objects):
137
-
138
- ```js
139
- var arrayBuffer = buffer.buffer.slice(
140
- buffer.byteOffset, buffer.byteOffset + buffer.byteLength
141
- )
142
- ```
143
-
144
- Alternatively, use the [`to-arraybuffer`](https://www.npmjs.com/package/to-arraybuffer) module.
145
-
146
- ## performance
147
-
148
- See perf tests in `/perf`.
149
-
150
- `BrowserBuffer` is the browser `buffer` module (this repo). `Uint8Array` is included as a
151
- sanity check (since `BrowserBuffer` uses `Uint8Array` under the hood, `Uint8Array` will
152
- always be at least a bit faster). Finally, `NodeBuffer` is the node.js buffer module,
153
- which is included to compare against.
154
-
155
- NOTE: Performance has improved since these benchmarks were taken. PR welcome to update the README.
156
-
157
- ### Chrome 38
158
-
159
- | Method | Operations | Accuracy | Sampled | Fastest |
160
- |:-------|:-----------|:---------|:--------|:-------:|
161
- | BrowserBuffer#bracket-notation | 11,457,464 ops/sec | ±0.86% | 66 | ✓ |
162
- | Uint8Array#bracket-notation | 10,824,332 ops/sec | ±0.74% | 65 | |
163
- | | | | |
164
- | BrowserBuffer#concat | 450,532 ops/sec | ±0.76% | 68 | |
165
- | Uint8Array#concat | 1,368,911 ops/sec | ±1.50% | 62 | ✓ |
166
- | | | | |
167
- | BrowserBuffer#copy(16000) | 903,001 ops/sec | ±0.96% | 67 | |
168
- | Uint8Array#copy(16000) | 1,422,441 ops/sec | ±1.04% | 66 | ✓ |
169
- | | | | |
170
- | BrowserBuffer#copy(16) | 11,431,358 ops/sec | ±0.46% | 69 | |
171
- | Uint8Array#copy(16) | 13,944,163 ops/sec | ±1.12% | 68 | ✓ |
172
- | | | | |
173
- | BrowserBuffer#new(16000) | 106,329 ops/sec | ±6.70% | 44 | |
174
- | Uint8Array#new(16000) | 131,001 ops/sec | ±2.85% | 31 | ✓ |
175
- | | | | |
176
- | BrowserBuffer#new(16) | 1,554,491 ops/sec | ±1.60% | 65 | |
177
- | Uint8Array#new(16) | 6,623,930 ops/sec | ±1.66% | 65 | ✓ |
178
- | | | | |
179
- | BrowserBuffer#readDoubleBE | 112,830 ops/sec | ±0.51% | 69 | ✓ |
180
- | DataView#getFloat64 | 93,500 ops/sec | ±0.57% | 68 | |
181
- | | | | |
182
- | BrowserBuffer#readFloatBE | 146,678 ops/sec | ±0.95% | 68 | ✓ |
183
- | DataView#getFloat32 | 99,311 ops/sec | ±0.41% | 67 | |
184
- | | | | |
185
- | BrowserBuffer#readUInt32LE | 843,214 ops/sec | ±0.70% | 69 | ✓ |
186
- | DataView#getUint32 | 103,024 ops/sec | ±0.64% | 67 | |
187
- | | | | |
188
- | BrowserBuffer#slice | 1,013,941 ops/sec | ±0.75% | 67 | |
189
- | Uint8Array#subarray | 1,903,928 ops/sec | ±0.53% | 67 | ✓ |
190
- | | | | |
191
- | BrowserBuffer#writeFloatBE | 61,387 ops/sec | ±0.90% | 67 | |
192
- | DataView#setFloat32 | 141,249 ops/sec | ±0.40% | 66 | ✓ |
193
-
194
-
195
- ### Firefox 33
196
-
197
- | Method | Operations | Accuracy | Sampled | Fastest |
198
- |:-------|:-----------|:---------|:--------|:-------:|
199
- | BrowserBuffer#bracket-notation | 20,800,421 ops/sec | ±1.84% | 60 | |
200
- | Uint8Array#bracket-notation | 20,826,235 ops/sec | ±2.02% | 61 | ✓ |
201
- | | | | |
202
- | BrowserBuffer#concat | 153,076 ops/sec | ±2.32% | 61 | |
203
- | Uint8Array#concat | 1,255,674 ops/sec | ±8.65% | 52 | ✓ |
204
- | | | | |
205
- | BrowserBuffer#copy(16000) | 1,105,312 ops/sec | ±1.16% | 63 | |
206
- | Uint8Array#copy(16000) | 1,615,911 ops/sec | ±0.55% | 66 | ✓ |
207
- | | | | |
208
- | BrowserBuffer#copy(16) | 16,357,599 ops/sec | ±0.73% | 68 | |
209
- | Uint8Array#copy(16) | 31,436,281 ops/sec | ±1.05% | 68 | ✓ |
210
- | | | | |
211
- | BrowserBuffer#new(16000) | 52,995 ops/sec | ±6.01% | 35 | |
212
- | Uint8Array#new(16000) | 87,686 ops/sec | ±5.68% | 45 | ✓ |
213
- | | | | |
214
- | BrowserBuffer#new(16) | 252,031 ops/sec | ±1.61% | 66 | |
215
- | Uint8Array#new(16) | 8,477,026 ops/sec | ±0.49% | 68 | ✓ |
216
- | | | | |
217
- | BrowserBuffer#readDoubleBE | 99,871 ops/sec | ±0.41% | 69 | |
218
- | DataView#getFloat64 | 285,663 ops/sec | ±0.70% | 68 | ✓ |
219
- | | | | |
220
- | BrowserBuffer#readFloatBE | 115,540 ops/sec | ±0.42% | 69 | |
221
- | DataView#getFloat32 | 288,722 ops/sec | ±0.82% | 68 | ✓ |
222
- | | | | |
223
- | BrowserBuffer#readUInt32LE | 633,926 ops/sec | ±1.08% | 67 | ✓ |
224
- | DataView#getUint32 | 294,808 ops/sec | ±0.79% | 64 | |
225
- | | | | |
226
- | BrowserBuffer#slice | 349,425 ops/sec | ±0.46% | 69 | |
227
- | Uint8Array#subarray | 5,965,819 ops/sec | ±0.60% | 65 | ✓ |
228
- | | | | |
229
- | BrowserBuffer#writeFloatBE | 59,980 ops/sec | ±0.41% | 67 | |
230
- | DataView#setFloat32 | 317,634 ops/sec | ±0.63% | 68 | ✓ |
231
-
232
- ### Safari 8
233
-
234
- | Method | Operations | Accuracy | Sampled | Fastest |
235
- |:-------|:-----------|:---------|:--------|:-------:|
236
- | BrowserBuffer#bracket-notation | 10,279,729 ops/sec | ±2.25% | 56 | ✓ |
237
- | Uint8Array#bracket-notation | 10,030,767 ops/sec | ±2.23% | 59 | |
238
- | | | | |
239
- | BrowserBuffer#concat | 144,138 ops/sec | ±1.38% | 65 | |
240
- | Uint8Array#concat | 4,950,764 ops/sec | ±1.70% | 63 | ✓ |
241
- | | | | |
242
- | BrowserBuffer#copy(16000) | 1,058,548 ops/sec | ±1.51% | 64 | |
243
- | Uint8Array#copy(16000) | 1,409,666 ops/sec | ±1.17% | 65 | ✓ |
244
- | | | | |
245
- | BrowserBuffer#copy(16) | 6,282,529 ops/sec | ±1.88% | 58 | |
246
- | Uint8Array#copy(16) | 11,907,128 ops/sec | ±2.87% | 58 | ✓ |
247
- | | | | |
248
- | BrowserBuffer#new(16000) | 101,663 ops/sec | ±3.89% | 57 | |
249
- | Uint8Array#new(16000) | 22,050,818 ops/sec | ±6.51% | 46 | ✓ |
250
- | | | | |
251
- | BrowserBuffer#new(16) | 176,072 ops/sec | ±2.13% | 64 | |
252
- | Uint8Array#new(16) | 24,385,731 ops/sec | ±5.01% | 51 | ✓ |
253
- | | | | |
254
- | BrowserBuffer#readDoubleBE | 41,341 ops/sec | ±1.06% | 67 | |
255
- | DataView#getFloat64 | 322,280 ops/sec | ±0.84% | 68 | ✓ |
256
- | | | | |
257
- | BrowserBuffer#readFloatBE | 46,141 ops/sec | ±1.06% | 65 | |
258
- | DataView#getFloat32 | 337,025 ops/sec | ±0.43% | 69 | ✓ |
259
- | | | | |
260
- | BrowserBuffer#readUInt32LE | 151,551 ops/sec | ±1.02% | 66 | |
261
- | DataView#getUint32 | 308,278 ops/sec | ±0.94% | 67 | ✓ |
262
- | | | | |
263
- | BrowserBuffer#slice | 197,365 ops/sec | ±0.95% | 66 | |
264
- | Uint8Array#subarray | 9,558,024 ops/sec | ±3.08% | 58 | ✓ |
265
- | | | | |
266
- | BrowserBuffer#writeFloatBE | 17,518 ops/sec | ±1.03% | 63 | |
267
- | DataView#setFloat32 | 319,751 ops/sec | ±0.48% | 68 | ✓ |
268
-
269
-
270
- ### Node 0.11.14
271
-
272
- | Method | Operations | Accuracy | Sampled | Fastest |
273
- |:-------|:-----------|:---------|:--------|:-------:|
274
- | BrowserBuffer#bracket-notation | 10,489,828 ops/sec | ±3.25% | 90 | |
275
- | Uint8Array#bracket-notation | 10,534,884 ops/sec | ±0.81% | 92 | ✓ |
276
- | NodeBuffer#bracket-notation | 10,389,910 ops/sec | ±0.97% | 87 | |
277
- | | | | |
278
- | BrowserBuffer#concat | 487,830 ops/sec | ±2.58% | 88 | |
279
- | Uint8Array#concat | 1,814,327 ops/sec | ±1.28% | 88 | ✓ |
280
- | NodeBuffer#concat | 1,636,523 ops/sec | ±1.88% | 73 | |
281
- | | | | |
282
- | BrowserBuffer#copy(16000) | 1,073,665 ops/sec | ±0.77% | 90 | |
283
- | Uint8Array#copy(16000) | 1,348,517 ops/sec | ±0.84% | 89 | ✓ |
284
- | NodeBuffer#copy(16000) | 1,289,533 ops/sec | ±0.82% | 93 | |
285
- | | | | |
286
- | BrowserBuffer#copy(16) | 12,782,706 ops/sec | ±0.74% | 85 | |
287
- | Uint8Array#copy(16) | 14,180,427 ops/sec | ±0.93% | 92 | ✓ |
288
- | NodeBuffer#copy(16) | 11,083,134 ops/sec | ±1.06% | 89 | |
289
- | | | | |
290
- | BrowserBuffer#new(16000) | 141,678 ops/sec | ±3.30% | 67 | |
291
- | Uint8Array#new(16000) | 161,491 ops/sec | ±2.96% | 60 | |
292
- | NodeBuffer#new(16000) | 292,699 ops/sec | ±3.20% | 55 | ✓ |
293
- | | | | |
294
- | BrowserBuffer#new(16) | 1,655,466 ops/sec | ±2.41% | 82 | |
295
- | Uint8Array#new(16) | 14,399,926 ops/sec | ±0.91% | 94 | ✓ |
296
- | NodeBuffer#new(16) | 3,894,696 ops/sec | ±0.88% | 92 | |
297
- | | | | |
298
- | BrowserBuffer#readDoubleBE | 109,582 ops/sec | ±0.75% | 93 | ✓ |
299
- | DataView#getFloat64 | 91,235 ops/sec | ±0.81% | 90 | |
300
- | NodeBuffer#readDoubleBE | 88,593 ops/sec | ±0.96% | 81 | |
301
- | | | | |
302
- | BrowserBuffer#readFloatBE | 139,854 ops/sec | ±1.03% | 85 | ✓ |
303
- | DataView#getFloat32 | 98,744 ops/sec | ±0.80% | 89 | |
304
- | NodeBuffer#readFloatBE | 92,769 ops/sec | ±0.94% | 93 | |
305
- | | | | |
306
- | BrowserBuffer#readUInt32LE | 710,861 ops/sec | ±0.82% | 92 | |
307
- | DataView#getUint32 | 117,893 ops/sec | ±0.84% | 91 | |
308
- | NodeBuffer#readUInt32LE | 851,412 ops/sec | ±0.72% | 93 | ✓ |
309
- | | | | |
310
- | BrowserBuffer#slice | 1,673,877 ops/sec | ±0.73% | 94 | |
311
- | Uint8Array#subarray | 6,919,243 ops/sec | ±0.67% | 90 | ✓ |
312
- | NodeBuffer#slice | 4,617,604 ops/sec | ±0.79% | 93 | |
313
- | | | | |
314
- | BrowserBuffer#writeFloatBE | 66,011 ops/sec | ±0.75% | 93 | |
315
- | DataView#setFloat32 | 127,760 ops/sec | ±0.72% | 93 | ✓ |
316
- | NodeBuffer#writeFloatBE | 103,352 ops/sec | ±0.83% | 93 | |
317
-
318
- ### iojs 1.8.1
319
-
320
- | Method | Operations | Accuracy | Sampled | Fastest |
321
- |:-------|:-----------|:---------|:--------|:-------:|
322
- | BrowserBuffer#bracket-notation | 10,990,488 ops/sec | ±1.11% | 91 | |
323
- | Uint8Array#bracket-notation | 11,268,757 ops/sec | ±0.65% | 97 | |
324
- | NodeBuffer#bracket-notation | 11,353,260 ops/sec | ±0.83% | 94 | ✓ |
325
- | | | | |
326
- | BrowserBuffer#concat | 378,954 ops/sec | ±0.74% | 94 | |
327
- | Uint8Array#concat | 1,358,288 ops/sec | ±0.97% | 87 | |
328
- | NodeBuffer#concat | 1,934,050 ops/sec | ±1.11% | 78 | ✓ |
329
- | | | | |
330
- | BrowserBuffer#copy(16000) | 894,538 ops/sec | ±0.56% | 84 | |
331
- | Uint8Array#copy(16000) | 1,442,656 ops/sec | ±0.71% | 96 | |
332
- | NodeBuffer#copy(16000) | 1,457,898 ops/sec | ±0.53% | 92 | ✓ |
333
- | | | | |
334
- | BrowserBuffer#copy(16) | 12,870,457 ops/sec | ±0.67% | 95 | |
335
- | Uint8Array#copy(16) | 16,643,989 ops/sec | ±0.61% | 93 | ✓ |
336
- | NodeBuffer#copy(16) | 14,885,848 ops/sec | ±0.74% | 94 | |
337
- | | | | |
338
- | BrowserBuffer#new(16000) | 109,264 ops/sec | ±4.21% | 63 | |
339
- | Uint8Array#new(16000) | 138,916 ops/sec | ±1.87% | 61 | |
340
- | NodeBuffer#new(16000) | 281,449 ops/sec | ±3.58% | 51 | ✓ |
341
- | | | | |
342
- | BrowserBuffer#new(16) | 1,362,935 ops/sec | ±0.56% | 99 | |
343
- | Uint8Array#new(16) | 6,193,090 ops/sec | ±0.64% | 95 | ✓ |
344
- | NodeBuffer#new(16) | 4,745,425 ops/sec | ±1.56% | 90 | |
345
- | | | | |
346
- | BrowserBuffer#readDoubleBE | 118,127 ops/sec | ±0.59% | 93 | ✓ |
347
- | DataView#getFloat64 | 107,332 ops/sec | ±0.65% | 91 | |
348
- | NodeBuffer#readDoubleBE | 116,274 ops/sec | ±0.94% | 95 | |
349
- | | | | |
350
- | BrowserBuffer#readFloatBE | 150,326 ops/sec | ±0.58% | 95 | ✓ |
351
- | DataView#getFloat32 | 110,541 ops/sec | ±0.57% | 98 | |
352
- | NodeBuffer#readFloatBE | 121,599 ops/sec | ±0.60% | 87 | |
353
- | | | | |
354
- | BrowserBuffer#readUInt32LE | 814,147 ops/sec | ±0.62% | 93 | |
355
- | DataView#getUint32 | 137,592 ops/sec | ±0.64% | 90 | |
356
- | NodeBuffer#readUInt32LE | 931,650 ops/sec | ±0.71% | 96 | ✓ |
357
- | | | | |
358
- | BrowserBuffer#slice | 878,590 ops/sec | ±0.68% | 93 | |
359
- | Uint8Array#subarray | 2,843,308 ops/sec | ±1.02% | 90 | |
360
- | NodeBuffer#slice | 4,998,316 ops/sec | ±0.68% | 90 | ✓ |
361
- | | | | |
362
- | BrowserBuffer#writeFloatBE | 65,927 ops/sec | ±0.74% | 93 | |
363
- | DataView#setFloat32 | 139,823 ops/sec | ±0.97% | 89 | ✓ |
364
- | NodeBuffer#writeFloatBE | 135,763 ops/sec | ±0.65% | 96 | |
365
- | | | | |
366
-
367
- ## Testing the project
368
-
369
- First, install the project:
370
-
371
- npm install
372
-
373
- Then, to run tests in Node.js, run:
374
-
375
- npm run test-node
376
-
377
- To test locally in a browser, you can run:
378
-
379
- npm run test-browser-es5-local # For ES5 browsers that don't support ES6
380
- npm run test-browser-es6-local # For ES6 compliant browsers
381
-
382
- This will print out a URL that you can then open in a browser to run the tests, using [airtap](https://www.npmjs.com/package/airtap).
383
-
384
- To run automated browser tests using Saucelabs, ensure that your `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` environment variables are set, then run:
385
-
386
- npm test
387
-
388
- This is what's run in Travis, to check against various browsers. The list of browsers is kept in the `bin/airtap-es5.yml` and `bin/airtap-es6.yml` files.
389
-
390
- ## JavaScript Standard Style
391
-
392
- This module uses [JavaScript Standard Style](https://github.com/feross/standard).
393
-
394
- [![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
395
-
396
- To test that the code conforms to the style, `npm install` and run:
397
-
398
- ./node_modules/.bin/standard
399
-
400
- ## credit
401
-
402
- This was originally forked from [buffer-browserify](https://github.com/toots/buffer-browserify).
403
-
404
- ## Security Policies and Procedures
405
-
406
- The `buffer` team and community take all security bugs in `buffer` seriously. Please see our [security policies and procedures](https://github.com/feross/security) document to learn how to report issues.
407
-
408
- ## license
409
-
410
- MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org), and other contributors. Originally forked from an MIT-licensed module by Romain Beauxis.
@@ -1,47 +0,0 @@
1
- # buffer-crc32
2
-
3
- [![Build Status](https://secure.travis-ci.org/brianloveswords/buffer-crc32.png?branch=master)](http://travis-ci.org/brianloveswords/buffer-crc32)
4
-
5
- crc32 that works with binary data and fancy character sets, outputs
6
- buffer, signed or unsigned data and has tests.
7
-
8
- Derived from the sample CRC implementation in the PNG specification: http://www.w3.org/TR/PNG/#D-CRCAppendix
9
-
10
- # install
11
- ```
12
- npm install buffer-crc32
13
- ```
14
-
15
- # example
16
- ```js
17
- var crc32 = require('buffer-crc32');
18
- // works with buffers
19
- var buf = Buffer([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00])
20
- crc32(buf) // -> <Buffer 94 5a ab 4a>
21
-
22
- // has convenience methods for getting signed or unsigned ints
23
- crc32.signed(buf) // -> -1805997238
24
- crc32.unsigned(buf) // -> 2488970058
25
-
26
- // will cast to buffer if given a string, so you can
27
- // directly use foreign characters safely
28
- crc32('自動販売機') // -> <Buffer cb 03 1a c5>
29
-
30
- // and works in append mode too
31
- var partialCrc = crc32('hey');
32
- var partialCrc = crc32(' ', partialCrc);
33
- var partialCrc = crc32('sup', partialCrc);
34
- var partialCrc = crc32(' ', partialCrc);
35
- var finalCrc = crc32('bros', partialCrc); // -> <Buffer 47 fa 55 70>
36
- ```
37
-
38
- # tests
39
- This was tested against the output of zlib's crc32 method. You can run
40
- the tests with`npm test` (requires tap)
41
-
42
- # see also
43
- https://github.com/alexgorbatchev/node-crc, `crc.buffer.crc32` also
44
- supports buffer inputs and return unsigned ints (thanks @tjholowaychuk).
45
-
46
- # license
47
- MIT/X11
@@ -1,27 +0,0 @@
1
- # node-cachedir
2
-
3
- Provides a directory where the OS wants you to store cached files.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- npm install --save cachedir
9
- ```
10
-
11
- ## Usage
12
-
13
- ```javascript
14
- const cachedir = require('cachedir')
15
-
16
- console.log(cachedir('myapp'))
17
- // e.g.
18
- //=> '/Users/linus/Library/Caches/myapp'
19
- //=> '/home/linus/.cache/myapp'
20
- //=> 'C:\Users\linus\AppData\Local\myapp\Cache'
21
- ```
22
-
23
- ## API
24
-
25
- ### `cachedir(name: string) => string`
26
-
27
- Return path to an appropriate place to store cache files.
@@ -1,45 +0,0 @@
1
- ## Caseless -- wrap an object to set and get property with caseless semantics but also preserve caseing.
2
-
3
- This library is incredibly useful when working with HTTP headers. It allows you to get/set/check for headers in a caseless manner while also preserving the caseing of headers the first time they are set.
4
-
5
- ## Usage
6
-
7
- ```javascript
8
- var headers = {}
9
- , c = caseless(headers)
10
- ;
11
- c.set('a-Header', 'asdf')
12
- c.get('a-header') === 'asdf'
13
- ```
14
-
15
- ## has(key)
16
-
17
- Has takes a name and if it finds a matching header will return that header name with the preserved caseing it was set with.
18
-
19
- ```javascript
20
- c.has('a-header') === 'a-Header'
21
- ```
22
-
23
- ## set(key, value[, clobber=true])
24
-
25
- Set is fairly straight forward except that if the header exists and clobber is disabled it will add `','+value` to the existing header.
26
-
27
- ```javascript
28
- c.set('a-Header', 'fdas')
29
- c.set('a-HEADER', 'more', false)
30
- c.get('a-header') === 'fdsa,more'
31
- ```
32
-
33
- ## swap(key)
34
-
35
- Swaps the casing of a header with the new one that is passed in.
36
-
37
- ```javascript
38
- var headers = {}
39
- , c = caseless(headers)
40
- ;
41
- c.set('a-Header', 'fdas')
42
- c.swap('a-HEADER')
43
- c.has('a-header') === 'a-HEADER'
44
- headers === {'a-HEADER': 'fdas'}
45
- ```