UNPKG

tastypie

Version:

Tastypie is a webservice API framework for Node.js based on Django's Tastypie Framework. It provides a convenient, yet powerful and highly customizable, abstraction for creating REST-style interfaces

17 lines (12 loc) 379 B
var toString = require('../lang/toString'); /** * Unescape unicode char sequences */ function unescapeUnicode(str){ str = toString(str); return str.replace(/\\u[0-9a-f]{4}/g, function(ch){ var code = parseInt(ch.slice(2), 16); return String.fromCharCode(code); }); } module.exports = unescapeUnicode;