map-transform 1.6.0-rc.3 → 1.6.0-rc.4
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,3 @@
|
|
|
1
|
-
import type { Path,
|
|
2
|
-
export declare function pathGetter(path?: Path | null):
|
|
3
|
-
export declare function pathSetter(path?: Path | null):
|
|
1
|
+
import type { Path, DataMapperWithState } from './types.js';
|
|
2
|
+
export declare function pathGetter(path?: Path | null): DataMapperWithState;
|
|
3
|
+
export declare function pathSetter(path?: Path | null): DataMapperWithState;
|
|
@@ -2,13 +2,13 @@ import { pathGetter as pathGetterNext, pathSetter as pathSetterNext, } from '../
|
|
|
2
2
|
import State from '../state.js';
|
|
3
3
|
export function pathGetter(path) {
|
|
4
4
|
const getter = pathGetterNext(path);
|
|
5
|
-
return
|
|
5
|
+
return (value, state) => {
|
|
6
6
|
return getter(value, new State(state));
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
9
|
export function pathSetter(path) {
|
|
10
10
|
const setter = pathSetterNext(path);
|
|
11
|
-
return
|
|
11
|
+
return (value, state) => {
|
|
12
12
|
return setter(value, new State(state));
|
|
13
13
|
};
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPathMapper.js","sourceRoot":"","sources":["../../src/legacy/createPathMapper.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,IAAI,cAAc,EAC5B,UAAU,IAAI,cAAc,GAC7B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,MAAM,aAAa,CAAA;AAG/B,MAAM,UAAU,UAAU,CAAC,IAAkB;IAC3C,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,CAAA;IACnC,OAAO,
|
|
1
|
+
{"version":3,"file":"createPathMapper.js","sourceRoot":"","sources":["../../src/legacy/createPathMapper.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,IAAI,cAAc,EAC5B,UAAU,IAAI,cAAc,GAC7B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,MAAM,aAAa,CAAA;AAG/B,MAAM,UAAU,UAAU,CAAC,IAAkB;IAC3C,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,CAAA;IACnC,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QACtB,OAAO,MAAM,CAAC,KAAK,EAAE,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;IACxC,CAAC,CAAA;AACH,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAkB;IAC3C,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,CAAA;IACnC,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QACtB,OAAO,MAAM,CAAC,KAAK,EAAE,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;IACxC,CAAC,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED