@takeshape/util 10.39.9 → 10.40.1
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/assert.d.ts +2 -0
- package/dist/assert.d.ts.map +1 -0
- package/dist/assert.js +11 -0
- package/dist/billing.js +2 -3
- package/dist/common.d.ts +1 -0
- package/dist/common.d.ts.map +1 -1
- package/dist/common.js +11 -0
- package/dist/persisted-queries.d.ts +1 -1
- package/dist/persisted-queries.d.ts.map +1 -1
- package/es/assert.js +5 -0
- package/es/billing.js +2 -2
- package/es/common.js +2 -1
- package/package.json +2 -2
package/dist/assert.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../src/assert.ts"],"names":[],"mappings":"AAAA,wBAAgB,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAI9D"}
|
package/dist/assert.js
ADDED
package/dist/billing.js
CHANGED
|
@@ -7,8 +7,7 @@ exports.DEFAULT_MIN_SCHEDULE_TRIGGER_INTERVAL = exports.DEFAULT_ENTITLEMENTS = v
|
|
|
7
7
|
exports.getStripeProductObject = getStripeProductObject;
|
|
8
8
|
exports.isStripeChargeObject = isStripeChargeObject;
|
|
9
9
|
exports.isStripeProductObject = isStripeProductObject;
|
|
10
|
-
var
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
var _assert = require("./assert");
|
|
12
11
|
// Mirrors StripeAddressElementChangeEvent["value"] from @stripe/stripe-js
|
|
13
12
|
|
|
14
13
|
const DEFAULT_MIN_SCHEDULE_TRIGGER_INTERVAL = exports.DEFAULT_MIN_SCHEDULE_TRIGGER_INTERVAL = 60;
|
|
@@ -39,7 +38,7 @@ function isStripeProductObject(product) {
|
|
|
39
38
|
return Boolean(product && typeof product !== 'string' && product.object === 'product' && !product.deleted);
|
|
40
39
|
}
|
|
41
40
|
function getStripeProductObject(product) {
|
|
42
|
-
(0,
|
|
41
|
+
(0, _assert.assert)(isStripeProductObject(product), 'product is not a Stripe product object');
|
|
43
42
|
return product;
|
|
44
43
|
}
|
|
45
44
|
function isStripeChargeObject(charge) {
|
package/dist/common.d.ts
CHANGED
package/dist/common.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/common.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/common.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC"}
|
package/dist/common.js
CHANGED
|
@@ -299,4 +299,15 @@ Object.keys(_persistedQueries).forEach(function (key) {
|
|
|
299
299
|
return _persistedQueries[key];
|
|
300
300
|
}
|
|
301
301
|
});
|
|
302
|
+
});
|
|
303
|
+
var _assert = require("./assert");
|
|
304
|
+
Object.keys(_assert).forEach(function (key) {
|
|
305
|
+
if (key === "default" || key === "__esModule") return;
|
|
306
|
+
if (key in exports && exports[key] === _assert[key]) return;
|
|
307
|
+
Object.defineProperty(exports, key, {
|
|
308
|
+
enumerable: true,
|
|
309
|
+
get: function () {
|
|
310
|
+
return _assert[key];
|
|
311
|
+
}
|
|
312
|
+
});
|
|
302
313
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persisted-queries.d.ts","sourceRoot":"","sources":["../../src/persisted-queries.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"persisted-queries.d.ts","sourceRoot":"","sources":["../../src/persisted-queries.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uBAAuB,GAAG;IACpC,cAAc,EAAE;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,8BAA8B,8BAA8B,CAAC"}
|
package/es/assert.js
ADDED
package/es/billing.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { assert } from './assert';
|
|
2
2
|
|
|
3
3
|
// Mirrors StripeAddressElementChangeEvent["value"] from @stripe/stripe-js
|
|
4
4
|
|
|
@@ -30,7 +30,7 @@ export function isStripeProductObject(product) {
|
|
|
30
30
|
return Boolean(product && typeof product !== 'string' && product.object === 'product' && !product.deleted);
|
|
31
31
|
}
|
|
32
32
|
export function getStripeProductObject(product) {
|
|
33
|
-
|
|
33
|
+
assert(isStripeProductObject(product), 'product is not a Stripe product object');
|
|
34
34
|
return product;
|
|
35
35
|
}
|
|
36
36
|
export function isStripeChargeObject(charge) {
|
package/es/common.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takeshape/util",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.40.1",
|
|
4
4
|
"description": "Shared utilities",
|
|
5
5
|
"homepage": "https://www.takeshape.io",
|
|
6
6
|
"repository": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"shortid": "^2.2.16",
|
|
34
34
|
"tiny-invariant": "^1.2.0",
|
|
35
35
|
"url-parse": "^1.5.3",
|
|
36
|
-
"@takeshape/routing": "10.
|
|
36
|
+
"@takeshape/routing": "10.40.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/classnames": "^2.2.9",
|