forked from javascript-obfuscator/javascript-obfuscator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUtilsModule.ts
More file actions
34 lines (28 loc) · 1.33 KB
/
Copy pathUtilsModule.ts
File metadata and controls
34 lines (28 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { ContainerModule, interfaces } from 'inversify';
import { ServiceIdentifiers } from '../../ServiceIdentifiers';
import { IArrayUtils } from '../../../interfaces/utils/IArrayUtils';
import { ICryptUtils } from '../../../interfaces/utils/ICryptUtils';
import { IEscapeSequenceEncoder } from '../../../interfaces/utils/IEscapeSequenceEncoder';
import { IRandomGenerator } from '../../../interfaces/utils/IRandomGenerator';
import { ArrayUtils } from '../../../utils/ArrayUtils';
import { CryptUtils } from '../../../utils/CryptUtils';
import { EscapeSequenceEncoder } from '../../../utils/EscapeSequenceEncoder';
import { RandomGenerator } from '../../../utils/RandomGenerator';
export const utilsModule: interfaces.ContainerModule = new ContainerModule((bind: interfaces.Bind) => {
// array utils
bind<IArrayUtils>(ServiceIdentifiers.IArrayUtils)
.to(ArrayUtils)
.inSingletonScope();
// random generator
bind<IRandomGenerator>(ServiceIdentifiers.IRandomGenerator)
.to(RandomGenerator)
.inSingletonScope();
// crypt utils
bind<ICryptUtils>(ServiceIdentifiers.ICryptUtils)
.to(CryptUtils)
.inSingletonScope();
// escape sequence encoder
bind<IEscapeSequenceEncoder>(ServiceIdentifiers.IEscapeSequenceEncoder)
.to(EscapeSequenceEncoder)
.inSingletonScope();
});