assertron 11.0.1 → 11.0.3
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/cjs/assertron/index.d.ts +1 -0
- package/cjs/assertron/index.d.ts.map +1 -1
- package/cjs/assertron/satisfies.d.ts +2 -1
- package/cjs/assertron/satisfies.d.ts.map +1 -1
- package/cjs/assertron/satisfies.js +2 -1
- package/cjs/assertron/satisfies.js.map +1 -1
- package/esm/assertron/index.d.ts +1 -0
- package/esm/assertron/index.d.ts.map +1 -1
- package/esm/assertron/satisfies.d.ts +2 -1
- package/esm/assertron/satisfies.d.ts.map +1 -1
- package/esm/assertron/satisfies.js +2 -1
- package/esm/assertron/satisfies.js.map +1 -1
- package/package.json +2 -2
- package/ts/assertron/index.ts +1 -0
- package/ts/assertron/satisfies.ts +2 -1
package/cjs/assertron/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../ts/assertron/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../ts/assertron/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -4,7 +4,8 @@ export declare type SatisfyExpectation<T> = If<IsExtend<T, string>, T | RegExp,
|
|
|
4
4
|
}>>> | ((v: T) => boolean);
|
|
5
5
|
/**
|
|
6
6
|
* Check if `actual` satisfies criteria in `expected`.
|
|
7
|
-
* @param expected All properties can be a value which will be compared to the same property in `actual`,
|
|
7
|
+
* @param expected All properties can be a value which will be compared to the same property in `actual`,
|
|
8
|
+
* RegExp, or a predicate function that will be used to check against the property.
|
|
8
9
|
*/
|
|
9
10
|
export declare function satisfies<Actual, Expected extends Actual>(actual: Actual, expected: SatisfyExpectation<Expected>): void;
|
|
10
11
|
//# sourceMappingURL=satisfies.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"satisfies.d.ts","sourceRoot":"","sources":["../../ts/assertron/satisfies.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAI5D,oBAAY,kBAAkB,CAAC,CAAC,IAAI,EAAE,CACpC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC,EACnB,CAAC,GAAG,MAAM,EACV,EAAE,CACA,QAAQ,CAAC,CAAC,EAAE,kBAAkB,CAAC,EAC/B,CAAC,EACD,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,EACxB,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,EAC/D;KACG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAClC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,GACjC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC3B,CACF,CAAC,CACL,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC,CAAA;AAEvB
|
|
1
|
+
{"version":3,"file":"satisfies.d.ts","sourceRoot":"","sources":["../../ts/assertron/satisfies.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAI5D,oBAAY,kBAAkB,CAAC,CAAC,IAAI,EAAE,CACpC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC,EACnB,CAAC,GAAG,MAAM,EACV,EAAE,CACA,QAAQ,CAAC,CAAC,EAAE,kBAAkB,CAAC,EAC/B,CAAC,EACD,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,EACxB,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,EAC/D;KACG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAClC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,GACjC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC3B,CACF,CAAC,CACL,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC,CAAA;AAEvB;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,QAAQ,SAAS,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,CAAC,QAAQ,CAAC,QAKhH"}
|
|
@@ -6,7 +6,8 @@ const errors_js_1 = require("../errors.js");
|
|
|
6
6
|
const index_js_1 = require("../utils/index.js");
|
|
7
7
|
/**
|
|
8
8
|
* Check if `actual` satisfies criteria in `expected`.
|
|
9
|
-
* @param expected All properties can be a value which will be compared to the same property in `actual`,
|
|
9
|
+
* @param expected All properties can be a value which will be compared to the same property in `actual`,
|
|
10
|
+
* RegExp, or a predicate function that will be used to check against the property.
|
|
10
11
|
*/
|
|
11
12
|
function satisfies(actual, expected) {
|
|
12
13
|
const diff = (0, satisfier_1.createSatisfier)(expected).exec(actual);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"satisfies.js","sourceRoot":"","sources":["../../ts/assertron/satisfies.ts"],"names":[],"mappings":";;;AAAA,yCAA2C;AAE3C,4CAA6C;AAC7C,gDAAuD;AAkBvD
|
|
1
|
+
{"version":3,"file":"satisfies.js","sourceRoot":"","sources":["../../ts/assertron/satisfies.ts"],"names":[],"mappings":";;;AAAA,yCAA2C;AAE3C,4CAA6C;AAC7C,gDAAuD;AAkBvD;;;;GAIG;AACH,SAAgB,SAAS,CAAkC,MAAc,EAAE,QAAsC;IAC/G,MAAM,IAAI,GAAG,IAAA,2BAAe,EAAC,QAAe,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC1D,IAAI,IAAI,EAAE;QACR,MAAM,IAAI,0BAAc,CAAC,IAAA,8BAAmB,EAAC,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAA;KACxE;AACH,CAAC;AALD,8BAKC"}
|
package/esm/assertron/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../ts/assertron/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../ts/assertron/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -4,7 +4,8 @@ export declare type SatisfyExpectation<T> = If<IsExtend<T, string>, T | RegExp,
|
|
|
4
4
|
}>>> | ((v: T) => boolean);
|
|
5
5
|
/**
|
|
6
6
|
* Check if `actual` satisfies criteria in `expected`.
|
|
7
|
-
* @param expected All properties can be a value which will be compared to the same property in `actual`,
|
|
7
|
+
* @param expected All properties can be a value which will be compared to the same property in `actual`,
|
|
8
|
+
* RegExp, or a predicate function that will be used to check against the property.
|
|
8
9
|
*/
|
|
9
10
|
export declare function satisfies<Actual, Expected extends Actual>(actual: Actual, expected: SatisfyExpectation<Expected>): void;
|
|
10
11
|
//# sourceMappingURL=satisfies.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"satisfies.d.ts","sourceRoot":"","sources":["../../ts/assertron/satisfies.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,QAAQ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D;KACG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAClC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,GACjC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC3B,CACF,CAAC,CACL,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC,CAAA;AAEvB;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,QAAQ,SAAS,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,CAAC,QAAQ,CAAC,QAKhH"}
|
|
@@ -3,7 +3,8 @@ import { AssertionError } from '../errors.js';
|
|
|
3
3
|
import { notSatisfiedMessage } from '../utils/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Check if `actual` satisfies criteria in `expected`.
|
|
6
|
-
* @param expected All properties can be a value which will be compared to the same property in `actual`,
|
|
6
|
+
* @param expected All properties can be a value which will be compared to the same property in `actual`,
|
|
7
|
+
* RegExp, or a predicate function that will be used to check against the property.
|
|
7
8
|
*/
|
|
8
9
|
export function satisfies(actual, expected) {
|
|
9
10
|
const diff = createSatisfier(expected).exec(actual);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"satisfies.js","sourceRoot":"","sources":["../../ts/assertron/satisfies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAkBvD
|
|
1
|
+
{"version":3,"file":"satisfies.js","sourceRoot":"","sources":["../../ts/assertron/satisfies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAkBvD;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAkC,MAAc,EAAE,QAAsC;IAC/G,MAAM,IAAI,GAAG,eAAe,CAAC,QAAe,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC1D,IAAI,IAAI,EAAE;QACR,MAAM,IAAI,cAAc,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAA;KACxE;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assertron",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.3",
|
|
4
4
|
"description": "A supplementary assertion library",
|
|
5
5
|
"homepage": "https://github.com/unional/assertron",
|
|
6
6
|
"bugs": {
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"path-equal": "^1.2.2",
|
|
61
61
|
"satisfier": "^5.2.2",
|
|
62
62
|
"tersify": "^3.10.2",
|
|
63
|
-
"type-plus": "^
|
|
63
|
+
"type-plus": "^5.0.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@commitlint/cli": "^17.0.2",
|
package/ts/assertron/index.ts
CHANGED
|
@@ -21,7 +21,8 @@ export type SatisfyExpectation<T> = If<
|
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Check if `actual` satisfies criteria in `expected`.
|
|
24
|
-
* @param expected All properties can be a value which will be compared to the same property in `actual`,
|
|
24
|
+
* @param expected All properties can be a value which will be compared to the same property in `actual`,
|
|
25
|
+
* RegExp, or a predicate function that will be used to check against the property.
|
|
25
26
|
*/
|
|
26
27
|
export function satisfies<Actual, Expected extends Actual>(actual: Actual, expected: SatisfyExpectation<Expected>) {
|
|
27
28
|
const diff = createSatisfier(expected as any).exec(actual)
|