nanoid
Advanced tools
Comparing version 3.1.3 to 3.1.4
# Change Log | ||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
## 3.1.4 | ||
* Restrict old Node.js 13 by `engines.node` (by Cansin Yildiz). | ||
## 3.1.3 | ||
@@ -5,0 +8,0 @@ * Fix ES modules issue with CLI. |
@@ -19,3 +19,3 @@ // This file replaces `index.js` in bundlers like webpack or Rollup, | ||
throw new Error( | ||
'Add self.crypto = self.msCrypto before Nano ID to fix IE 11 support' | ||
'Add window.crypto = window.msCrypto before Nano ID to fix IE 11 support' | ||
) | ||
@@ -22,0 +22,0 @@ } |
{ | ||
"name": "nanoid", | ||
"version": "3.1.3", | ||
"version": "3.1.4", | ||
"description": "A tiny (108 bytes), secure URL-friendly unique string ID generator", | ||
@@ -11,2 +11,5 @@ "keywords": [ | ||
], | ||
"engines": { | ||
"node": "^10 || ^12 || >=13.7" | ||
}, | ||
"author": "Andrey Sitnik <andrey@sitnik.ru>", | ||
@@ -13,0 +16,0 @@ "license": "MIT", |
@@ -26,6 +26,7 @@ # Nano ID | ||
Supports modern browsers, IE with Babel, Node.js and React Native. | ||
Supports modern browsers, IE [with Babel], Node.js and React Native. | ||
Try to make us smaller in the [online tool]. | ||
[online tool]: https://gitpod.io/#https://github.com/ai/nanoid/ | ||
[with Babel]: https://developer.epages.com/blog/coding/how-to-transpile-node-modules-with-babel-and-webpack-in-a-monorepo/ | ||
[Size Limit]: https://github.com/ai/size-limit | ||
@@ -46,2 +47,3 @@ | ||
* [JS](#js) | ||
* [IE](#ie) | ||
* [React](#react) | ||
@@ -112,3 +114,3 @@ * [Create React App](#create-react-app) | ||
* [`nanoid-dictionary`] with popular alphabets to use with `customAlphabet`. | ||
* [`nanoid-good`] to be sure that your ID doesn't contain any obscene words. | ||
* [`nanoid-good`] to be sure that your ID doesn’t contain any obscene words. | ||
@@ -173,2 +175,16 @@ [`nanoid-dictionary`]: https://github.com/CyberAP/nanoid-dictionary | ||
### IE | ||
If you support IE, you need to [transpile `node_modules`] by Babel | ||
and add `crypto` alias: | ||
```js | ||
window.crypto = window.msCrypto | ||
import { nanoid } from 'nanoid' | ||
``` | ||
[transpile `node_modules`]: https://developer.epages.com/blog/coding/how-to-transpile-node-modules-with-babel-and-webpack-in-a-monorepo/ | ||
### React | ||
@@ -286,3 +302,3 @@ | ||
Security is important in IDs, when IDs should be unpredictable. | ||
Security is important in IDs when IDs should be unpredictable. | ||
For instance, in "access by URL" link generation. | ||
@@ -289,0 +305,0 @@ If you do not need unpredictable IDs, but you need to use Web Workers, |
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
44342
459