D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
cpanel
/
ea-nodejs10
/
lib
/
node_modules
/
npm
/
node_modules
/
unique-slug
/
Filename :
index.js
back
Copy
'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') } }
Name
Size
Last Modified
Owner
Permissions
Actions
.npmignore
0.041
KB
September 13 2023 2:48:05
root
0644
.travis.yml
0.136
KB
September 13 2023 2:48:05
root
0644
README.md
0.448
KB
September 13 2023 2:48:05
root
0644
index.js
0.676
KB
September 13 2023 2:48:05
root
0644
package.json
1.47
KB
September 13 2023 2:48:05
root
0644
2017 © D7net | D704T team