mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-21 14:13:36 +08:00
docs:更新文档
This commit is contained in:
1
node_modules/string-hash/.npmignore
generated
vendored
Normal file
1
node_modules/string-hash/.npmignore
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/node_modules
|
||||
22
node_modules/string-hash/README.md
generated
vendored
Normal file
22
node_modules/string-hash/README.md
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
string-hash
|
||||
===========
|
||||
|
||||
A fast string hashing function for Node.JS. The particular algorithm is quite
|
||||
similar to `djb2`, by Dan Bernstein and available
|
||||
[here](http://www.cse.yorku.ca/~oz/hash.html). Differences include iterating
|
||||
over the string *backwards* (as that is faster in JavaScript) and using the XOR
|
||||
operator instead of the addition operator (as described at that page and
|
||||
because it obviates the need for modular arithmetic in JavaScript).
|
||||
|
||||
The hashing function returns a number between 0 and 4294967295 (inclusive).
|
||||
|
||||
Thanks to [cscott](https://github.com/cscott) for reminding us how integers
|
||||
work in JavaScript.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
To the extend possible by law, The Dark Sky Company, LLC has [waived all
|
||||
copyright and related or neighboring rights][cc0] to this library.
|
||||
|
||||
[cc0]: http://creativecommons.org/publicdomain/zero/1.0/
|
||||
20
node_modules/string-hash/component.json
generated
vendored
Normal file
20
node_modules/string-hash/component.json
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "string-hash",
|
||||
"repo": "darkskyapp/string-hash",
|
||||
"description": "fast string hashing function",
|
||||
"version": "1.1.1",
|
||||
"keywords": [
|
||||
"string",
|
||||
"hashing"
|
||||
],
|
||||
"dependencies": {},
|
||||
"development": {
|
||||
"mocha": "1.3.x"
|
||||
},
|
||||
"license": "CC0",
|
||||
"main": "index.js",
|
||||
"scripts": [
|
||||
"index.js"
|
||||
],
|
||||
"remotes": []
|
||||
}
|
||||
17
node_modules/string-hash/index.js
generated
vendored
Normal file
17
node_modules/string-hash/index.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
function hash(str) {
|
||||
var hash = 5381,
|
||||
i = str.length;
|
||||
|
||||
while(i) {
|
||||
hash = (hash * 33) ^ str.charCodeAt(--i);
|
||||
}
|
||||
|
||||
/* JavaScript does bitwise operations (like XOR, above) on 32-bit signed
|
||||
* integers. Since we want the results to be always positive, convert the
|
||||
* signed int to an unsigned by doing an unsigned bitshift. */
|
||||
return hash >>> 0;
|
||||
}
|
||||
|
||||
module.exports = hash;
|
||||
59
node_modules/string-hash/package.json
generated
vendored
Normal file
59
node_modules/string-hash/package.json
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"string-hash@1.1.3",
|
||||
"J:\\Github\\CURD-TS"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "string-hash@1.1.3",
|
||||
"_id": "string-hash@1.1.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs=",
|
||||
"_location": "/string-hash",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "string-hash@1.1.3",
|
||||
"name": "string-hash",
|
||||
"escapedName": "string-hash",
|
||||
"rawSpec": "1.1.3",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.1.3"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/postcss-modules"
|
||||
],
|
||||
"_resolved": "http://192.168.250.101:4873/string-hash/-/string-hash-1.1.3.tgz",
|
||||
"_spec": "1.1.3",
|
||||
"_where": "J:\\Github\\CURD-TS",
|
||||
"author": {
|
||||
"name": "The Dark Sky Company",
|
||||
"email": "developer@darksky.net"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/darkskyapp/string-hash/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "fast string hashing function",
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"homepage": "https://github.com/darkskyapp/string-hash#readme",
|
||||
"keywords": [
|
||||
"string",
|
||||
"hashing"
|
||||
],
|
||||
"license": "CC0-1.0",
|
||||
"main": "./index",
|
||||
"name": "string-hash",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/darkskyapp/string-hash.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "1.1.3"
|
||||
}
|
||||
13
node_modules/string-hash/test.js
generated
vendored
Normal file
13
node_modules/string-hash/test.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
var assert = require("assert"),
|
||||
hash = require("./");
|
||||
|
||||
describe("hash", function() {
|
||||
it("should hash \"Mary had a little lamb.\" to 1766333550", function() {
|
||||
assert.equal(hash("Mary had a little lamb."), 1766333550);
|
||||
});
|
||||
|
||||
it("should hash \"Hello, world!\" to 343662184", function() {
|
||||
assert.equal(hash("Hello, world!"), 343662184);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user