@contrast/common 1.21.1 → 1.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/primordials.d.ts +21 -16
- package/lib/primordials.js +10 -8
- package/lib/primordials.js.map +1 -1
- package/package.json +1 -1
package/lib/primordials.d.ts
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
export declare const ArrayPrototypeJoin: (separator?: string | undefined) => string;
|
|
3
3
|
export declare const ArrayPrototypeSlice: (start?: number | undefined, end?: number | undefined) => any[];
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
(splitter: {
|
|
11
|
-
[Symbol.split](string: string, limit?: number | undefined): string[];
|
|
12
|
-
}, limit?: number | undefined): string[];
|
|
4
|
+
export declare const StringPrototypeConcat: (...strings: string[]) => string;
|
|
5
|
+
export declare const StringPrototypeMatch: {
|
|
6
|
+
(regexp: string | RegExp): RegExpMatchArray | null;
|
|
7
|
+
(matcher: {
|
|
8
|
+
[Symbol.match](string: string): RegExpMatchArray | null;
|
|
9
|
+
}): RegExpMatchArray | null;
|
|
13
10
|
};
|
|
14
|
-
export declare const
|
|
11
|
+
export declare const StringPrototypeMatchAll: (regexp: RegExp) => IterableIterator<RegExpMatchArray>;
|
|
15
12
|
export declare const StringPrototypeReplace: {
|
|
16
13
|
(searchValue: string | RegExp, replaceValue: string): string;
|
|
17
14
|
(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
|
|
@@ -22,14 +19,22 @@ export declare const StringPrototypeReplace: {
|
|
|
22
19
|
[Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;
|
|
23
20
|
}, replacer: (substring: string, ...args: any[]) => string): string;
|
|
24
21
|
};
|
|
25
|
-
export declare const
|
|
26
|
-
(
|
|
27
|
-
(
|
|
28
|
-
[Symbol.match](string: string): RegExpMatchArray | null;
|
|
29
|
-
}): RegExpMatchArray | null;
|
|
22
|
+
export declare const StringPrototypeReplaceAll: {
|
|
23
|
+
(searchValue: string | RegExp, replaceValue: string): string;
|
|
24
|
+
(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
|
|
30
25
|
};
|
|
31
|
-
export declare const StringPrototypeMatchAll: (regexp: RegExp) => IterableIterator<RegExpMatchArray>;
|
|
32
26
|
export declare const StringPrototypeSlice: (start?: number | undefined, end?: number | undefined) => string;
|
|
27
|
+
export declare const StringPrototypeSplit: {
|
|
28
|
+
(separator: string | RegExp, limit?: number | undefined): string[];
|
|
29
|
+
(splitter: {
|
|
30
|
+
[Symbol.split](string: string, limit?: number | undefined): string[];
|
|
31
|
+
}, limit?: number | undefined): string[];
|
|
32
|
+
};
|
|
33
|
+
export declare const StringPrototypeSubstr: (from: number, length?: number | undefined) => string;
|
|
34
|
+
export declare const StringPrototypeSubstring: (start: number, end?: number | undefined) => string;
|
|
35
|
+
export declare const StringPrototypeToLowerCase: () => string;
|
|
36
|
+
export declare const StringPrototypeToUpperCase: () => string;
|
|
37
|
+
export declare const StringPrototypeTrim: () => string;
|
|
33
38
|
export declare const RegExpPrototypeTest: (string: string) => boolean;
|
|
34
39
|
export declare const RegExpPrototypeExec: (string: string) => RegExpExecArray | null;
|
|
35
40
|
export declare const JSONStringify: {
|
package/lib/primordials.js
CHANGED
|
@@ -14,23 +14,25 @@
|
|
|
14
14
|
* way not consistent with the End User License Agreement.
|
|
15
15
|
*/
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.UtilInspect = exports.JSONStringify = exports.RegExpPrototypeExec = exports.RegExpPrototypeTest = exports.
|
|
17
|
+
exports.UtilInspect = exports.JSONStringify = exports.RegExpPrototypeExec = exports.RegExpPrototypeTest = exports.StringPrototypeTrim = exports.StringPrototypeToUpperCase = exports.StringPrototypeToLowerCase = exports.StringPrototypeSubstring = exports.StringPrototypeSubstr = exports.StringPrototypeSplit = exports.StringPrototypeSlice = exports.StringPrototypeReplaceAll = exports.StringPrototypeReplace = exports.StringPrototypeMatchAll = exports.StringPrototypeMatch = exports.StringPrototypeConcat = exports.ArrayPrototypeSlice = exports.ArrayPrototypeJoin = void 0;
|
|
18
18
|
// arrays
|
|
19
19
|
exports.ArrayPrototypeJoin = Array.prototype.join;
|
|
20
20
|
exports.ArrayPrototypeSlice = Array.prototype.slice;
|
|
21
21
|
// strings
|
|
22
|
-
exports.
|
|
23
|
-
exports.StringPrototypeSubstr = String.prototype.substr;
|
|
24
|
-
exports.StringPrototypeToLowerCase = String.prototype.toLowerCase;
|
|
25
|
-
exports.StringPrototypeToUpperCase = String.prototype.toUpperCase;
|
|
26
|
-
exports.StringPrototypeSplit = String.prototype.split;
|
|
27
|
-
exports.StringPrototypeTrim = String.prototype.trim;
|
|
28
|
-
exports.StringPrototypeReplace = String.prototype.replace;
|
|
22
|
+
exports.StringPrototypeConcat = String.prototype.concat;
|
|
29
23
|
exports.StringPrototypeMatch = String.prototype.match;
|
|
30
24
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
31
25
|
// @ts-ignore
|
|
32
26
|
exports.StringPrototypeMatchAll = String.prototype.matchAll;
|
|
27
|
+
exports.StringPrototypeReplace = String.prototype.replace;
|
|
28
|
+
exports.StringPrototypeReplaceAll = String.prototype.replaceAll;
|
|
33
29
|
exports.StringPrototypeSlice = String.prototype.slice;
|
|
30
|
+
exports.StringPrototypeSplit = String.prototype.split;
|
|
31
|
+
exports.StringPrototypeSubstr = String.prototype.substr;
|
|
32
|
+
exports.StringPrototypeSubstring = String.prototype.substring;
|
|
33
|
+
exports.StringPrototypeToLowerCase = String.prototype.toLowerCase;
|
|
34
|
+
exports.StringPrototypeToUpperCase = String.prototype.toUpperCase;
|
|
35
|
+
exports.StringPrototypeTrim = String.prototype.trim;
|
|
34
36
|
// regex
|
|
35
37
|
exports.RegExpPrototypeTest = RegExp.prototype.test;
|
|
36
38
|
exports.RegExpPrototypeExec = RegExp.prototype.exec;
|
package/lib/primordials.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primordials.js","sourceRoot":"","sources":["../src/primordials.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAEH,SAAS;AACI,QAAA,kBAAkB,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC;AAC1C,QAAA,mBAAmB,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC;AAEzD,UAAU;AACG,QAAA,
|
|
1
|
+
{"version":3,"file":"primordials.js","sourceRoot":"","sources":["../src/primordials.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAEH,SAAS;AACI,QAAA,kBAAkB,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC;AAC1C,QAAA,mBAAmB,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC;AAEzD,UAAU;AACG,QAAA,qBAAqB,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;AAChD,QAAA,oBAAoB,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;AAC3D,6DAA6D;AAC7D,aAAa;AACA,QAAA,uBAAuB,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AACpD,QAAA,sBAAsB,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC;AAClD,QAAA,yBAAyB,GAAG,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC;AACxD,QAAA,oBAAoB,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;AAC9C,QAAA,oBAAoB,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;AAC9C,QAAA,qBAAqB,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;AAChD,QAAA,wBAAwB,GAAG,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC;AACtD,QAAA,0BAA0B,GAAG,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC;AAC1D,QAAA,0BAA0B,GAAG,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC;AAC1D,QAAA,mBAAmB,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;AAEzD,QAAQ;AACK,QAAA,mBAAmB,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;AAC5C,QAAA,mBAAmB,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;AAEzD,OAAO;AACM,QAAA,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC;AAC5C,+BAA+B;AAClB,QAAA,WAAW,GAAG,cAAO,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/common",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.2",
|
|
4
4
|
"description": "Shared constants and utilities for all Contrast Agent modules",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|