MCPcopy Create free account
hub / github.com/decaporg/decap-cms / jsToMap

Function jsToMap

packages/decap-cms-lib-util/src/Cursor.ts:30–39  ·  view source on GitHub ↗
(obj: {})

Source from the content-addressed store, hash-verified

28type ActionHandler = (action: string) => unknown;
29
30function jsToMap(obj: {}) {
31 if (obj === undefined) {
32 return Map();
33 }
34 const immutableObj = fromJS(obj);
35 if (!Map.isMap(immutableObj)) {
36 throw new Error('Object must be equivalent to a Map.');
37 }
38 return immutableObj;
39}
40
41const knownMetaKeys = Set([
42 'index',

Callers 6

createCursorStoreFunction · 0.85
setDataMethod · 0.85
mergeDataMethod · 0.85
wrapDataMethod · 0.85
setMetaMethod · 0.85
mergeMetaMethod · 0.85

Calls 2

MapInterface · 0.85
fromJSFunction · 0.85

Tested by

no test coverage detected