Socket
Socket
Sign inDemoInstall

underscore-es

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

underscore-es

javaScript's functional programming helper library ; even for ES6 and beyond.


Version published
Weekly downloads
126
decreased by-28.81%
Maintainers
1
Weekly downloads
 
Created
Source
                   __
                  /\ \                                                         __
 __  __    ___    \_\ \     __   _ __   ____    ___    ___   _ __    __       /\_\    ____
/\ \/\ \ /' _ `\  /'_  \  /'__`\/\  __\/ ,__\  / ___\ / __`\/\  __\/'__`\     \/\ \  /',__\
\ \ \_\ \/\ \/\ \/\ \ \ \/\  __/\ \ \//\__, `\/\ \__//\ \ \ \ \ \//\  __/  __  \ \ \/\__, `\
 \ \____/\ \_\ \_\ \___,_\ \____\\ \_\\/\____/\ \____\ \____/\ \_\\ \____\/\_\ _\ \ \/\____/
  \/___/  \/_/\/_/\/__,_ /\/____/ \/_/ \/___/  \/____/\/___/  \/_/ \/____/\/_//\ \_\ \/___/
                                                                              \ \____/
                                                                               \/___/

Underscore.js is a utility-belt library for JavaScript that provides support for the usual functional suspects (each, map, reduce, filter...) without extending any core JavaScript objects. It's available in ES6 and UMD (cjs, amd, iife) formats

ES6 & Beyond usage:

  • partial importation of features (just call the function's name prefixed by _).

(nb: only _chain isn't available in this case)

import {_template} from 'underscore-es';

var basicTemplate = _template("Ok, i use <%= builder %> for my es6 and beyond stuff !");
var result = basicTemplate({builder: 'rollup'});
console.log( result ); 
// => "Ok, i use rollup for my es6 and beyond stuff !"
  • global importation of all features
import _ from 'underscore-es';

_.chain([4,7])
 .union([7,0,3])
 .initial()
 .reverse()
 .head()
 .value()
 // => 0
  • breaking changes

Since this underscore source code has been rewritten to be more es6 friendly, the _.templateSettings property is now _.template.settings and the _.iteratee shall now (for global importation) be overwritten through _.setIteratee([fn]) method.

Documentation is the to find what you need to know !

This project adheres to a code of conduct. By participating, you are expected to uphold this code.

For Docs, License, Tests, and pre-packed downloads, see: http://underscorejs.org

For support and questions, please use the gitter channel or stackoverflow

Underscore is an open-sourced component of DocumentCloud: https://github.com/documentcloud

Many thanks to our contributors: https://github.com/jashkenas/underscore/contributors

Keywords

FAQs

Package last updated on 12 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc