We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c846f0 commit ccfba54Copy full SHA for ccfba54
lib/base64id.js
@@ -78,7 +78,7 @@ Base64Id.prototype.getRandomBytes = function(bytes) {
78
*/
79
80
Base64Id.prototype.generateId = function () {
81
- var rand = new Buffer(15); // multiple of 3 for base64
+ var rand = Buffer.alloc(15); // multiple of 3 for base64
82
if (!rand.writeInt32BE) {
83
return Math.abs(Math.random() * Math.random() * Date.now() | 0).toString()
84
+ Math.abs(Math.random() * Math.random() * Date.now() | 0).toString();
package.json
@@ -9,5 +9,5 @@
9
, "url": "https://github.com/faeldt/base64id.git"
10
}
11
, "main": "./lib/base64id.js"
12
- , "engines": { "node": ">= 0.4.0" }
+ , "engines": { "node": "^4.5.0 || >= 5.9" }
13
0 commit comments