UNPKG

@template-tools/sync-cli

Version:
16 lines (13 loc) 386 B
export const defaultEncodingOptions = { encoding: "utf8" }; export function setProperty(properties, attributePath, value) { const m = attributePath.match(/^(\w+)\.(.*)/); if (m) { const key = m[1]; if (properties[key] === undefined) { properties[key] = {}; } setProperty(properties[key], m[2], value); } else { properties[attributePath] = value; } }