Pathologic was missing because of a .git folder inside.
[yaffs-website] / node_modules / underscore.string / unescapeHTML.js
1 var makeString = require('./helper/makeString');
2 var htmlEntities = require('./helper/htmlEntities');
3
4 module.exports = function unescapeHTML(str) {
5   return makeString(str).replace(/\&([^;]+);/g, function(entity, entityCode) {
6     var match;
7
8     if (entityCode in htmlEntities) {
9       return htmlEntities[entityCode];
10     /*eslint no-cond-assign: 0*/
11     } else if (match = entityCode.match(/^#x([\da-fA-F]+)$/)) {
12       return String.fromCharCode(parseInt(match[1], 16));
13     /*eslint no-cond-assign: 0*/
14     } else if (match = entityCode.match(/^#(\d+)$/)) {
15       return String.fromCharCode(~~match[1]);
16     } else {
17       return entity;
18     }
19   });
20 };