Developer Tools60k+ stars

Lodash

A modern JavaScript utility library delivering modularity and performance

Commit Details

Message
"Initial commit"
Author
John-David Dalton
Date
2012-04-01
Hash
d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1

Fun Fact

Lodash started as a fork of Underscore.js. John-David Dalton created it to be faster and more consistent across environments.

</>First Code

JavaScript
/**
 * @license
 * lodash <https://lodash.com/>
 * Copyright JS Foundation and other contributors
 */

;(function() {
  'use strict';

  /** Used as a reference to the global object. */
  var root = typeof global !== 'undefined' ? global : this;

  /**
   * Creates an array of the own enumerable property names of `object`.
   */
  function keys(object) {
    return Object.keys(object);
  }

  /**
   * Iterates over elements of `collection`.
   */
  function forEach(collection, iteratee) {
    return collection.forEach(iteratee);
  }

  // The magic: consistent cross-environment utilities
  root._ = { keys, forEach, map, filter, reduce };

}.call(this));