feat: support crypto-js as an inbuilt library

This commit is contained in:
Anoop M D 2023-01-29 12:34:37 +05:30
parent d89f12c071
commit cd36335c60
2 changed files with 4 additions and 0 deletions

View File

@ -21,6 +21,7 @@
"axios": "^0.26.0",
"btoa": "^1.2.1",
"chokidar": "^3.5.3",
"crypto-js": "^4.1.1",
"electron-is-dev": "^2.0.0",
"electron-store": "^8.1.0",
"electron-util": "^0.17.2",

View File

@ -6,6 +6,7 @@ const _ = require('lodash');
const moment = require('moment');
const uuid = require('uuid');
const nanoid = require('nanoid');
const CryptoJS = require('crypto-js');
class Bru {
constructor(environment) {
@ -26,6 +27,8 @@ class Bru {
return uuid;
case 'nanoid':
return nanoid;
case 'crypto-js':
return CryptoJS;
default:
throw new Error(`Module ${module} is not supported`);
}