unescape-js
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/unescape-js package

1.1.4 • Public • Published

unescape-js

npm Travis branch Coveralls

Unescape special characters encoded with JavaScript escape sequences

Install

npm install --save unescape-js

Usage

unescape-js supports:

  • all JavaScript escape sequences described on the according MDN page including ES2015 Unicode code point escapes (\u{XXXXX})
  • Python-style escape sequences (\UXXXXXXXX).
var unescapeJs = require('unescape-js');
 
console.log(unescapeJs('Hello,\\nworld!'));
// Hello,
// world!
 
console.log(unescapeJs('Copyright \\u00A9'));
// Copyright ©
 
console.log(unescapeJs('\\u{1F604}'));
// 😄

License

MIT © Ivan Akulov

Package Sidebar

Install

npm i unescape-js

Weekly Downloads

787,214

Version

1.1.4

License

MIT

Unpacked Size

13.2 kB

Total Files

12

Last publish

Collaborators

  • iamakulov