aboutsummaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string')
-rw-r--r--deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/index.js10
-rw-r--r--deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/license21
-rw-r--r--deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/package.json111
-rw-r--r--deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/readme.md49
4 files changed, 191 insertions, 0 deletions
diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/index.js b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/index.js
new file mode 100644
index 0000000000..ceaf65bfcf
--- /dev/null
+++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/index.js
@@ -0,0 +1,10 @@
+'use strict';
+const crypto = require('crypto');
+
+module.exports = len => {
+ if (!Number.isFinite(len)) {
+ throw new TypeError('Expected a finite number');
+ }
+
+ return crypto.randomBytes(Math.ceil(len / 2)).toString('hex').slice(0, len);
+};
diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/license b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/package.json b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/package.json
new file mode 100644
index 0000000000..7c707f898a
--- /dev/null
+++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/package.json
@@ -0,0 +1,111 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "crypto-random-string@^1.0.0",
+ "scope": null,
+ "escapedName": "crypto-random-string",
+ "name": "crypto-random-string",
+ "rawSpec": "^1.0.0",
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "/Users/ceej/code/Tools/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string"
+ ]
+ ],
+ "_from": "crypto-random-string@>=1.0.0 <2.0.0",
+ "_id": "crypto-random-string@1.0.0",
+ "_inCache": true,
+ "_location": "/update-notifier/configstore/unique-string/crypto-random-string",
+ "_nodeVersion": "4.6.1",
+ "_npmOperationalInternal": {
+ "host": "packages-18-east.internal.npmjs.com",
+ "tmp": "tmp/crypto-random-string-1.0.0.tgz_1479096882597_0.12821740517392755"
+ },
+ "_npmUser": {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ "_npmVersion": "2.15.9",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "crypto-random-string@^1.0.0",
+ "scope": null,
+ "escapedName": "crypto-random-string",
+ "name": "crypto-random-string",
+ "rawSpec": "^1.0.0",
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/update-notifier/configstore/unique-string"
+ ],
+ "_resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz",
+ "_shasum": "a230f64f568310e1498009940790ec99545bca7e",
+ "_shrinkwrap": null,
+ "_spec": "crypto-random-string@^1.0.0",
+ "_where": "/Users/ceej/code/Tools/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/crypto-random-string/issues"
+ },
+ "dependencies": {},
+ "description": "Generate a cryptographically strong random string",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "a230f64f568310e1498009940790ec99545bca7e",
+ "tarball": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "21960c996c3f77cf5f7bf6765e837e7c8a07e200",
+ "homepage": "https://github.com/sindresorhus/crypto-random-string#readme",
+ "keywords": [
+ "random",
+ "string",
+ "str",
+ "rand",
+ "text",
+ "id",
+ "identifier",
+ "slug",
+ "salt",
+ "crypto",
+ "strong",
+ "secure",
+ "hex"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ }
+ ],
+ "name": "crypto-random-string",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/crypto-random-string.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.0.0",
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/readme.md b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/readme.md
new file mode 100644
index 0000000000..dab5a2e9c2
--- /dev/null
+++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/readme.md
@@ -0,0 +1,49 @@
+# crypto-random-string [![Build Status](https://travis-ci.org/sindresorhus/crypto-random-string.svg?branch=master)](https://travis-ci.org/sindresorhus/crypto-random-string)
+
+> Generate a [cryptographically strong](https://en.m.wikipedia.org/wiki/Strong_cryptography) random string
+
+Can be useful for creating an identifier, slug, salt, fixture, etc.
+
+
+## Install
+
+```
+$ npm install --save crypto-random-string
+```
+
+
+## Usage
+
+```js
+const cryptoRandomString = require('crypto-random-string');
+
+cryptoRandomString(10);
+//=> '2cf05d94db'
+```
+
+
+## API
+
+### cryptoRandomString(length)
+
+#### length
+
+Type: `number`
+
+Length of the returned string.
+
+
+## Related
+
+- [random-int](https://github.com/sindresorhus/random-int) - Generate a random integer
+- [random-float](https://github.com/sindresorhus/random-float) - Generate a random float
+- [random-item](https://github.com/sindresorhus/random-item) - Get a random item from an array
+- [random-boolean](https://github.com/arthurvr/random-boolean) - Get a random boolean
+- [random-obj-key](https://github.com/sindresorhus/random-obj-key) - Get a random key from an object
+- [random-obj-prop](https://github.com/sindresorhus/random-obj-prop) - Get a random property from an object
+- [unique-random](https://github.com/sindresorhus/unique-random) - Generate random numbers that are consecutively unique
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)