lodash ↔ Lib extends JS with useful utility functions
Sources: GitHub - lodash/lodash: A modern JavaScript utility library delivering modularity, performance, & extras. Lodash Docs v4.17.11 – Documentation for JavaScript utility library
follows a Functional Programming Paradigm
imported with _ namespace
_.reverse(array)
to return new Array with reversed index
_.uniq(array)
to return new duplicate-free Array
_.uniqWith()
to return new duplicate-free Array with additional callback to control equality comparison
_.forEach(collection, [iteratee])
redundant
_.cloneDeep(value)
_.chain(value)
return lodash wrapper instance over value input allowing method chaining
_.camelCase(string)
return string with camelCase (removes delimiters: whitespace, _ & -)
_.escape(string)
return string convert into HTML Entity (& < \> " ')
_.escapeRegExp(string)
return string with escaped characters for reserved RegExp special characters (& $ . * + ? ( ) [``] { } |)
_.kebabCase(string)
return string with kebab-case
_.snakeCase(string)
return string with snake_case
_.unescape(string)
return string with HTML Entity convert back to normal chars - !inverse _.escape(string)
References
_.chain(value)↔ returnlodashwrapper instance overvalueinput allowing method chaining