@chevrotain/utils 10.2.0 → 10.3.0
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/src/print.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.PRINT_WARNING = exports.PRINT_ERROR = void 0;
|
|
|
4
4
|
function PRINT_ERROR(msg) {
|
|
5
5
|
/* istanbul ignore else - can't override global.console in node.js */
|
|
6
6
|
if (console && console.error) {
|
|
7
|
-
console.error(
|
|
7
|
+
console.error("Error: ".concat(msg));
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
exports.PRINT_ERROR = PRINT_ERROR;
|
|
@@ -12,7 +12,7 @@ function PRINT_WARNING(msg) {
|
|
|
12
12
|
/* istanbul ignore else - can't override global.console in node.js*/
|
|
13
13
|
if (console && console.warn) {
|
|
14
14
|
// TODO: modify docs accordingly
|
|
15
|
-
console.warn(
|
|
15
|
+
console.warn("Warning: ".concat(msg));
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
exports.PRINT_WARNING = PRINT_WARNING;
|
package/lib/src/print.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"print.js","sourceRoot":"","sources":["../../src/print.ts"],"names":[],"mappings":";;;AAAA,SAAgB,WAAW,CAAC,GAAW;IACrC,qEAAqE;IACrE,IAAI,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE;QAC5B,OAAO,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"print.js","sourceRoot":"","sources":["../../src/print.ts"],"names":[],"mappings":";;;AAAA,SAAgB,WAAW,CAAC,GAAW;IACrC,qEAAqE;IACrE,IAAI,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE;QAC5B,OAAO,CAAC,KAAK,CAAC,iBAAU,GAAG,CAAE,CAAC,CAAA;KAC/B;AACH,CAAC;AALD,kCAKC;AAED,SAAgB,aAAa,CAAC,GAAW;IACvC,oEAAoE;IACpE,IAAI,OAAO,IAAI,OAAO,CAAC,IAAI,EAAE;QAC3B,gCAAgC;QAChC,OAAO,CAAC,IAAI,CAAC,mBAAY,GAAG,CAAE,CAAC,CAAA;KAChC;AACH,CAAC;AAND,sCAMC"}
|
package/lib/src/timer.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.timer = void 0;
|
|
4
4
|
function timer(func) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
var start = new Date().getTime();
|
|
6
|
+
var val = func();
|
|
7
|
+
var end = new Date().getTime();
|
|
8
|
+
var total = end - start;
|
|
9
9
|
return { time: total, value: val };
|
|
10
10
|
}
|
|
11
11
|
exports.timer = timer;
|
package/lib/src/timer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timer.js","sourceRoot":"","sources":["../../src/timer.ts"],"names":[],"mappings":";;;AAAA,SAAgB,KAAK,CAAI,IAAa;IACpC,
|
|
1
|
+
{"version":3,"file":"timer.js","sourceRoot":"","sources":["../../src/timer.ts"],"names":[],"mappings":";;;AAAA,SAAgB,KAAK,CAAI,IAAa;IACpC,IAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;IAClC,IAAM,GAAG,GAAG,IAAI,EAAE,CAAA;IAClB,IAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;IAChC,IAAM,KAAK,GAAG,GAAG,GAAG,KAAK,CAAA;IACzB,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,CAAA;AACpC,CAAC;AAND,sBAMC"}
|
|
@@ -6,7 +6,7 @@ function toFastProperties(toBecomeFast) {
|
|
|
6
6
|
function FakeConstructor() { }
|
|
7
7
|
// If our object is used as a constructor it would receive
|
|
8
8
|
FakeConstructor.prototype = toBecomeFast;
|
|
9
|
-
|
|
9
|
+
var fakeInstance = new FakeConstructor();
|
|
10
10
|
function fakeAccess() {
|
|
11
11
|
return typeof fakeInstance.bar;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-fast-properties.js","sourceRoot":"","sources":["../../src/to-fast-properties.ts"],"names":[],"mappings":";;;AAAA,yHAAyH;AACzH,SAAgB,gBAAgB,CAAC,YAAiB;IAChD,SAAS,eAAe,KAAI,CAAC;IAE7B,0DAA0D;IAC1D,eAAe,CAAC,SAAS,GAAG,YAAY,CAAA;IACxC,
|
|
1
|
+
{"version":3,"file":"to-fast-properties.js","sourceRoot":"","sources":["../../src/to-fast-properties.ts"],"names":[],"mappings":";;;AAAA,yHAAyH;AACzH,SAAgB,gBAAgB,CAAC,YAAiB;IAChD,SAAS,eAAe,KAAI,CAAC;IAE7B,0DAA0D;IAC1D,eAAe,CAAC,SAAS,GAAG,YAAY,CAAA;IACxC,IAAM,YAAY,GAAG,IAAK,eAAuB,EAAE,CAAA;IAEnD,SAAS,UAAU;QACjB,OAAO,OAAO,YAAY,CAAC,GAAG,CAAA;IAChC,CAAC;IAED,kEAAkE;IAClE,qBAAqB;IACrB,UAAU,EAAE,CAAA;IACZ,UAAU,EAAE,CAAA;IAEZ,uEAAuE;IACvE,iCAAiC;IACjC,IAAI,CAAC;QAAE,OAAO,YAAY,CAAA;IAE1B,4EAA4E;IAC5E,0BAA0B;IAC1B,2BAA2B;IAC3B,IAAI,CAAC,YAAY,CAAC,CAAA;AACpB,CAAC;AAxBD,4CAwBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chevrotain/utils",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.3.0",
|
|
4
4
|
"description": "common utilities",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"bugs": {
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "5ca7d276f475839c815a2686f38e2814371935c9"
|
|
42
42
|
}
|