node_modules

This commit is contained in:
saeid
2019-07-15 13:07:31 +04:30
parent d3735c6d30
commit ce1a3ebf9c
35713 changed files with 3639219 additions and 1 deletions
+11
View File
@@ -0,0 +1,11 @@
language: node_js
sudo: false
before_install:
- "npm -g install npm"
node_js:
- "0.8"
- "0.10"
- "0.12"
- "iojs"
- "4"
- "5"
+15
View File
@@ -0,0 +1,15 @@
The ISC License
Copyright npm, Inc
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+20
View File
@@ -0,0 +1,20 @@
unique-slug
===========
Generate a unique character string suitible for use in files and URLs.
```
var uniqueSlug = require('unique-slug')
var randomSlug = uniqueSlug()
var fileSlug = uniqueSlug('/etc/passwd')
```
### uniqueSlug(*str*) → String (8 chars)
If *str* is passed in then the return value will be its murmur hash in
hex.
If *str* is not passed in, it will be 4 bytes coverted into 8 hex
characters, generated by `crypto.pseudoRandomBytes`.
+19
View File
@@ -0,0 +1,19 @@
'use strict'
var crypto = require('crypto')
var MurmurHash3 = require('imurmurhash')
module.exports = function (uniq) {
if (uniq) {
var hash = new MurmurHash3(uniq)
return ('00000000' + hash.result().toString(16)).substr(-8)
} else {
// Called without a callback, because this interface should neither block
// nor error (by contrast with randomBytes which will throw an exception
// without enough entropy).
//
// However, due to a change in Node 0.10.27+, pseudoRandomBytes is now the
// same as randomBytes, and may in fact block in situations where
// insufficent entropy is available.
return crypto.pseudoRandomBytes(4).toString('hex')
}
}
+56
View File
@@ -0,0 +1,56 @@
{
"_from": "unique-slug@^2.0.0",
"_id": "unique-slug@2.0.1",
"_inBundle": false,
"_integrity": "sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==",
"_location": "/unique-slug",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "unique-slug@^2.0.0",
"name": "unique-slug",
"escapedName": "unique-slug",
"rawSpec": "^2.0.0",
"saveSpec": null,
"fetchSpec": "^2.0.0"
},
"_requiredBy": [
"/unique-filename"
],
"_resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.1.tgz",
"_shasum": "5e9edc6d1ce8fb264db18a507ef9bd8544451ca6",
"_spec": "unique-slug@^2.0.0",
"_where": "D:\\Atom\\Git\\Laravel_CSSd\\node_modules\\unique-filename",
"author": {
"name": "Rebecca Turner",
"email": "me@re-becca.org",
"url": "http://re-becca.org"
},
"bugs": {
"url": "https://github.com/iarna/unique-slug/issues"
},
"bundleDependencies": false,
"dependencies": {
"imurmurhash": "^0.1.4"
},
"deprecated": false,
"description": "Generate a unique character string suitible for use in files and URLs.",
"devDependencies": {
"standard": "^5.4.1",
"tap": "^2.3.1"
},
"homepage": "https://github.com/iarna/unique-slug#readme",
"keywords": [],
"license": "ISC",
"main": "index.js",
"name": "unique-slug",
"repository": {
"type": "git",
"url": "git://github.com/iarna/unique-slug.git"
},
"scripts": {
"test": "standard && tap --coverage test"
},
"version": "2.0.1"
}
+13
View File
@@ -0,0 +1,13 @@
'use strict'
var t = require('tap')
var uniqueSlug = require('../index.js')
t.plan(5)
var slugA = uniqueSlug()
t.is(slugA.length, 8, 'random slugs are 8 chars')
t.notEqual(slugA, uniqueSlug(), "two slugs aren't the same")
var base = '/path/to/thingy'
var slugB = uniqueSlug(base)
t.is(slugB.length, 8, 'string based slugs are 8 chars')
t.is(slugB, uniqueSlug(base), 'two string based slugs, from the same string are the same')
t.notEqual(slugB, uniqueSlug(slugA), 'two string based slongs, from diff strings are different')