@bessemer/cornerstone 0.5.19 → 0.5.21
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/range.d.ts.map +1 -1
- package/dist/range.js +3 -4
- package/dist/range.js.map +1 -1
- package/package.json +1 -1
package/dist/range.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../src/range.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../src/range.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAExD,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,OAAO,EAAE,MAAM,CAAC,mIAEtD,CAAA;AAED,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAA;AAElE,eAAO,MAAM,MAAM,GAAI,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAG,MAAM,CAAC,CAAC,CAM/E,CAAA"}
|
package/dist/range.js
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
// src/range.ts
|
2
|
-
import {
|
3
|
-
import { tuple } from "@bessemer/cornerstone/zod";
|
2
|
+
import { Objects, Zod } from "@bessemer/cornerstone";
|
4
3
|
var boundsSchema = (type) => {
|
5
|
-
return tuple([type.nullable(), type.nullable()]).brand("Bounds");
|
4
|
+
return Zod.tuple([type.nullable(), type.nullable()]).brand("Bounds");
|
6
5
|
};
|
7
6
|
var bounds = (bounds2) => {
|
8
|
-
if (isUndefined(bounds2[1])) {
|
7
|
+
if (Objects.isUndefined(bounds2[1])) {
|
9
8
|
return [bounds2[0], null];
|
10
9
|
}
|
11
10
|
return bounds2;
|
package/dist/range.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/range.ts"],"sourcesContent":["import {
|
1
|
+
{"version":3,"sources":["../src/range.ts"],"sourcesContent":["import { Objects, Zod } from '@bessemer/cornerstone'\nimport { ZodType } from 'zod'\nimport { TaggedType } from '@bessemer/cornerstone/types'\n\nexport const boundsSchema = <T extends ZodType>(type: T) => {\n return Zod.tuple([type.nullable(), type.nullable()]).brand('Bounds')\n}\n\nexport type Bounds<T> = TaggedType<[T | null, T | null], 'Bounds'>\n\nexport const bounds = <T>(bounds: [lower: T | null, upper?: T | null]): Bounds<T> => {\n if(Objects.isUndefined(bounds[1])) {\n return [bounds[0], null] as Bounds<T>\n }\n\n return bounds as Bounds<T>\n}"],"mappings":";AAAA,SAAS,SAAS,WAAW;AAItB,IAAM,eAAe,CAAoB,SAAY;AAC1D,SAAO,IAAI,MAAM,CAAC,KAAK,SAAS,GAAG,KAAK,SAAS,CAAC,CAAC,EAAE,MAAM,QAAQ;AACrE;AAIO,IAAM,SAAS,CAAIA,YAA2D;AACnF,MAAG,QAAQ,YAAYA,QAAO,CAAC,CAAC,GAAG;AACjC,WAAO,CAACA,QAAO,CAAC,GAAG,IAAI;AAAA,EACzB;AAEA,SAAOA;AACT;","names":["bounds"]}
|