osx-defaults
Version:
Access to OS X defaults program via simple API.
37 lines (30 loc) • 665 B
JavaScript
;
const defaults = require('../');
console.log('------------------ Delete Sync ------------------');
console.log(
'original fooColorVariant',
defaults.read({
isGlobalDomain: true,
key: 'fooColorVariant'
})
);
defaults.write({
isGlobalDomain: true,
key: 'hello',
valueType: defaults.STRING,
value: 'world'
});
if (defaults.delete({
isGlobalDomain: true,
key: 'hello'
})) {
console.log('Deleted');
}
console.log(
'deleted hello',
defaults.read({
isGlobalDomain: true,
key: 'hello'
})
);
console.log('------------------ Delete Sync ------------------');