MCPcopy Index your code
hub / github.com/microsoft/SandDance / normalizePropDefinition

Function normalizePropDefinition

docs/app/js/sanddance-app.js:88231–88246  ·  view source on GitHub ↗
(name, propDef)

Source from the content-addressed store, hash-verified

88229 }
88230}
88231function normalizePropDefinition(name, propDef) {
88232 if (!("type" in propDef)) {
88233 if (!("value" in propDef)) return {
88234 name: name,
88235 type: "object",
88236 value: propDef
88237 };
88238 return Object.assign({
88239 name: name,
88240 type: getTypeOf(propDef.value)
88241 }, propDef);
88242 }
88243 return Object.assign({
88244 name: name
88245 }, TYPE_DEFINITIONS[propDef.type], propDef);
88246}
88247function isArray(value) {
88248 return Array.isArray(value) || ArrayBuffer.isView(value);
88249}

Callers 1

parsePropTypeFunction · 0.70

Calls 1

getTypeOfFunction · 0.70

Tested by

no test coverage detected