# jashkenas/underscore

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/jashkenas-underscore).**

27,346 stars · 5,447 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/jashkenas/underscore
- Homepage: https://underscorejs.org
- awesome-repositories: https://awesome-repositories.com/repository/jashkenas-underscore.md

## Description

Underscore is a JavaScript utility library providing a suite of functional programming and data manipulation helpers. It serves as a framework for transforming data collections, composing functions, managing objects, and performing precise data type validation without modifying core language prototypes.

The project includes a functional programming toolkit designed to control function execution timing and behavior through techniques such as debouncing, throttling, and partial application. It also provides a dedicated object manipulation utility for cloning, merging, picking, and omitting properties.

The library covers broad capability areas including collection iteration, search, and aggregation. It further provides tools for object structure transformation and a validation system to determine if values are arrays, functions, dates, or other specific types.

The suite also includes capabilities for dynamic template generation to handle conditional logic and repeated sections within strings.

## Tags

### Data & Databases

- [Array Manipulation Utilities](https://awesome-repositories.com/f/data-databases/array-manipulation-utilities.md) — Acts as a comprehensive utility library for transforming and filtering arrays and objects in JavaScript.
- [Collection Iteration](https://awesome-repositories.com/f/data-databases/collection-iterators/collection-iteration.md) — Provides utilities to execute a function for every element within an array or object. ([source](https://github.com/jashkenas/underscore/blob/master/underscore-node.mjs))
- [Collection Reductions](https://awesome-repositories.com/f/data-databases/collection-iterators/collection-iteration/collection-reductions.md) — Provides a reduce function to collapse arrays and objects into a single output value.
- [Collection Search Utilities](https://awesome-repositories.com/f/data-databases/collection-utilities/collection-search-utilities.md) — Provides utilities to find specific elements, keys, or indices within data collections. ([source](https://github.com/jashkenas/underscore/blob/master/underscore-node.mjs))
- [Data Filtering Utilities](https://awesome-repositories.com/f/data-databases/data-filtering-utilities.md) — Provides methods for narrowing down data sets by excluding elements that fail specific criteria. ([source](https://github.com/jashkenas/underscore/blob/master/underscore-node.mjs))
- [Functional Data Aggregation](https://awesome-repositories.com/f/data-databases/functional-data-aggregation.md) — Includes aggregation helpers that collapse collections into a single result via a cumulative function. ([source](https://github.com/jashkenas/underscore/blob/master/underscore-node.mjs))
- [Object Collection Processors](https://awesome-repositories.com/f/data-databases/ordered-data-structures/ordered-collection-literals/object-collection-processors.md) — Provides extensive methods for filtering, sorting, and transforming object collections and arrays.
- [Object Transformation](https://awesome-repositories.com/f/data-databases/ordered-data-structures/ordered-collection-literals/object-collection-processors/object-transformation.md) — Provides utilities for cloning, merging, picking, and omitting properties from JavaScript objects. ([source](https://github.com/jashkenas/underscore/blob/master/underscore-node.mjs))

### Programming Languages & Runtimes

- [JavaScript Utility Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/javascript-utility-libraries.md) — Offers a comprehensive suite of functional programming and data manipulation helpers for JavaScript.
- [Array Manipulation Utilities](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/data-structure-type-helpers/data-structure-utilities/array-manipulation-utilities.md) — Offers a comprehensive suite of methods to transform, filter, and group arrays and objects. ([source](https://github.com/jashkenas/underscore/blob/master/underscore-esm-min.js.map))
- [Array Transformation Utilities](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/functional/array-transformation-utilities.md) — Implements a functional toolkit for mapping, filtering, and reducing elements in arrays and objects. ([source](https://github.com/jashkenas/underscore/blob/master/README.md))
- [Runtime Type Detection](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/runtimes/type-definition-systems/runtime-type-dispatching/runtime-type-detection.md) — Provides consistent runtime detection of JavaScript internal classes for a variety of data types.

### Software Engineering & Architecture

- [Data Type Validation](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/data-type-validation.md) — Offers a system to validate if values are arrays, functions, dates, or other specific JavaScript types. ([source](https://github.com/jashkenas/underscore/blob/master/underscore-esm-min.js.map))
- [Functional Programming](https://awesome-repositories.com/f/software-engineering-architecture/functional-programming.md) — Provides a comprehensive library for declarative data transformation and functional composition.
- [Higher-Order Function Wrapping](https://awesome-repositories.com/f/software-engineering-architecture/higher-order-function-wrapping.md) — Implements higher-order functions to create debounced and throttled execution controllers.
- [Function Execution Utilities](https://awesome-repositories.com/f/software-engineering-architecture/function-execution-utilities.md) — Provides utilities for controlling function timing, specifically including debouncing and throttling to manage execution load. ([source](https://github.com/jashkenas/underscore/blob/master/underscore-node.mjs))
- [Memoization Caches](https://awesome-repositories.com/f/software-engineering-architecture/memoization-caches.md) — Provides a memoization utility to cache expensive function results and optimize performance.
- [Function Composition](https://awesome-repositories.com/f/software-engineering-architecture/modular-program-composition/function-composition.md) — Supports function composition to create complex operations from multiple small functional units.
- [Prototype-Safe Utilities](https://awesome-repositories.com/f/software-engineering-architecture/prototype-safe-utilities.md) — Implements a library of helpers as standalone functions to avoid modifying core JavaScript prototypes.

### User Interface & Experience

- [Predicate-Based Filtering](https://awesome-repositories.com/f/user-interface-experience/ui-element-selectors/predicate-based-filtering.md) — Includes filtering utilities that use predicate functions to determine which collection elements to retain.

### Development Tools & Productivity

- [Dynamic Templates](https://awesome-repositories.com/f/development-tools-productivity/project-scaffolding-config-code-generation/project-scaffolding-configuration/templating-engines/dynamic-templates.md) — Features a templating engine to generate dynamic strings with embedded logic and conditional sections. ([source](https://github.com/jashkenas/underscore/blob/master/SECURITY.md))
- [Template Compilation](https://awesome-repositories.com/f/development-tools-productivity/template-extensions/template-functions/template-compilation.md) — Transforms template strings into executable JavaScript functions for high-performance interpolation.

### Part of an Awesome List

- [Functional Programming](https://awesome-repositories.com/f/awesome-lists/devtools/functional-programming.md) — Utility belt for common programming tasks.
- [Generic Utilities](https://awesome-repositories.com/f/awesome-lists/devtools/generic-utilities.md) — Classic utility library for common data operations.
