UNPKG

unicodechar-string

Version:

Convert unicode escape sequence to a character!

11 lines (7 loc) 259 B
import test from 'ava'; import fn from './'; const str = 'I wish I were a \ud83e\udd84, so I could stab idiots with my head!'; test(str, async t => { const bud = await fn(str); t.is(bud, 'I wish I were a 🦄, so I could stab idiots with my head!'); });