@bemedev/decompose
Version:
Decompose object and so more
24 lines (21 loc) • 554 B
JavaScript
;
function isPrimitive(arg) {
return (typeof arg === 'number' ||
typeof arg === 'string' ||
typeof arg === 'boolean' ||
arg === undefined ||
arg === null);
}
const DEFAULT_FLAT_OPTIONS = {
sep: '.',
children: false,
};
const DEFAULT_DECOMPOSE_OPTIONS = {
sep: '.',
object: 'key',
start: true,
};
exports.DEFAULT_DECOMPOSE_OPTIONS = DEFAULT_DECOMPOSE_OPTIONS;
exports.DEFAULT_FLAT_OPTIONS = DEFAULT_FLAT_OPTIONS;
exports.isPrimitive = isPrimitive;
//# sourceMappingURL=helpers.cjs.map