fix(core): update
This commit is contained in:
@ -25,5 +25,5 @@ export const createRandomString = (
|
||||
* @param lengthArg the length of the crypto string
|
||||
*/
|
||||
export const createCryptoRandomString = (lengthArg: number): string => {
|
||||
return plugins.nanoid(lengthArg);
|
||||
return plugins.isounique.uni();
|
||||
};
|
||||
|
@ -1,12 +1,19 @@
|
||||
// node native
|
||||
import * as smartenv from '@pushrocks/smartenv';
|
||||
const smartenvInstance = new smartenv.Smartenv();
|
||||
const crypto = smartenvInstance.getSafeNodeModule('crypto');
|
||||
|
||||
// node native
|
||||
const crypto = smartenvInstance.getSafeNodeModule('crypto');
|
||||
import * as url from 'url';
|
||||
|
||||
export { crypto, url };
|
||||
|
||||
// pushrocks scope
|
||||
import * as isounique from '@pushrocks/isounique';
|
||||
|
||||
export {
|
||||
isounique
|
||||
};
|
||||
|
||||
// third party
|
||||
const jsBase64 = require('js-base64').Base64;
|
||||
|
||||
@ -14,12 +21,11 @@ const stripIndent = require('strip-indent');
|
||||
const normalizeNewline = require('normalize-newline');
|
||||
const randomatic = require('randomatic');
|
||||
|
||||
import { nanoid } from 'nanoid';
|
||||
|
||||
|
||||
export {
|
||||
jsBase64,
|
||||
stripIndent,
|
||||
normalizeNewline,
|
||||
randomatic,
|
||||
nanoid
|
||||
}
|
||||
|
Reference in New Issue
Block a user