stentor-guards 1.56.124 → 1.57.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/index.d.ts +3 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/isChannelable.d.ts +9 -0
- package/lib/isChannelable.js +14 -0
- package/lib/isChannelable.js.map +1 -0
- package/lib/isConditional.d.ts +9 -0
- package/lib/isConditional.js +14 -0
- package/lib/isConditional.js.map +1 -0
- package/lib/isJSONDependable.d.ts +9 -0
- package/lib/isJSONDependable.js +14 -0
- package/lib/isJSONDependable.js.map +1 -0
- package/package.json +4 -4
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/*! Copyright (c) 2020, XAPPmedia */
|
|
2
2
|
export * from "./isActionable";
|
|
3
3
|
export * from "./isActiveWithin";
|
|
4
|
+
export * from "./isChannelable";
|
|
4
5
|
export * from "./isCompilablePath";
|
|
6
|
+
export * from "./isConditional";
|
|
5
7
|
export * from "./isExecutablePath";
|
|
6
8
|
export * from "./isFirstTime";
|
|
7
9
|
export * from "./isGlobalHandler";
|
|
@@ -9,6 +11,7 @@ export * from "./isHandler";
|
|
|
9
11
|
export * from "./isHaveNotSeenWithin";
|
|
10
12
|
export * from "./isHistoricalPath";
|
|
11
13
|
export * from "./isIntent";
|
|
14
|
+
export * from "./isJSONDependable";
|
|
12
15
|
export * from "./isLastActive";
|
|
13
16
|
export * from "./isLastActiveResponse";
|
|
14
17
|
export * from "./isLinkoutSuggestion";
|
package/lib/index.js
CHANGED
|
@@ -17,7 +17,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
/*! Copyright (c) 2020, XAPPmedia */
|
|
18
18
|
__exportStar(require("./isActionable"), exports);
|
|
19
19
|
__exportStar(require("./isActiveWithin"), exports);
|
|
20
|
+
__exportStar(require("./isChannelable"), exports);
|
|
20
21
|
__exportStar(require("./isCompilablePath"), exports);
|
|
22
|
+
__exportStar(require("./isConditional"), exports);
|
|
21
23
|
__exportStar(require("./isExecutablePath"), exports);
|
|
22
24
|
__exportStar(require("./isFirstTime"), exports);
|
|
23
25
|
__exportStar(require("./isGlobalHandler"), exports);
|
|
@@ -25,6 +27,7 @@ __exportStar(require("./isHandler"), exports);
|
|
|
25
27
|
__exportStar(require("./isHaveNotSeenWithin"), exports);
|
|
26
28
|
__exportStar(require("./isHistoricalPath"), exports);
|
|
27
29
|
__exportStar(require("./isIntent"), exports);
|
|
30
|
+
__exportStar(require("./isJSONDependable"), exports);
|
|
28
31
|
__exportStar(require("./isLastActive"), exports);
|
|
29
32
|
__exportStar(require("./isLastActiveResponse"), exports);
|
|
30
33
|
__exportStar(require("./isLinkoutSuggestion"), exports);
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oCAAoC;AACpC,iDAA+B;AAC/B,mDAAiC;AACjC,qDAAmC;AACnC,qDAAmC;AACnC,gDAA8B;AAC9B,oDAAkC;AAClC,8CAA4B;AAC5B,wDAAsC;AACtC,qDAAmC;AACnC,6CAA2B;AAC3B,iDAA+B;AAC/B,yDAAuC;AACvC,wDAAsC;AACtC,0DAAwC;AACxC,0DAAwC;AACxC,gDAA8B;AAC9B,oDAAkC;AAClC,qDAAmC;AACnC,4CAA0B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oCAAoC;AACpC,iDAA+B;AAC/B,mDAAiC;AACjC,kDAAgC;AAChC,qDAAmC;AACnC,kDAAgC;AAChC,qDAAmC;AACnC,gDAA8B;AAC9B,oDAAkC;AAClC,8CAA4B;AAC5B,wDAAsC;AACtC,qDAAmC;AACnC,6CAA2B;AAC3B,qDAAmC;AACnC,iDAA+B;AAC/B,yDAAuC;AACvC,wDAAsC;AACtC,0DAAwC;AACxC,0DAAwC;AACxC,gDAA8B;AAC9B,oDAAkC;AAClC,qDAAmC;AACnC,4CAA0B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*! Copyright (c) 2022, XAPP AI */
|
|
2
|
+
import { Channelable } from "stentor-models";
|
|
3
|
+
/**
|
|
4
|
+
* Type guard to check if the object implements Channeled.
|
|
5
|
+
*
|
|
6
|
+
* @param item
|
|
7
|
+
* @returns Type checked boolean if the object implements Channeled
|
|
8
|
+
*/
|
|
9
|
+
export declare function isChannelable<T>(item: object): item is Channelable<T>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isChannelable = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Type guard to check if the object implements Channeled.
|
|
6
|
+
*
|
|
7
|
+
* @param item
|
|
8
|
+
* @returns Type checked boolean if the object implements Channeled
|
|
9
|
+
*/
|
|
10
|
+
function isChannelable(item) {
|
|
11
|
+
return !!item && (typeof item.channel === "object");
|
|
12
|
+
}
|
|
13
|
+
exports.isChannelable = isChannelable;
|
|
14
|
+
//# sourceMappingURL=isChannelable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isChannelable.js","sourceRoot":"","sources":["../src/isChannelable.ts"],"names":[],"mappings":";;;AAGA;;;;;GAKG;AACH,SAAgB,aAAa,CAAI,IAAY;IACzC,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,OAAQ,IAAuB,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC;AAC5E,CAAC;AAFD,sCAEC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
|
+
import { Conditional } from "stentor-models";
|
|
3
|
+
/**
|
|
4
|
+
* Type guard to check if the object implements Conditional
|
|
5
|
+
*
|
|
6
|
+
* @param item
|
|
7
|
+
* @returns Type checked boolean if the object implements Conditioned
|
|
8
|
+
*/
|
|
9
|
+
export declare function isConditional<T>(item: object): item is Conditional<T>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isConditional = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Type guard to check if the object implements Conditional
|
|
6
|
+
*
|
|
7
|
+
* @param item
|
|
8
|
+
* @returns Type checked boolean if the object implements Conditioned
|
|
9
|
+
*/
|
|
10
|
+
function isConditional(item) {
|
|
11
|
+
return !!item && (typeof item.conditions === "object" || typeof item.conditions === "string");
|
|
12
|
+
}
|
|
13
|
+
exports.isConditional = isConditional;
|
|
14
|
+
//# sourceMappingURL=isConditional.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isConditional.js","sourceRoot":"","sources":["../src/isConditional.ts"],"names":[],"mappings":";;;AAGA;;;;;GAKG;AACH,SAAgB,aAAa,CAAI,IAAY;IACzC,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,OAAQ,IAAuB,CAAC,UAAU,KAAK,QAAQ,IAAI,OAAQ,IAAuB,CAAC,UAAU,KAAK,QAAQ,CAAC,CAAC;AAC1I,CAAC;AAFD,sCAEC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
|
+
import { JSONDependable } from "stentor-models";
|
|
3
|
+
/**
|
|
4
|
+
* Guard to determine if the object implements JSONDependable.
|
|
5
|
+
*
|
|
6
|
+
* @param item
|
|
7
|
+
* @returns Type checked boolean if the object implements JSON
|
|
8
|
+
*/
|
|
9
|
+
export declare function isJSONDependable<T>(item: object): item is JSONDependable<T>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isJSONDependable = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Guard to determine if the object implements JSONDependable.
|
|
6
|
+
*
|
|
7
|
+
* @param item
|
|
8
|
+
* @returns Type checked boolean if the object implements JSON
|
|
9
|
+
*/
|
|
10
|
+
function isJSONDependable(item) {
|
|
11
|
+
return !!item && !!item.JSONPathMatch;
|
|
12
|
+
}
|
|
13
|
+
exports.isJSONDependable = isJSONDependable;
|
|
14
|
+
//# sourceMappingURL=isJSONDependable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isJSONDependable.js","sourceRoot":"","sources":["../src/isJSONDependable.ts"],"names":[],"mappings":";;;AAGA;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAI,IAAY;IAC5C,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,CAAE,IAAsB,CAAC,aAAa,CAAC;AAC7D,CAAC;AAFD,4CAEC"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.57.0",
|
|
8
8
|
"description": "Common type guards for 📣 stentor",
|
|
9
9
|
"types": "lib/index",
|
|
10
10
|
"main": "lib/index",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"mocha": "9.2.2",
|
|
24
24
|
"sinon": "14.0.1",
|
|
25
25
|
"sinon-chai": "3.7.0",
|
|
26
|
-
"stentor-models": "1.
|
|
26
|
+
"stentor-models": "1.57.0",
|
|
27
27
|
"ts-node": "10.9.1",
|
|
28
28
|
"typescript": "4.8.4"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"stentor-constants": "1.
|
|
31
|
+
"stentor-constants": "1.57.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"stentor-models": "1.x"
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"clean": "rm -rf ./lib/* ",
|
|
39
39
|
"test": "mocha --recursive -r ts-node/register \"./src/**/*.test.ts\""
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "49d4e56874c967af5ef1dc0da757bdd6d819ae82"
|
|
42
42
|
}
|