$
This commit is contained in:
15
node_modules/unique-slug/LICENSE
generated
vendored
Normal file
15
node_modules/unique-slug/LICENSE
generated
vendored
Normal 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.
|
19
node_modules/unique-slug/README.md
generated
vendored
Normal file
19
node_modules/unique-slug/README.md
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
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 randomly generated bytes
|
||||
converted into 8 hexadecimal characters.
|
11
node_modules/unique-slug/lib/index.js
generated
vendored
Normal file
11
node_modules/unique-slug/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
'use strict'
|
||||
var MurmurHash3 = require('imurmurhash')
|
||||
|
||||
module.exports = function (uniq) {
|
||||
if (uniq) {
|
||||
var hash = new MurmurHash3(uniq)
|
||||
return ('00000000' + hash.result().toString(16)).slice(-8)
|
||||
} else {
|
||||
return (Math.random().toString(16) + '0000000').slice(2, 10)
|
||||
}
|
||||
}
|
44
node_modules/unique-slug/package.json
generated
vendored
Normal file
44
node_modules/unique-slug/package.json
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "unique-slug",
|
||||
"version": "3.0.0",
|
||||
"description": "Generate a unique character string suitible for use in files and URLs.",
|
||||
"main": "lib/index.js",
|
||||
"scripts": {
|
||||
"test": "tap",
|
||||
"lint": "eslint \"**/*.js\"",
|
||||
"postlint": "template-oss-check",
|
||||
"template-oss-apply": "template-oss-apply --force",
|
||||
"lintfix": "npm run lint -- --fix",
|
||||
"preversion": "npm test",
|
||||
"postversion": "npm publish",
|
||||
"prepublishOnly": "git push origin --follow-tags",
|
||||
"snap": "tap",
|
||||
"posttest": "npm run lint"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "GitHub Inc.",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@npmcli/eslint-config": "^3.1.0",
|
||||
"@npmcli/template-oss": "3.5.0",
|
||||
"tap": "^16.3.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/npm/unique-slug.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"imurmurhash": "^0.1.4"
|
||||
},
|
||||
"files": [
|
||||
"bin/",
|
||||
"lib/"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
|
||||
},
|
||||
"templateOSS": {
|
||||
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
||||
"version": "3.5.0"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user