MCPcopy Index your code
hub / github.com/aframevr/aframe / stringifyProperties

Function stringifyProperties

src/core/schema.js:172–192  ·  view source on GitHub ↗
(propData, schema)

Source from the content-addressed store, hash-verified

170 * Serialize a group of properties.
171 */
172export function stringifyProperties (propData, schema) {
173 var propName;
174 var propDefinition;
175 var propValue;
176 var stringifiedData = {};
177 var value;
178
179 for (propName in propData) {
180 propDefinition = schema[propName];
181 propValue = propData[propName];
182 value = propValue;
183 if (typeof value === 'object') {
184 value = stringifyProperty(propValue, propDefinition);
185 if (!propDefinition) { warn('Unknown component property: ' + propName); }
186 }
187 if (value !== undefined) {
188 stringifiedData[propName] = value;
189 }
190 }
191 return stringifiedData;
192}
193
194/**
195 * Serialize a single property.

Callers 1

component.jsFile · 0.85

Calls 1

stringifyPropertyFunction · 0.85

Tested by

no test coverage detected