nanoid 3.1.11 → 3.1.12

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.

Potentially problematic release.


This version of nanoid might be problematic. Click here for more details.

package/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Change Log
2
2
  This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
+ ## 3.1.12
5
+ * Improve IE 11 docs.
6
+
4
7
  ## 3.1.11
5
8
  * Fixed asynchronous `customAlphabet` in browser (by @LoneRifle).
6
9
 
package/README.md CHANGED
@@ -175,10 +175,14 @@ If you support IE, you need to [transpile `node_modules`] by Babel
175
175
  and add `crypto` alias:
176
176
 
177
177
  ```js
178
+ // polyfills.js
178
179
  if (!window.crypto) {
179
180
  window.crypto = window.msCrypto
180
181
  }
182
+ ```
181
183
 
184
+ ```js
185
+ import './polyfills.js'
182
186
  import { nanoid } from 'nanoid'
183
187
  ```
184
188
 
package/index.browser.js CHANGED
@@ -20,8 +20,8 @@ if (process.env.NODE_ENV !== 'production') {
20
20
  }
21
21
  if (typeof msCrypto !== 'undefined' && typeof crypto === 'undefined') {
22
22
  throw new Error(
23
- 'Add `if (!window.crypto) window.crypto = window.msCrypto` ' +
24
- 'before Nano ID to fix IE 11 support'
23
+ 'Import file with `if (!window.crypto) window.crypto = window.msCrypto`' +
24
+ ' before importing Nano ID to fix IE 11 support'
25
25
  )
26
26
  }
27
27
  if (typeof crypto === 'undefined') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nanoid",
3
- "version": "3.1.11",
3
+ "version": "3.1.12",
4
4
  "description": "A tiny (108 bytes), secure URL-friendly unique string ID generator",
5
5
  "keywords": [
6
6
  "uuid",