MCPcopy
hub / github.com/mobxjs/mobx / stringifyKey

Function stringifyKey

packages/mobx/src/utils/utils.ts:194–202  ·  view source on GitHub ↗
(key: any)

Source from the content-addressed store, hash-verified

192 : /* istanbul ignore next */ Object.getOwnPropertyNames
193
194export function stringifyKey(key: any): string {
195 if (typeof key === "string") {
196 return key
197 }
198 if (typeof key === "symbol") {
199 return key.toString()
200 }
201 return new String(key).toString()
202}
203
204export function toPrimitive(value: any) {
205 return value === null ? null : typeof value === "object" ? "" + value : value

Callers 3

hasMethod · 0.85
addValue_Method · 0.85
has_Method · 0.85

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…