fix(core): update

This commit is contained in:
2020-12-31 04:25:31 +00:00
parent bd20512b10
commit 2bd1741893
4 changed files with 13 additions and 13 deletions

View File

@ -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();
};

View File

@ -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
}