mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Dependencies update
This commit is contained in:
@@ -157,7 +157,7 @@ function wrapInitializableProperty (target: IInitializable, propertyKey: string
|
||||
|
||||
initializablePropertiesSet.add(propertyKey);
|
||||
|
||||
const initializablePropertyMetadataKey: string = `_${propertyKey}`;
|
||||
const initializablePropertyMetadataKey: string = `_${propertyKey.toString()}`;
|
||||
const propertyDescriptor: PropertyDescriptor = Object
|
||||
.getOwnPropertyDescriptor(target, initializablePropertyMetadataKey) || defaultDescriptor;
|
||||
|
||||
@@ -165,7 +165,7 @@ function wrapInitializableProperty (target: IInitializable, propertyKey: string
|
||||
...propertyDescriptor,
|
||||
get: function (): any {
|
||||
if (this[initializablePropertyMetadataKey] === undefined) {
|
||||
throw new Error(`Property \`${propertyKey}\` is not initialized! Initialize it first!`);
|
||||
throw new Error(`Property \`${propertyKey.toString()}\` is not initialized! Initialize it first!`);
|
||||
}
|
||||
|
||||
return this[initializablePropertyMetadataKey];
|
||||
|
||||
@@ -56,6 +56,8 @@ export class CryptUtils implements ICryptUtils {
|
||||
// tslint:enable
|
||||
|
||||
/**
|
||||
* Hides string inside a other random string with larger length
|
||||
*
|
||||
* @param {string} str
|
||||
* @param {number} length
|
||||
* @returns {[string , string]}
|
||||
@@ -87,7 +89,8 @@ export class CryptUtils implements ICryptUtils {
|
||||
|
||||
let randomStringDiff: string = randomString.replace(
|
||||
new RegExp(`[${escapeRegExp(str)}]`, 'g'),
|
||||
'');
|
||||
''
|
||||
);
|
||||
|
||||
const randomStringDiffArray: string[] = randomStringDiff.split('');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user