mirror of
https://github.com/meteor/meteor.git
synced 2026-01-14 18:18:01 -05:00
950 B
950 B
title, description
| title | description |
|---|---|
| underscore | Documentation of Meteor's `underscore` package. |
Underscore is a utility-belt library for JavaScript that provides support for functional programming. It is invaluable for writing clear, concise JavaScript in a functional style.
The underscore package defines the _ namespace on both the client
and the server.
{% pullquote warning %}
We have slightly modified the way Underscore differentiates between
objects and arrays in collection functions.
The original Underscore logic is to treat any object with a numeric length
property as an array (which helps it work properly on
NodeLists).
In Meteor's version of Underscore, objects with a numeric length property
are treated as objects if they have no prototype (specifically, if
x.constructor === Object.
{% endpullquote %}