angular-slickgrid 4.2.6 → 4.3.1

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 (184) hide show
  1. package/{index.d.ts → angular-slickgrid.d.ts} +0 -0
  2. package/app/modules/angular-slickgrid/components/angular-slickgrid.component.d.ts +1 -1
  3. package/esm2020/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +6 -7
  4. package/esm2020/app/modules/angular-slickgrid/modules/angular-slickgrid.module.mjs +10 -7
  5. package/esm2020/app/modules/angular-slickgrid/services/angularUtil.service.mjs +4 -4
  6. package/esm2020/app/modules/angular-slickgrid/services/bsDropdown.service.mjs +4 -4
  7. package/esm2020/app/modules/angular-slickgrid/services/container.service.mjs +4 -4
  8. package/esm2020/app/modules/angular-slickgrid/services/translater.service.mjs +4 -4
  9. package/fesm2015/angular-slickgrid.mjs +26 -24
  10. package/fesm2015/angular-slickgrid.mjs.map +1 -1
  11. package/fesm2020/angular-slickgrid.mjs +26 -24
  12. package/fesm2020/angular-slickgrid.mjs.map +1 -1
  13. package/package.json +17 -17
  14. package/test/cypress/node_modules/@cypress/request/README.md +0 -1038
  15. package/test/cypress/node_modules/@cypress/xvfb/README.md +0 -48
  16. package/test/cypress/node_modules/@cypress/xvfb/node_modules/debug/README.md +0 -437
  17. package/test/cypress/node_modules/@types/node/README.md +0 -16
  18. package/test/cypress/node_modules/@types/sinonjs__fake-timers/README.md +0 -16
  19. package/test/cypress/node_modules/@types/sizzle/README.md +0 -16
  20. package/test/cypress/node_modules/@types/yauzl/README.md +0 -16
  21. package/test/cypress/node_modules/@types/yauzl/node_modules/@types/node/README.md +0 -16
  22. package/test/cypress/node_modules/aggregate-error/README.md +0 -61
  23. package/test/cypress/node_modules/ansi-colors/README.md +0 -315
  24. package/test/cypress/node_modules/ansi-escapes/README.md +0 -245
  25. package/test/cypress/node_modules/ansi-regex/README.md +0 -78
  26. package/test/cypress/node_modules/ansi-styles/README.md +0 -152
  27. package/test/cypress/node_modules/arch/README.md +0 -71
  28. package/test/cypress/node_modules/asn1/README.md +0 -50
  29. package/test/cypress/node_modules/assert-plus/README.md +0 -162
  30. package/test/cypress/node_modules/astral-regex/README.md +0 -46
  31. package/test/cypress/node_modules/async/README.md +0 -60
  32. package/test/cypress/node_modules/asynckit/README.md +0 -233
  33. package/test/cypress/node_modules/at-least-node/README.md +0 -25
  34. package/test/cypress/node_modules/aws-sign2/README.md +0 -4
  35. package/test/cypress/node_modules/aws4/README.md +0 -183
  36. package/test/cypress/node_modules/balanced-match/README.md +0 -91
  37. package/test/cypress/node_modules/base64-js/README.md +0 -34
  38. package/test/cypress/node_modules/bcrypt-pbkdf/README.md +0 -45
  39. package/test/cypress/node_modules/blob-util/README.md +0 -623
  40. package/test/cypress/node_modules/bluebird/README.md +0 -57
  41. package/test/cypress/node_modules/brace-expansion/README.md +0 -129
  42. package/test/cypress/node_modules/buffer/README.md +0 -410
  43. package/test/cypress/node_modules/buffer-crc32/README.md +0 -47
  44. package/test/cypress/node_modules/cachedir/README.md +0 -27
  45. package/test/cypress/node_modules/caseless/README.md +0 -45
  46. package/test/cypress/node_modules/chalk/README.md +0 -293
  47. package/test/cypress/node_modules/chalk/node_modules/supports-color/README.md +0 -76
  48. package/test/cypress/node_modules/check-more-types/README.md +0 -952
  49. package/test/cypress/node_modules/ci-info/README.md +0 -114
  50. package/test/cypress/node_modules/clean-stack/README.md +0 -76
  51. package/test/cypress/node_modules/cli-cursor/README.md +0 -55
  52. package/test/cypress/node_modules/cli-table3/README.md +0 -218
  53. package/test/cypress/node_modules/cli-truncate/README.md +0 -139
  54. package/test/cypress/node_modules/color-convert/README.md +0 -68
  55. package/test/cypress/node_modules/color-name/README.md +0 -11
  56. package/test/cypress/node_modules/colorette/README.md +0 -102
  57. package/test/cypress/node_modules/colors/README.md +0 -221
  58. package/test/cypress/node_modules/combined-stream/README.md +0 -138
  59. package/test/cypress/node_modules/commander/README.md +0 -737
  60. package/test/cypress/node_modules/common-tags/README.md +0 -687
  61. package/test/cypress/node_modules/core-util-is/README.md +0 -3
  62. package/test/cypress/node_modules/cross-spawn/README.md +0 -96
  63. package/test/cypress/node_modules/cypress/README.md +0 -25
  64. package/test/cypress/node_modules/cypress/mount-utils/README.md +0 -14
  65. package/test/cypress/node_modules/cypress/react/README.md +0 -414
  66. package/test/cypress/node_modules/cypress/vue/README.md +0 -678
  67. package/test/cypress/node_modules/cypress/vue2/README.md +0 -693
  68. package/test/cypress/node_modules/dashdash/README.md +0 -574
  69. package/test/cypress/node_modules/dayjs/README.md +0 -128
  70. package/test/cypress/node_modules/debug/README.md +0 -455
  71. package/test/cypress/node_modules/delayed-stream/README.md +0 -141
  72. package/test/cypress/node_modules/ecc-jsbn/README.md +0 -8
  73. package/test/cypress/node_modules/emoji-regex/README.md +0 -73
  74. package/test/cypress/node_modules/end-of-stream/README.md +0 -54
  75. package/test/cypress/node_modules/enquirer/README.md +0 -1752
  76. package/test/cypress/node_modules/escape-string-regexp/README.md +0 -27
  77. package/test/cypress/node_modules/eventemitter2/README.md +0 -809
  78. package/test/cypress/node_modules/execa/README.md +0 -656
  79. package/test/cypress/node_modules/executable/README.md +0 -64
  80. package/test/cypress/node_modules/extend/README.md +0 -81
  81. package/test/cypress/node_modules/extract-zip/README.md +0 -57
  82. package/test/cypress/node_modules/extract-zip/node_modules/debug/README.md +0 -455
  83. package/test/cypress/node_modules/extsprintf/README.md +0 -46
  84. package/test/cypress/node_modules/fd-slicer/README.md +0 -199
  85. package/test/cypress/node_modules/figures/README.md +0 -139
  86. package/test/cypress/node_modules/forever-agent/README.md +0 -4
  87. package/test/cypress/node_modules/form-data/README.md +0 -234
  88. package/test/cypress/node_modules/fs-extra/README.md +0 -264
  89. package/test/cypress/node_modules/fs.realpath/README.md +0 -33
  90. package/test/cypress/node_modules/get-stream/README.md +0 -124
  91. package/test/cypress/node_modules/getos/README.md +0 -79
  92. package/test/cypress/node_modules/getpass/README.md +0 -32
  93. package/test/cypress/node_modules/glob/README.md +0 -375
  94. package/test/cypress/node_modules/global-dirs/README.md +0 -72
  95. package/test/cypress/node_modules/graceful-fs/README.md +0 -133
  96. package/test/cypress/node_modules/has-flag/README.md +0 -89
  97. package/test/cypress/node_modules/http-signature/README.md +0 -80
  98. package/test/cypress/node_modules/human-signals/README.md +0 -155
  99. package/test/cypress/node_modules/ieee754/README.md +0 -51
  100. package/test/cypress/node_modules/indent-string/README.md +0 -70
  101. package/test/cypress/node_modules/inflight/README.md +0 -37
  102. package/test/cypress/node_modules/inherits/README.md +0 -42
  103. package/test/cypress/node_modules/ini/README.md +0 -102
  104. package/test/cypress/node_modules/is-ci/README.md +0 -50
  105. package/test/cypress/node_modules/is-fullwidth-code-point/README.md +0 -39
  106. package/test/cypress/node_modules/is-installed-globally/README.md +0 -31
  107. package/test/cypress/node_modules/is-path-inside/README.md +0 -63
  108. package/test/cypress/node_modules/is-stream/README.md +0 -57
  109. package/test/cypress/node_modules/is-typedarray/README.md +0 -16
  110. package/test/cypress/node_modules/isexe/README.md +0 -51
  111. package/test/cypress/node_modules/isstream/README.md +0 -66
  112. package/test/cypress/node_modules/jsbn/README.md +0 -175
  113. package/test/cypress/node_modules/json-schema/README.md +0 -3
  114. package/test/cypress/node_modules/json-stringify-safe/README.md +0 -52
  115. package/test/cypress/node_modules/jsonfile/README.md +0 -205
  116. package/test/cypress/node_modules/jsonfile/node_modules/universalify/README.md +0 -76
  117. package/test/cypress/node_modules/jsprim/README.md +0 -287
  118. package/test/cypress/node_modules/lazy-ass/README.md +0 -269
  119. package/test/cypress/node_modules/listr2/README.md +0 -17
  120. package/test/cypress/node_modules/lodash/README.md +0 -39
  121. package/test/cypress/node_modules/lodash.once/README.md +0 -18
  122. package/test/cypress/node_modules/log-symbols/README.md +0 -51
  123. package/test/cypress/node_modules/log-update/README.md +0 -97
  124. package/test/cypress/node_modules/log-update/node_modules/slice-ansi/README.md +0 -66
  125. package/test/cypress/node_modules/log-update/node_modules/wrap-ansi/README.md +0 -97
  126. package/test/cypress/node_modules/lru-cache/README.md +0 -166
  127. package/test/cypress/node_modules/merge-stream/README.md +0 -78
  128. package/test/cypress/node_modules/mime-db/README.md +0 -102
  129. package/test/cypress/node_modules/mime-types/README.md +0 -123
  130. package/test/cypress/node_modules/mimic-fn/README.md +0 -69
  131. package/test/cypress/node_modules/minimatch/README.md +0 -209
  132. package/test/cypress/node_modules/ms/README.md +0 -60
  133. package/test/cypress/node_modules/npm-run-path/README.md +0 -115
  134. package/test/cypress/node_modules/once/README.md +0 -79
  135. package/test/cypress/node_modules/onetime/README.md +0 -94
  136. package/test/cypress/node_modules/ospath/README.md +0 -53
  137. package/test/cypress/node_modules/p-map/README.md +0 -89
  138. package/test/cypress/node_modules/path-is-absolute/README.md +0 -59
  139. package/test/cypress/node_modules/path-key/README.md +0 -61
  140. package/test/cypress/node_modules/pend/README.md +0 -41
  141. package/test/cypress/node_modules/performance-now/README.md +0 -30
  142. package/test/cypress/node_modules/pify/README.md +0 -119
  143. package/test/cypress/node_modules/pretty-bytes/README.md +0 -131
  144. package/test/cypress/node_modules/proxy-from-env/README.md +0 -131
  145. package/test/cypress/node_modules/psl/README.md +0 -215
  146. package/test/cypress/node_modules/pump/README.md +0 -65
  147. package/test/cypress/node_modules/punycode/README.md +0 -122
  148. package/test/cypress/node_modules/qs/README.md +0 -475
  149. package/test/cypress/node_modules/request-progress/README.md +0 -78
  150. package/test/cypress/node_modules/restore-cursor/README.md +0 -26
  151. package/test/cypress/node_modules/rimraf/README.md +0 -101
  152. package/test/cypress/node_modules/rxjs/README.md +0 -147
  153. package/test/cypress/node_modules/rxjs/_esm2015/README.md +0 -147
  154. package/test/cypress/node_modules/rxjs/_esm5/README.md +0 -147
  155. package/test/cypress/node_modules/rxjs/src/README.md +0 -147
  156. package/test/cypress/node_modules/safe-buffer/README.md +0 -584
  157. package/test/cypress/node_modules/safer-buffer/README.md +0 -156
  158. package/test/cypress/node_modules/semver/README.md +0 -566
  159. package/test/cypress/node_modules/shebang-command/README.md +0 -34
  160. package/test/cypress/node_modules/shebang-regex/README.md +0 -33
  161. package/test/cypress/node_modules/signal-exit/README.md +0 -39
  162. package/test/cypress/node_modules/slice-ansi/README.md +0 -72
  163. package/test/cypress/node_modules/sshpk/README.md +0 -804
  164. package/test/cypress/node_modules/string-width/README.md +0 -50
  165. package/test/cypress/node_modules/strip-ansi/README.md +0 -46
  166. package/test/cypress/node_modules/strip-final-newline/README.md +0 -30
  167. package/test/cypress/node_modules/supports-color/README.md +0 -77
  168. package/test/cypress/node_modules/throttleit/README.md +0 -32
  169. package/test/cypress/node_modules/tmp/README.md +0 -365
  170. package/test/cypress/node_modules/tough-cookie/README.md +0 -527
  171. package/test/cypress/node_modules/tslib/README.md +0 -142
  172. package/test/cypress/node_modules/tunnel-agent/README.md +0 -4
  173. package/test/cypress/node_modules/tweetnacl/README.md +0 -459
  174. package/test/cypress/node_modules/type-fest/README.md +0 -760
  175. package/test/cypress/node_modules/universalify/README.md +0 -76
  176. package/test/cypress/node_modules/untildify/README.md +0 -30
  177. package/test/cypress/node_modules/uuid/README.md +0 -505
  178. package/test/cypress/node_modules/verror/README.md +0 -528
  179. package/test/cypress/node_modules/verror/node_modules/extsprintf/README.md +0 -46
  180. package/test/cypress/node_modules/which/README.md +0 -54
  181. package/test/cypress/node_modules/wrap-ansi/README.md +0 -91
  182. package/test/cypress/node_modules/wrappy/README.md +0 -36
  183. package/test/cypress/node_modules/yallist/README.md +0 -204
  184. package/test/cypress/node_modules/yauzl/README.md +0 -658
