@daaler/jutils 0.4.8 → 0.4.10
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/dist/error/error.d.ts +1 -1
- package/dist/error/error.js +1 -1
- package/dist/error/error.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/string/is-ascii-alphanumeric.d.ts +4 -0
- package/dist/string/is-ascii-alphanumeric.js +7 -0
- package/dist/string/is-ascii-alphanumeric.js.map +1 -0
- package/dist/string/is-ascii-letter.d.ts +4 -0
- package/dist/string/is-ascii-letter.js +7 -0
- package/dist/string/is-ascii-letter.js.map +1 -0
- package/dist/string/is-unicode-alphanumeric.d.ts +4 -0
- package/dist/string/is-unicode-alphanumeric.js +7 -0
- package/dist/string/is-unicode-alphanumeric.js.map +1 -0
- package/package.json +2 -2
package/dist/error/error.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export default function error(message?: string, options?: ErrorOptions): never;
|
package/dist/error/error.js
CHANGED
package/dist/error/error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/error/error.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,KAAK,CAAC,OAAe,EAAC,OAAqB;
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/error/error.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,OAAe,EAAC,OAAqB;IAClE,MAAM,IAAI,KAAK,CAAC,OAAO,EAAC,OAAO,CAAC,CAAC;AAClC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -16,10 +16,14 @@ import Notifications from "./notifications/notifications.ts";
|
|
|
16
16
|
import Exception from "./exception/exception.ts";
|
|
17
17
|
import matchExceptions from "./exception/match-exceptions.ts";
|
|
18
18
|
import { registerException, getException, getExceptionNoError } from "./exception/exceptions.ts";
|
|
19
|
+
import error from "./error/error.ts";
|
|
19
20
|
import NotImplementedError, { notImplementedError, notImplemented } from "./error/not-implemented.ts";
|
|
20
21
|
import recursiveMerge from "./data/recursive-merge.ts";
|
|
21
22
|
export { interrupt, wait, timedifference, timefromnow, timefromx, zeroDate as zeroTime, // legacy naming
|
|
22
|
-
zeroDate, maxDate, JSchema, UUID, Integer, jdebug, WeakValueCache, IdBasedLRUCache, IdBasedCache, Notifications, Exception, matchExceptions, registerException, getException, getExceptionNoError, NotImplementedError, notImplementedError, notImplemented, recursiveMerge, };
|
|
23
|
+
zeroDate, maxDate, JSchema, UUID, Integer, jdebug, WeakValueCache, IdBasedLRUCache, IdBasedCache, Notifications, Exception, matchExceptions, registerException, getException, getExceptionNoError, error, NotImplementedError, notImplementedError, notImplemented, recursiveMerge, };
|
|
24
|
+
export { default as isAsciiAlphanumeric } from "./string/is-ascii-alphanumeric.ts";
|
|
25
|
+
export { default as isAsciiLetter } from "./string/is-ascii-letter.ts";
|
|
23
26
|
export { default as isDigit } from "./string/is-digit.ts";
|
|
27
|
+
export { default as isUnicodeAlphanumeric } from "./string/is-unicode-alphanumeric.ts";
|
|
24
28
|
export { noop, noop1, noop2, noop3, noopn, pass } from "./op/noop.ts";
|
|
25
29
|
export { default as DomUtils } from "./jdom/dom-utils.ts";
|
package/dist/index.js
CHANGED
|
@@ -16,11 +16,15 @@ import Notifications from "./notifications/notifications.js";
|
|
|
16
16
|
import Exception from "./exception/exception.js";
|
|
17
17
|
import matchExceptions from "./exception/match-exceptions.js";
|
|
18
18
|
import { registerException, getException, getExceptionNoError } from "./exception/exceptions.js";
|
|
19
|
+
import error from "./error/error.js";
|
|
19
20
|
import NotImplementedError, { notImplementedError, notImplemented } from "./error/not-implemented.js";
|
|
20
21
|
import recursiveMerge from "./data/recursive-merge.js";
|
|
21
22
|
export { interrupt, wait, timedifference, timefromnow, timefromx, zeroDate as zeroTime, // legacy naming
|
|
22
|
-
zeroDate, maxDate, JSchema, UUID, Integer, jdebug, WeakValueCache, IdBasedLRUCache, IdBasedCache, Notifications, Exception, matchExceptions, registerException, getException, getExceptionNoError, NotImplementedError, notImplementedError, notImplemented, recursiveMerge, };
|
|
23
|
+
zeroDate, maxDate, JSchema, UUID, Integer, jdebug, WeakValueCache, IdBasedLRUCache, IdBasedCache, Notifications, Exception, matchExceptions, registerException, getException, getExceptionNoError, error, NotImplementedError, notImplementedError, notImplemented, recursiveMerge, };
|
|
24
|
+
export { default as isAsciiAlphanumeric } from "./string/is-ascii-alphanumeric.js";
|
|
25
|
+
export { default as isAsciiLetter } from "./string/is-ascii-letter.js";
|
|
23
26
|
export { default as isDigit } from "./string/is-digit.js";
|
|
27
|
+
export { default as isUnicodeAlphanumeric } from "./string/is-unicode-alphanumeric.js";
|
|
24
28
|
export { noop, noop1, noop2, noop3, noopn, pass } from "./op/noop.js";
|
|
25
29
|
export { default as DomUtils } from "./jdom/dom-utils.js";
|
|
26
30
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAC5C,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,OAAO,MAAM,oBAAoB,CAAC;AACzC,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,cAAc,MAAM,6BAA6B,CAAC;AACzD,OAAO,eAAe,MAAM,+BAA+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;AAC1D,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACvF,OAAO,EAAE,IAAI,EAAC,KAAK,EAAC,KAAK,EAAC,KAAK,EAAC,KAAK,EAAC,IAAI,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* return true if argument is single ascii letter or digit (a-z,A-Z,0-9) character false otherwise
|
|
3
|
+
*/
|
|
4
|
+
export default function isAsciiAlphanumeric(char) {
|
|
5
|
+
return ((char >= "a" && char <= "z") || (char >= "0" && char <= "9") || (char >= "A" && char <= "Z")) && char.length === 1;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=is-ascii-alphanumeric.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-ascii-alphanumeric.js","sourceRoot":"","sources":["../../src/string/is-ascii-alphanumeric.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,IAAW;IACtD,OAAO,CAAC,CAAC,IAAI,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;AAC5H,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* return true if argument is single ascii letter (a-z,A-Z) character false otherwise
|
|
3
|
+
*/
|
|
4
|
+
export default function isAsciiLetter(char) {
|
|
5
|
+
return ((char >= "a" && char <= "z") || (char >= "A" && char <= "Z")) && char.length === 1;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=is-ascii-letter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-ascii-letter.js","sourceRoot":"","sources":["../../src/string/is-ascii-letter.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,IAAW;IAChD,OAAO,CAAC,CAAC,IAAI,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;AAC5F,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* return true if argument is single unicode letter or digit false otherwise
|
|
3
|
+
*/
|
|
4
|
+
export default function isAsciiAlphanumeric(char) {
|
|
5
|
+
return (/\p{L}/u.test(char) || (char >= "0" && char <= "9")) && char.length === 1;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=is-unicode-alphanumeric.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-unicode-alphanumeric.js","sourceRoot":"","sources":["../../src/string/is-unicode-alphanumeric.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,IAAW;IACtD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;AACnF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daaler/jutils",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.10",
|
|
4
4
|
"description": "Utility functions for js",
|
|
5
5
|
"author": "Jarno Parviainen - jarno.parviainen@gmail.com",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "pnpm tsc",
|
|
53
|
-
"clean": "rm -
|
|
53
|
+
"clean": "rm -rf dist",
|
|
54
54
|
"test:run": "NODE_OPTIONS=--expose-gc node --test",
|
|
55
55
|
"test": "pnpm run build && pnpm run test:run",
|
|
56
56
|
"publish-to-npm": "pnpm run clean && pnpm run build && pnpm publish --access public"
|