0b7fb73bdfbf350a383bd4b85c1ede6dd68dd292
[platform/framework/web/crosswalk-tizen.git] /
1 var toString = require('../lang/toString');
2
3     /**
4      * Unescape unicode char sequences
5      */
6     function unescapeUnicode(str){
7         str = toString(str);
8         return str.replace(/\\u[0-9a-f]{4}/g, function(ch){
9             var code = parseInt(ch.slice(2), 16);
10             return String.fromCharCode(code);
11         });
12     }
13
14     module.exports = unescapeUnicode;
15
16