@@ -1,623 +0,0 @@
1
- blob-util [![Build Status](https://travis-ci.org/nolanlawson/blob-util.svg)](https://travis-ci.org/nolanlawson/blob-util) [![TypeScript](https://img.shields.io/badge/%3C%2F%3E-typescript-blue.svg)](http://www.typescriptlang.org/)
2
- =====
3
-
4
- `blob-util` is a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob?redirectlocale=en-US&redirectslug=DOM%2FBlob) library for busy people.
5
-
6
- It offers a small set of cross-browser utilities for translating Blobs to and from different formats:
7
-
8
- * `<img/>` tags
9
- * base 64 strings
10
- * binary strings
11
- * ArrayBuffers
12
- * data URLs
13
- * canvas
14
-
15
- It's also a good pairing with the attachment API in [PouchDB](http://pouchdb.com).
16
-
17
- **Note**: this is a browser library. For Node.js, see [Buffers](http://nodejs.org/api/buffer.html).
18
-
19
- **Topics**:
20
-
21
- * [Install](#usage)
22
- * [Browser support](#browser-support)
23
- * [Tutorial](#tutorial)
24
- * [Playground](http://nolanlawson.github.io/blob-util)
25
- * [API](#api)
26
-
27
- Install
28
- ------
29
-
30
- Via npm:
31
-
32
- ```bash
33
- npm install blob-util
34
- ```
35
-
36
- ES modules are supported:
37
-
38
- ```js
39
- import { canvasToBlob } from 'blob-util'
40
- canvasToBlob(canvas, 'image/png').then(/* ... */)
41
- ```
42
-
43
- Or as a script tag:
44
-
45
- ```html
46
- <script src="https://unpkg.com/blob-util/dist/blob-util.min.js"></script>
47
- ```
48
-
49
- Then it's available as a global `blobUtil` object:
50
-
51
- ```js
52
- blobUtil.canvasToBlob(canvas, 'image/png').then(/* ... */)
53
- ```
54
-
55
- Browser support
56
- -----
57
-
58
- As of v2.0.0, a built-in `Promise` polyfill is no longer provided. Assuming you provide a `Promise`
59
- polyfill, the supported browsers are:
60
-
61
- * Firefox
62
- * Chrome
63
- * Edge
64
- * IE 10+
65
- * Safari 6+
66
- * iOS 6+
67
- * Android 4+
68
- * Any browser with either `Blob` or the older `BlobBuilder`; see [caniuse](http://caniuse.com/#search=blob) for details.
69
-
70
- Tutorial
71
- --------
72
-
73
- Blobs (<strong>b</strong>inary <strong>l</strong>arge <strong>ob</strong>jects) are the modern way of working with binary data in the browser. The browser support is [very good](http://caniuse.com/#search=blob).
74
-
75
- Once you have a Blob, you can make it available offline by storing it in [IndexedDB](http://www.w3.org/TR/IndexedDB/), [PouchDB](http://pouchdb.com/), [LocalForage](https://mozilla.github.io/localForage/), or other in-browser databases. So it's the perfect format for working with offline images, sound, and video.
76
-
77
- A [File](https://developer.mozilla.org/en-US/docs/Web/API/File) is also a Blob. So if you have an `<input type="file">` in your page, you can let your users upload any file and then work with it as a Blob.
78
-
79
- ### Example
80
-
81
- Here's Kirby. He's a famous little Blob.
82
-
83
- <img id="kirby" alt="Kirby" src="./test/kirby.gif"/>
84
-
85
- So let's fulfill his destiny, and convert him to a real `Blob` object.
86
-
87
- ```js
88
- var img = document.getElementById('kirby');
89
-
90
- blobUtil.imgSrcToBlob(img.src).then(function (blob) {
91
- // ladies and gents, we have a blob
92
- }).catch(function (err) {
93
- // image failed to load
94
- });
95
- ```
96
-
97
- (Don't worry, this won't download the image twice, because browsers are smart.)
98
-
99
- Now that we have a `Blob`, we can convert it to a URL and use that as the source for another `<img/>` tag:
100
-
101
- ```js
102
- var blobURL = blobUtil.createObjectURL(blob);
103
-
104
- var newImg = document.createElement('img');
105
- newImg.src = blobURL;
106
-
107
- document.body.appendChild(newImg);
108
- ```
109
-
110
- So now we have two Kirbys - one with a normal URL, and the other with a blob URL. You can try this out yourself in the [blob-util playground](http://nolanlawson.github.io/blob-util). Super fun!
111
-
112
- <img src="blob-util.gif"/>
113
-
114
-
115
- API
116
- -------
117
-
118
- <!-- begin insert API -->
119
-
120
- ## Index
121
-
122
- ### Functions
123
-
124
- * [arrayBufferToBinaryString](#arraybuffertobinarystring)
125
- * [arrayBufferToBlob](#arraybuffertoblob)
126
- * [base64StringToBlob](#base64stringtoblob)
127
- * [binaryStringToArrayBuffer](#binarystringtoarraybuffer)
128
- * [binaryStringToBlob](#binarystringtoblob)
129
- * [blobToArrayBuffer](#blobtoarraybuffer)
130
- * [blobToBase64String](#blobtobase64string)
131
- * [blobToBinaryString](#blobtobinarystring)
132
- * [blobToDataURL](#blobtodataurl)
133
- * [canvasToBlob](#canvastoblob)
134
- * [createBlob](#createblob)
135
- * [createObjectURL](#createobjecturl)
136
- * [dataURLToBlob](#dataurltoblob)
137
- * [imgSrcToBlob](#imgsrctoblob)
138
- * [imgSrcToDataURL](#imgsrctodataurl)
139
- * [revokeObjectURL](#revokeobjecturl)
140
-
141
- ---
142
-
143
- ## Functions
144
-
145
- <a id="arraybuffertobinarystring"></a>
146
-
147
- ### arrayBufferToBinaryString
148
-
149
- ▸ **arrayBufferToBinaryString**(buffer: *`ArrayBuffer`*): `string`
150
-
151
- Convert an `ArrayBuffer` to a binary string.
152
-
153
- Example:
154
-
155
- ```js
156
- var myString = blobUtil.arrayBufferToBinaryString(arrayBuff)
157
- ```
158
-
159
- **Parameters:**
160
-
161
- | Param | Type | Description |
162
- | ------ | ------ | ------ |
163
- | buffer | `ArrayBuffer` | array buffer |
164
-
165
- **Returns:** `string`
166
- binary string
167
-
168
- ___
169
- <a id="arraybuffertoblob"></a>
170
-
171
- ### arrayBufferToBlob
172
-
173
- ▸ **arrayBufferToBlob**(buffer: *`ArrayBuffer`*, type?: *`string`*): `Blob`
174
-
175
- Convert an `ArrayBuffer` to a `Blob`.
176
-
177
- Example:
178
-
179
- ```js
180
- var blob = blobUtil.arrayBufferToBlob(arrayBuff, 'audio/mpeg');
181
- ```
182
-
183
- **Parameters:**
184
-
185
- | Param | Type | Description |
186
- | ------ | ------ | ------ |
187
- | buffer | `ArrayBuffer` | - |
188
- | `Optional` type | `string` | the content type (optional) |
189
-
190
- **Returns:** `Blob`
191
- Blob
192
-
193
- ___
194
- <a id="base64stringtoblob"></a>
195
-
196
- ### base64StringToBlob
197
-
198
- ▸ **base64StringToBlob**(base64: *`string`*, type?: *`string`*): `Blob`
199
-
200
- Convert a base64-encoded string to a `Blob`.
201
-
202
- Example:
203
-
204
- ```js
205
- var blob = blobUtil.base64StringToBlob(base64String);
206
- ```
207
-
208
- **Parameters:**
209
-
210
- | Param | Type | Description |
211
- | ------ | ------ | ------ |
212
- | base64 | `string` | base64-encoded string |
213
- | `Optional` type | `string` | the content type (optional) |
214
-
215
- **Returns:** `Blob`
216
- Blob
217
-
218
- ___
219
- <a id="binarystringtoarraybuffer"></a>
220
-
221
- ### binaryStringToArrayBuffer
222
-
223
- ▸ **binaryStringToArrayBuffer**(binary: *`string`*): `ArrayBuffer`
224
-
225
- Convert a binary string to an `ArrayBuffer`.
226
-
227
- ```js
228
- var myBuffer = blobUtil.binaryStringToArrayBuffer(binaryString)
229
- ```
230
-
231
- **Parameters:**
232
-
233
- | Param | Type | Description |
234
- | ------ | ------ | ------ |
235
- | binary | `string` | binary string |
236
-
237
- **Returns:** `ArrayBuffer`
238
- array buffer
239
-
240
- ___
241
- <a id="binarystringtoblob"></a>
242
-
243
- ### binaryStringToBlob
244
-
245
- ▸ **binaryStringToBlob**(binary: *`string`*, type?: *`string`*): `Blob`
246
-
247
- Convert a binary string to a `Blob`.
248
-
249
- Example:
250
-
251
- ```js
252
- var blob = blobUtil.binaryStringToBlob(binaryString);
253
- ```
254
-
255
- **Parameters:**
256
-
257
- | Param | Type | Description |
258
- | ------ | ------ | ------ |
259
- | binary | `string` | binary string |
260
- | `Optional` type | `string` | the content type (optional) |
261
-
262
- **Returns:** `Blob`
263
- Blob
264
-
265
- ___
266
- <a id="blobtoarraybuffer"></a>
267
-
268
- ### blobToArrayBuffer
269
-
270
- ▸ **blobToArrayBuffer**(blob: *`Blob`*): `Promise`<`ArrayBuffer`>
271
-
272
- Convert a `Blob` to an `ArrayBuffer`.
273
-
274
- Example:
275
-
276
- ```js
277
- blobUtil.blobToArrayBuffer(blob).then(function (arrayBuff) {
278
- // success
279
- }).catch(function (err) {
280
- // error
281
- });
282
- ```
283
-
284
- **Parameters:**
285
-
286
- | Param | Type | Description |
287
- | ------ | ------ | ------ |
288
- | blob | `Blob` | - |
289
-
290
- **Returns:** `Promise`<`ArrayBuffer`>
291
- Promise that resolves with the `ArrayBuffer`
292
-
293
- ___
294
- <a id="blobtobase64string"></a>
295
-
296
- ### blobToBase64String
297
-
298
- ▸ **blobToBase64String**(blob: *`Blob`*): `Promise`<`string`>
299
-
300
- Convert a `Blob` to a binary string.
301
-
302
- Example:
303
-
304
- ```js
305
- blobUtil.blobToBase64String(blob).then(function (base64String) {
306
- // success
307
- }).catch(function (err) {
308
- // error
309
- });
310
- ```
311
-
312
- **Parameters:**
313
-
314
- | Param | Type | Description |
315
- | ------ | ------ | ------ |
316
- | blob | `Blob` | - |
317
-
318
- **Returns:** `Promise`<`string`>
319
- Promise that resolves with the binary string
320
-
321
- ___
322
- <a id="blobtobinarystring"></a>
323
-
324
- ### blobToBinaryString
325
-
326
- ▸ **blobToBinaryString**(blob: *`Blob`*): `Promise`<`string`>
327
-
328
- Convert a `Blob` to a binary string.
329
-
330
- Example:
331
-
332
- ```js
333
- blobUtil.blobToBinaryString(blob).then(function (binaryString) {
334
- // success
335
- }).catch(function (err) {
336
- // error
337
- });
338
- ```
339
-
340
- **Parameters:**
341
-
342
- | Param | Type | Description |
343
- | ------ | ------ | ------ |
344
- | blob | `Blob` | - |
345
-
346
- **Returns:** `Promise`<`string`>
347
- Promise that resolves with the binary string
348
-
349
- ___
350
- <a id="blobtodataurl"></a>
351
-
352
- ### blobToDataURL
353
-
354
- ▸ **blobToDataURL**(blob: *`Blob`*): `Promise`<`string`>
355
-
356
- Convert a `Blob` to a data URL string (e.g. `'data:image/png;base64,iVBORw0KG...'`).
357
-
358
- Example:
359
-
360
- ```js
361
- var dataURL = blobUtil.blobToDataURL(blob);
362
- ```
363
-
364
- **Parameters:**
365
-
366
- | Param | Type | Description |
367
- | ------ | ------ | ------ |
368
- | blob | `Blob` | - |
369
-
370
- **Returns:** `Promise`<`string`>
371
- Promise that resolves with the data URL string
372
-
373
- ___
374
- <a id="canvastoblob"></a>
375
-
376
- ### canvasToBlob
377
-
378
- ▸ **canvasToBlob**(canvas: *`HTMLCanvasElement`*, type?: *`string`*, quality?: *`number`*): `Promise`<`Blob`>
379
-
380
- Convert a `canvas` to a `Blob`.
381
-
382
- Examples:
383
-
384
- ```js
385
- blobUtil.canvasToBlob(canvas).then(function (blob) {
386
- // success
387
- }).catch(function (err) {
388
- // error
389
- });
390
- ```
391
-
392
- Most browsers support converting a canvas to both `'image/png'` and `'image/jpeg'`. You may also want to try `'image/webp'`, which will work in some browsers like Chrome (and in other browsers, will just fall back to `'image/png'`):
393
-
394
- ```js
395
- blobUtil.canvasToBlob(canvas, 'image/webp').then(function (blob) {
396
- // success
397
- }).catch(function (err) {
398
- // error
399
- });
400
- ```
401
-
402
- **Parameters:**
403
-
404
- | Param | Type | Description |
405
- | ------ | ------ | ------ |
406
- | canvas | `HTMLCanvasElement` | HTMLCanvasElement |
407
- | `Optional` type | `string` | the content type (optional, defaults to 'image/png') |
408
- | `Optional` quality | `number` | a number between 0 and 1 indicating image quality if the requested type is 'image/jpeg' or 'image/webp' |
409
-
410
- **Returns:** `Promise`<`Blob`>
411
- Promise that resolves with the `Blob`
412
-
413
- ___
414
- <a id="createblob"></a>
415
-
416
- ### createBlob
417
-
418
- ▸ **createBlob**(parts: *`Array`<`any`>*, properties?: * `BlobPropertyBag` &#124; `string`*): `Blob`
419
-
420
- Shim for [`new Blob()`](https://developer.mozilla.org/en-US/docs/Web/API/Blob.Blob) to support [older browsers that use the deprecated `BlobBuilder` API](http://caniuse.com/blob).
421
-
422
- Example:
423
-
424
- ```js
425
- var myBlob = blobUtil.createBlob(['hello world'], {type: 'text/plain'});
426
- ```
427
-
428
- **Parameters:**
429
-
430
- | Param | Type | Description |
431
- | ------ | ------ | ------ |
432
- | parts | `Array`<`any`> | content of the Blob |
433
- | `Optional` properties | `BlobPropertyBag` &#124; `string`| usually `{type: myContentType}`, you can also pass a string for the content type |
434
-
435
- **Returns:** `Blob`
436
- Blob
437
-
438
- ___
439
- <a id="createobjecturl"></a>
440
-
441
- ### createObjectURL
442
-
443
- ▸ **createObjectURL**(blob: *`Blob`*): `string`
444
-
445
- Shim for [`URL.createObjectURL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL.createObjectURL) to support browsers that only have the prefixed `webkitURL` (e.g. Android <4.4).
446
-
447
- Example:
448
-
449
- ```js
450
- var myUrl = blobUtil.createObjectURL(blob);
451
- ```
452
-
453
- **Parameters:**
454
-
455
- | Param | Type | Description |
456
- | ------ | ------ | ------ |
457
- | blob | `Blob` | - |
458
-
459
- **Returns:** `string`
460
- url
461
-
462
- ___
463
- <a id="dataurltoblob"></a>
464
-
465
- ### dataURLToBlob
466
-
467
- ▸ **dataURLToBlob**(dataURL: *`string`*): `Blob`
468
-
469
- Convert a data URL string (e.g. `'data:image/png;base64,iVBORw0KG...'`) to a `Blob`.
470
-
471
- Example:
472
-
473
- ```js
474
- var blob = blobUtil.dataURLToBlob(dataURL);
475
- ```
476
-
477
- **Parameters:**
478
-
479
- | Param | Type | Description |
480
- | ------ | ------ | ------ |
481
- | dataURL | `string` | dataURL-encoded string |
482
-
483
- **Returns:** `Blob`
484
- Blob
485
-
486
- ___
487
- <a id="imgsrctoblob"></a>
488
-
489
- ### imgSrcToBlob
490
-
491
- ▸ **imgSrcToBlob**(src: *`string`*, type?: *`string`*, crossOrigin?: *`string`*, quality?: *`number`*): `Promise`<`Blob`>
492
-
493
- Convert an image's `src` URL to a `Blob` by loading the image and painting it to a `canvas`.
494
-
495
- Note: this will coerce the image to the desired content type, and it will only paint the first frame of an animated GIF.
496
-
497
- Examples:
498
-
499
- ```js
500
- blobUtil.imgSrcToBlob('http://mysite.com/img.png').then(function (blob) {
501
- // success
502
- }).catch(function (err) {
503
- // error
504
- });
505
- ```
506
- ```js
507
- blobUtil.imgSrcToBlob('http://some-other-site.com/img.jpg', 'image/jpeg',
508
- 'Anonymous', 1.0).then(function (blob) {
509
- // success
510
- }).catch(function (err) {
511
- // error
512
- });
513
- ```
514
-
515
- **Parameters:**
516
-
517
- | Param | Type | Description |
518
- | ------ | ------ | ------ |
519
- | src | `string` | image src |
520
- | `Optional` type | `string` | the content type (optional, defaults to 'image/png') |
521
- | `Optional` crossOrigin | `string` | for CORS-enabled images, set this to 'Anonymous' to avoid "tainted canvas" errors |
522
- | `Optional` quality | `number` | a number between 0 and 1 indicating image quality if the requested type is 'image/jpeg' or 'image/webp' |
523
-
524
- **Returns:** `Promise`<`Blob`>
525
- Promise that resolves with the `Blob`
526
-
527
- ___
528
- <a id="imgsrctodataurl"></a>
529
-
530
- ### imgSrcToDataURL
531
-
532
- ▸ **imgSrcToDataURL**(src: *`string`*, type?: *`string`*, crossOrigin?: *`string`*, quality?: *`number`*): `Promise`<`string`>
533
-
534
- Convert an image's `src` URL to a data URL by loading the image and painting it to a `canvas`.
535
-
536
- Note: this will coerce the image to the desired content type, and it will only paint the first frame of an animated GIF.
537
-
538
- Examples:
539
-
540
- ```js
541
- blobUtil.imgSrcToDataURL('http://mysite.com/img.png').then(function (dataURL) {
542
- // success
543
- }).catch(function (err) {
544
- // error
545
- });
546
- ```
547
- ```js
548
- blobUtil.imgSrcToDataURL('http://some-other-site.com/img.jpg', 'image/jpeg',
549
- 'Anonymous', 1.0).then(function (dataURL) {
550
- // success
551
- }).catch(function (err) {
552
- // error
553
- });
554
- ```
555
-
556
- **Parameters:**
557
-
558
- | Param | Type | Description |
559
- | ------ | ------ | ------ |
560
- | src | `string` | image src |
561
- | `Optional` type | `string` | the content type (optional, defaults to 'image/png') |
562
- | `Optional` crossOrigin | `string` | for CORS-enabled images, set this to 'Anonymous' to avoid "tainted canvas" errors |
563
- | `Optional` quality | `number` | a number between 0 and 1 indicating image quality if the requested type is 'image/jpeg' or 'image/webp' |
564
-
565
- **Returns:** `Promise`<`string`>
566
- Promise that resolves with the data URL string
567
-
568
- ___
569
- <a id="revokeobjecturl"></a>
570
-
571
- ### revokeObjectURL
572
-
573
- ▸ **revokeObjectURL**(url: *`string`*): `void`
574
-
575
- Shim for [`URL.revokeObjectURL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL.revokeObjectURL) to support browsers that only have the prefixed `webkitURL` (e.g. Android <4.4).
576
-
577
- Example:
578
-
579
- ```js
580
- blobUtil.revokeObjectURL(myUrl);
581
- ```
582
-
583
- **Parameters:**
584
-
585
- | Param | Type | Description |
586
- | ------ | ------ | ------ |
587
- | url | `string` | |
588
-
589
- **Returns:** `void`
590
-
591
- ___
592
-
593
-
594
-
595
- <!-- end insert API -->
596
-
597
- Credits
598
- ----
599
-
600
- Thanks to the rest of [the PouchDB team](https://github.com/pouchdb/pouchdb/graphs/contributors) for figuring most of this crazy stuff out.
601
-
602
- Building the library
603
- ----
604
-
605
- npm install
606
- npm run build
607
-
608
- Testing the library
609
- ----
610
-
611
- npm install
612
-
613
- Then to test in the browser using Saucelabs:
614
-
615
- npm test
616
-
617
- Or to test locally in your browser of choice:
618
-
619
- npm run test-local
620
-
621
- To build the API docs and insert them in the README:
622
-
623
- npm run doc
@@ -1,57 +0,0 @@
1
- <a href="http://promisesaplus.com/">
2
- <img src="http://promisesaplus.com/assets/logo-small.png" alt="Promises/A+ logo"
3
- title="Promises/A+ 1.1 compliant" align="right" />
4
- </a>
5
-
6
-
7
- [![Build Status](https://travis-ci.org/petkaantonov/bluebird.svg?branch=master)](https://travis-ci.org/petkaantonov/bluebird)
8
- [![coverage-98%](https://img.shields.io/badge/coverage-98%25-brightgreen.svg?style=flat)](http://petkaantonov.github.io/bluebird/coverage/debug/index.html)
9
-
10
- **Got a question?** Join us on [stackoverflow](http://stackoverflow.com/questions/tagged/bluebird), the [mailing list](https://groups.google.com/forum/#!forum/bluebird-js) or chat on [IRC](https://webchat.freenode.net/?channels=#promises)
11
-
12
- # Introduction
13
-
14
- Bluebird is a fully featured promise library with focus on innovative features and performance
15
-
16
- See the [**bluebird website**](http://bluebirdjs.com/docs/getting-started.html) for further documentation, references and instructions. See the [**API reference**](http://bluebirdjs.com/docs/api-reference.html) here.
17
-
18
- For bluebird 2.x documentation and files, see the [2.x tree](https://github.com/petkaantonov/bluebird/tree/2.x).
19
-
20
- ### Note
21
-
22
- Promises in Node.js 10 are significantly faster than before. Bluebird still includes a lot of features like cancellation, iteration methods and warnings that native promises don't. If you are using Bluebird for performance rather than for those - please consider giving native promises a shot and running the benchmarks yourself.
23
-
24
- # Questions and issues
25
-
26
- The [github issue tracker](https://github.com/petkaantonov/bluebird/issues) is **_only_** for bug reports and feature requests. Anything else, such as questions for help in using the library, should be posted in [StackOverflow](http://stackoverflow.com/questions/tagged/bluebird) under tags `promise` and `bluebird`.
27
-
28
-
29
-
30
- ## Thanks
31
-
32
- Thanks to BrowserStack for providing us with a free account which lets us support old browsers like IE8.
33
-
34
- # License
35
-
36
- The MIT License (MIT)
37
-
38
- Copyright (c) 2013-2019 Petka Antonov
39
-
40
- Permission is hereby granted, free of charge, to any person obtaining a copy
41
- of this software and associated documentation files (the "Software"), to deal
42
- in the Software without restriction, including without limitation the rights
43
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
44
- copies of the Software, and to permit persons to whom the Software is
45
- furnished to do so, subject to the following conditions:
46
-
47
- The above copyright notice and this permission notice shall be included in
48
- all copies or substantial portions of the Software.
49
-
50
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
51
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
52
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
53
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
54
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
55
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
56
- THE SOFTWARE.
57
-