javascript-obfuscator: Provides its own types (#39591)

This commit is contained in:
Alexander T
2019-10-28 21:00:13 -07:00
committed by Jesse Trinity
parent 93227e4c39
commit d69941b4f1
5 changed files with 6 additions and 144 deletions
+6
View File
@@ -1848,6 +1848,12 @@
"sourceRepoURL": "https://github.com/JamieMason/Jasmine-Matchers",
"asOfVersion": "3.8.1"
},
{
"libraryName": "javascript-obfuscator",
"typingsPackageName": "javascript-obfuscator",
"sourceRepoURL": "https://github.com/sanex3339/javascript-obfuscator",
"asOfVersion": "0.17.0"
},
{
"libraryName": "jdenticon",
"typingsPackageName": "jdenticon",
-25
View File
@@ -1,25 +0,0 @@
// Type definitions for javascript-obfuscator
// Project: https://github.com/sanex3339/javascript-obfuscator
// Definitions by: sanex3339 <https://github.com/sanex3339>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module 'javascript-obfuscator' {
export interface IOptions {
compact?: boolean;
debugProtection?: boolean;
debugProtectionInterval?: boolean;
disableConsoleOutput?: boolean;
encodeUnicodeLiterals?: boolean;
reservedNames?: string[];
rotateUnicodeArray?: boolean;
selfDefending?: boolean;
unicodeArray?: boolean;
unicodeArrayThreshold?: number;
wrapUnicodeArrayCalls?: boolean;
[id: string]: any;
}
export class JavaScriptObfuscator {
public static obfuscate (sourceCode: string, customOptions?: IOptions): string;
}
}
@@ -1,16 +0,0 @@
import { JavaScriptObfuscator } from 'javascript-obfuscator';
let sourceCode1: string = JavaScriptObfuscator.obfuscate('var foo = 1;');
let sourceCode2: string = JavaScriptObfuscator.obfuscate('var foo = 1;', {
compact: true,
debugProtection: false,
debugProtectionInterval: false,
disableConsoleOutput: true,
encodeUnicodeLiterals: false,
reservedNames: ['^foo$'],
rotateUnicodeArray: true,
selfDefending: true,
unicodeArray: true,
unicodeArrayThreshold: 0.8,
wrapUnicodeArrayCalls: true
});
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"javascript-obfuscator-tests.ts"
]
}
-80
View File
@@ -1,80 +0,0 @@
{
"extends": "dtslint/dt.json",
"rules": {
"adjacent-overload-signatures": false,
"array-type": false,
"arrow-return-shorthand": false,
"ban-types": false,
"callable-types": false,
"comment-format": false,
"dt-header": false,
"npm-naming": false,
"eofline": false,
"export-just-namespace": false,
"import-spacing": false,
"interface-name": false,
"interface-over-type-literal": false,
"jsdoc-format": false,
"max-line-length": false,
"member-access": false,
"new-parens": false,
"no-any-union": false,
"no-boolean-literal-compare": false,
"no-conditional-assignment": false,
"no-consecutive-blank-lines": false,
"no-construct": false,
"no-declare-current-package": false,
"no-duplicate-imports": false,
"no-duplicate-variable": false,
"no-empty-interface": false,
"no-for-in-array": false,
"no-inferrable-types": false,
"no-internal-module": false,
"no-irregular-whitespace": false,
"no-mergeable-namespace": false,
"no-misused-new": false,
"no-namespace": false,
"no-object-literal-type-assertion": false,
"no-padding": false,
"no-redundant-jsdoc": false,
"no-redundant-jsdoc-2": false,
"no-redundant-undefined": false,
"no-reference-import": false,
"no-relative-import-in-test": false,
"no-self-import": false,
"no-single-declare-module": false,
"no-string-throw": false,
"no-unnecessary-callback-wrapper": false,
"no-unnecessary-class": false,
"no-unnecessary-generics": false,
"no-unnecessary-qualifier": false,
"no-unnecessary-type-assertion": false,
"no-useless-files": false,
"no-var-keyword": false,
"no-var-requires": false,
"no-void-expression": false,
"no-trailing-whitespace": false,
"object-literal-key-quotes": false,
"object-literal-shorthand": false,
"one-line": false,
"one-variable-per-declaration": false,
"only-arrow-functions": false,
"prefer-conditional-expression": false,
"prefer-const": false,
"prefer-declare-function": false,
"prefer-for-of": false,
"prefer-method-signature": false,
"prefer-template": false,
"radix": false,
"semicolon": false,
"space-before-function-paren": false,
"space-within-parens": false,
"strict-export-declare-modifiers": false,
"trim-file": false,
"triple-equals": false,
"typedef-whitespace": false,
"unified-signatures": false,
"void-return": false,
"whitespace": false
}
}