blob: b5a4bf4c959746c888e842bd8f06ba2070725d24 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
import {findSpec, getAllSpecs, tokenProxy} from './find-reverse.js';
const hardcodedReverseSpecs = {};
const findReverseHelperConfig = {
word: `reverse`,
constructorKey: Symbol.for('Thing.reverseSpecs'),
hardcodedSpecs: hardcodedReverseSpecs,
postprocessSpec: postprocessReverseSpec,
};
export function postprocessReverseSpec(spec, {thingConstructor}) {
const newSpec = {...spec};
void thingConstructor;
return newSpec;
}
export function getAllReverseSpecs() {
return getAllSpecs(findReverseHelperConfig);
}
export function findReverseSpec(key) {
return findSpec(key, findReverseHelperConfig);
}
export default tokenProxy({
findSpec: findReverseSpec,
prepareBehavior: spec => from => ({spec, from}),
});
|