unisafe
v1.0.2
Published
Remove invalid Unicode characters out of your string and JSON.
Downloads
1
Maintainers
Readme
Remove invalid Unicode characters out of your string and JSON with unisafe
Install
npm install --save unisafe
Usage
Remove invalid Unicode characters out of your string:
const unisafe = require('unisafe');
const goodString = unisafe('Bad unicode string.');
console.log(goodString);
Remove invalid Unicode characters out of your JSON:
const unisafe = require('unisafe');
const validJSON = unisafe(`[{ "foo": "Invalid unicode string in JSON." }]`);
const myArray = JSON.parse(validJSON);
console.log(myArray);