Prepare v2

This commit is contained in:
Domen Kožar 2019-10-02 16:37:41 +02:00
parent 7f8f39bf55
commit ec26e2d682
No known key found for this signature in database
GPG key ID: C2FFBCAFD2C24246
172 changed files with 13496 additions and 4 deletions

25
node_modules/uuid/lib/sha1.js generated vendored Normal file
View file

@ -0,0 +1,25 @@
'use strict';
var crypto = require('crypto');
function sha1(bytes) {
if (typeof Buffer.from === 'function') {
// Modern Buffer API
if (Array.isArray(bytes)) {
bytes = Buffer.from(bytes);
} else if (typeof bytes === 'string') {
bytes = Buffer.from(bytes, 'utf8');
}
} else {
// Pre-v4 Buffer API
if (Array.isArray(bytes)) {
bytes = new Buffer(bytes);
} else if (typeof bytes === 'string') {
bytes = new Buffer(bytes, 'utf8');
}
}
return crypto.createHash('sha1').update(bytes).digest();
}
module.exports = sha1;