@template-tools/sync-cli
Version:
cli for @template-tools/template-sync
16 lines (13 loc) • 372 B
JavaScript
export const defaultEncodingOptions = "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;
}
}