UNPKG

osx-defaults

Version:

Access to OS X defaults program via simple API.

37 lines (30 loc) 741 B
'use strict'; const defaults = require('../'); console.log('------------------ Rename Sync ------------------'); console.log( 'original fooColorVariant', defaults.read({ isGlobalDomain: true, key: 'fooColorVariant' }) ); if (defaults.rename({ isGlobalDomain: true, key: 'fooColorVariant', new_key: 'barColorVariant' })) { console.log('Renamed'); } console.log( 'renamed fooColorVariant -> barColorVariant', defaults.read({ isGlobalDomain: true, key: 'barColorVariant' }) ); defaults.rename({ isGlobalDomain: true, key: 'barColorVariant', new_key: 'fooColorVariant' }); console.log('------------------ Rename Sync ------------------');