@appsemble/utils 0.20.4 → 0.20.5
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/string.d.ts +9 -0
- package/dist/string.js +13 -1
- package/dist/string.js.map +1 -1
- package/package.json +3 -3
package/dist/string.d.ts
CHANGED
|
@@ -12,3 +12,12 @@ export declare function camelToHyphen(string: string): string;
|
|
|
12
12
|
* @returns The input, but upper case.
|
|
13
13
|
*/
|
|
14
14
|
export declare function toUpperCase(input: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Escape a JSON reference.
|
|
17
|
+
*
|
|
18
|
+
* See https://tools.ietf.org/html/rfc6901#section-3
|
|
19
|
+
*
|
|
20
|
+
* @param ref - THe JSON pointer segment to escape.
|
|
21
|
+
* @returns The escaped JSON pointer segment.
|
|
22
|
+
*/
|
|
23
|
+
export declare function decodeJSONRef(ref: string): string;
|
package/dist/string.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toUpperCase = exports.camelToHyphen = void 0;
|
|
3
|
+
exports.decodeJSONRef = exports.toUpperCase = exports.camelToHyphen = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* A minimalistic implementation to convert camelcase strings to hyphenated ones.
|
|
6
6
|
*
|
|
@@ -21,4 +21,16 @@ function toUpperCase(input) {
|
|
|
21
21
|
return input.toUpperCase();
|
|
22
22
|
}
|
|
23
23
|
exports.toUpperCase = toUpperCase;
|
|
24
|
+
/**
|
|
25
|
+
* Escape a JSON reference.
|
|
26
|
+
*
|
|
27
|
+
* See https://tools.ietf.org/html/rfc6901#section-3
|
|
28
|
+
*
|
|
29
|
+
* @param ref - THe JSON pointer segment to escape.
|
|
30
|
+
* @returns The escaped JSON pointer segment.
|
|
31
|
+
*/
|
|
32
|
+
function decodeJSONRef(ref) {
|
|
33
|
+
return decodeURIComponent(ref).replace(/~/g, '~0').replace(/\//g, '~1');
|
|
34
|
+
}
|
|
35
|
+
exports.decodeJSONRef = decodeJSONRef;
|
|
24
36
|
//# sourceMappingURL=string.js.map
|
package/dist/string.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.js","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,MAAc;IAC1C,OAAO,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AACxE,CAAC;AAFD,sCAEC;AAED;;;;;GAKG;AACH,SAAgB,WAAW,CAAC,KAAa;IACvC,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;AAC7B,CAAC;AAFD,kCAEC"}
|
|
1
|
+
{"version":3,"file":"string.js","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,MAAc;IAC1C,OAAO,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AACxE,CAAC;AAFD,sCAEC;AAED;;;;;GAKG;AACH,SAAgB,WAAW,CAAC,KAAa;IACvC,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;AAC7B,CAAC;AAFD,kCAEC;AAED;;;;;;;GAOG;AACH,SAAgB,aAAa,CAAC,GAAW;IACvC,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AAC1E,CAAC;AAFD,sCAEC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsemble/utils",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.5",
|
|
4
4
|
"description": "Utility functions used in Appsemble internally",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"test": "jest"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@appsemble/types": "0.20.
|
|
32
|
+
"@appsemble/types": "0.20.5",
|
|
33
33
|
"axios": "^0.26.0",
|
|
34
34
|
"cron-parser": "^4.0.0",
|
|
35
35
|
"date-fns": "^2.0.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@types/sinonjs__fake-timers": "^8.0.0",
|
|
53
53
|
"bulma": "0.9.3",
|
|
54
54
|
"koas-core": "^0.5.0",
|
|
55
|
-
"yaml": "^2.0.0
|
|
55
|
+
"yaml": "^2.0.0"
|
|
56
56
|
},
|
|
57
57
|
"engines": {
|
|
58
58
|
"node": ">=14.0.0"
|