one-thing
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -6,2 +6,4 @@ import {promisify} from 'node:util'; | ||
const decodeUnicodeEscapes = string => string.replace(/\\u([\da-f]{4})/gi, (_, p1) => String.fromCodePoint(Number.parseInt(p1, 16))); | ||
export default async function oneThing(text = '') { | ||
@@ -13,3 +15,3 @@ await execFile('open', ['--background', `one-thing:?text=${encodeURIComponent(text)}`]); | ||
const {stdout} = await execFile('defaults', ['read', 'com.sindresorhus.One-Thing', 'text']); | ||
return stdout.trim(); | ||
return decodeUnicodeEscapes(stdout.trim()); | ||
} |
{ | ||
"name": "one-thing", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Set the text for the One Thing app", | ||
@@ -21,3 +21,4 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "xo && ava" | ||
"//test": "xo && ava", | ||
"test": "ava" | ||
}, | ||
@@ -24,0 +25,0 @@ "files": [ |
3843
44