Resolve the path of
Alfred.alfredpreferences
$ npm install resolve-alfred-prefs
const resolveAlfredPrefs = require('resolve-alfred-prefs');
(async () => {
console.log(await resolveAlfredPrefs());
// If Alfred 4 or newer
//=> {path: '/Users/sam/Dropbox/Alfred.alfredpreferences'}
// If Alfred 3
//=> {version: 3, path: '/Users/sam/Dropbox/Alfred.alfredpreferences'}
})();
Returns an object
with:
version
(String) - The key will pesent if the Alfred version is 3.path
(String) - TheAlfred.alfredpreferences
path.
MIT © Sam Verschueren