Chunks

A super duper, teeny tiny functional library.

Chunks

Chunks is a super duper, teeny tiny functional library for JavaScript.

The annotated source code is available.

Information

Installation

npm install chunks

You can also install it via Bower:

bower install chunks

Usage

There's currently 20 functions available in the library which you can use to your heart's content.

The Collection functions can be used on both arrays and objects, while the others (except for the Types functions) are meant to be used on their respective type.

Functions

Collections

  • Chunks.forEach or Chunks.each
  • Chunks.map
  • Chunks.filter
  • Chunks.reduce
  • Chunks.some
  • Chunks.every
  • Chunks.index
  • Chunks.contains
  • Chunks.size
  • Chunks.clone
  • Chunks.sort

Types

  • Chunks.isArray
  • Chunks.isObject

Arrays

  • Chunks.first
  • Chunks.last
  • Chunks.flatten

Objects

  • Chunks.keys
  • Chunks.values
  • Chunks.has
  • Chunks.extend

An API reference is also available.

For more information, go to the source code repository.