MCPcopy
hub / github.com/josdejong/mathjs / toObject

Function toObject

src/utils/map.js:201–211  ·  view source on GitHub ↗
(map)

Source from the content-addressed store, hash-verified

199 * @returns { [key: string]: unknown }
200 */
201export function toObject (map) {
202 if (map instanceof ObjectWrappingMap) {
203 return map.wrappedObject
204 }
205 const object = {}
206 for (const key of map.keys()) {
207 const value = map.get(key)
208 setSafeProperty(object, key, value)
209 }
210 return object
211}
212
213/**
214 * Copies the contents of key-value pairs from each `objects` in to `map`.

Callers 5

map.test.jsFile · 0.90
outputScopeFunction · 0.90
myFunctionFunction · 0.90
Parser.jsFile · 0.90

Calls 3

setSafePropertyFunction · 0.90
keysMethod · 0.65
getMethod · 0.65

Tested by 2

outputScopeFunction · 0.72
myFunctionFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…