@opfr/utils-type 0.7.4 → 0.10.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.
@@ -1,3 +1,4 @@
1
1
  export * from './constants';
2
2
  export type * from './types';
3
+ export * from './utils';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sort-values/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,mBAAmB,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sort-values/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,mBAAmB,SAAS,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from './constants';
2
+ export * from './utils';
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sort-values/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sort-values/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAE5B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { RestrictedSortValue, SortValue } from './types';
2
+ export declare const getNewSortValue: (old: SortValue, newValue: RestrictedSortValue) => SortValue;
3
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/sort-values/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE9D,eAAO,MAAM,eAAe,QACrB,SAAS,YACJ,mBAAmB,KAC5B,SAQF,CAAC"}
@@ -0,0 +1,10 @@
1
+ export const getNewSortValue = (old, newValue) => {
2
+ if (newValue === null) {
3
+ return null;
4
+ }
5
+ if (old === newValue) {
6
+ return `-${old}`;
7
+ }
8
+ return newValue;
9
+ };
10
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/sort-values/utils.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,GAAc,EACd,QAA6B,EAClB,EAAE;IACb,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,GAAG,KAAK,QAAQ,EAAE,CAAC;QACrB,OAAO,IAAI,GAAG,EAAE,CAAC;IACnB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- export type XP_ARRAY = [number, number];
1
+ export type XpArray = [number, number];
2
2
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/xp/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/xp/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opfr/utils-type",
3
- "version": "0.7.4",
3
+ "version": "0.10.0",
4
4
  "private": false,
5
5
  "description": "OPFR utils-type",
6
6
  "author": "Matthieu VEIGA",
@@ -33,5 +33,6 @@
33
33
  "eslintIgnore": [
34
34
  "node_modules",
35
35
  "dist"
36
- ]
36
+ ],
37
+ "gitHead": "bb6f237e287375494fa167bd113126169615ebf3"
37
38
  }