How to use the unescape function from lodash

Find comprehensive JavaScript lodash.unescape code examples handpicked from public code repositorys.

7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
 * @category Utilities
 * @param {string} string The string to unescape.
 * @returns {string} Returns the unescaped string.
 * @example
 *
 * _.unescape('Fred, Barney & Pebbles');
 * // => 'Fred, Barney & Pebbles'
 */
function unescape(string) {
  return string == null ? '' : String(string).replace(reEscapedHtml, unescapeHtmlChar);
fork icon73
star icon711
watch icon29

407
408
409
410
411
412
413
414
415
416
module.exports.trimStart           = _.trimStart;
module.exports.truncate            = _.truncate;
module.exports.truthy              = _.truthy;
module.exports.truthyAll           = _.truthyAll;
module.exports.unary               = _.unary;
module.exports.unescape            = _.unescape;
module.exports.union               = _.union;
module.exports.unionBy             = _.unionBy;
module.exports.unionWith           = _.unionWith;
module.exports.uniq                = _.uniq;
fork icon19
star icon122
watch icon0

+ 92 other calls in file

862
863
864
865
866
867
868
869
870
871
872
873
874
console.log(trimStart); // => 'abc  '


const truncate = _.truncate('hi-diddly-ho there, neighborino');
console.log(truncate); // => 'hi-diddly-ho there, neighbo...'


const unescape = _.unescape('fred, barney, & pebbles');
console.log(unescape); // => 'fred, barney, & pebbles'


const upperCase = _.upperCase('--foo-bar--');
console.log(upperCase); // => 'FOO BAR'
fork icon0
star icon4
watch icon0

+ 15 other calls in file

Other functions in lodash

Sorted by popularity

function icon

lodash.get is the most popular function in lodash (7670 examples)