replace jest with ava
This commit is contained in:
parent
27cc8b23fe
commit
0347b72305
11775 changed files with 84546 additions and 1440575 deletions
10
node_modules/crypto-random-string/index.js
generated
vendored
Normal file
10
node_modules/crypto-random-string/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
'use strict';
|
||||
const crypto = require('crypto');
|
||||
|
||||
module.exports = length => {
|
||||
if (!Number.isFinite(length)) {
|
||||
throw new TypeError('Expected a finite number');
|
||||
}
|
||||
|
||||
return crypto.randomBytes(Math.ceil(length / 2)).toString('hex').slice(0, length);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue