@bemedev/decompose
Version:
Decompose object and so more
20 lines (18 loc) • 460 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,
};
export { DEFAULT_DECOMPOSE_OPTIONS, DEFAULT_FLAT_OPTIONS, isPrimitive };
//# sourceMappingURL=helpers.js.map