smartstring/ts/smartstring.plugins.ts

24 lines
641 B
TypeScript
Raw Normal View History

2020-12-31 04:42:46 +00:00
// node native
2020-12-31 03:56:40 +00:00
import * as smartenv from '@pushrocks/smartenv';
const smartenvInstance = new smartenv.Smartenv();
2020-12-31 04:25:31 +00:00
const crypto = smartenvInstance.getSafeNodeModule('crypto');
2020-12-31 04:42:46 +00:00
2019-04-16 06:54:27 +00:00
import * as url from 'url';
2019-01-12 19:41:01 +00:00
2019-04-16 06:55:37 +00:00
export { crypto, url };
2019-01-12 19:41:01 +00:00
// third party
2020-12-31 04:11:33 +00:00
const jsBase64 = require('js-base64').Base64;
2017-10-05 13:55:59 +00:00
2020-12-31 04:11:33 +00:00
const stripIndent = require('strip-indent');
const normalizeNewline = require('normalize-newline');
2020-12-31 04:42:46 +00:00
const randomatic = smartenvInstance.getSafeNodeModule('randomatic');
const cryptoRandomString = smartenvInstance.getSafeNodeModule('crypto-random-string');
2020-12-31 04:11:33 +00:00
export {
jsBase64,
stripIndent,
normalizeNewline,
randomatic,
2020-12-31 04:42:46 +00:00
cryptoRandomString
}