包详细信息

oolong

moll51.3k1.15.1

Utilities for objects. Simple, tasteful and plentiful. Supports inherited properties.

functional, underscore, util

自述文件

Oolong.js

NPM version Build status

Oolong.js is a library for JavaScript full of object-related utilities. It's similar to Underscore.js, but it focuses strictly on functions dealing with objects. It's implementation emphasizes simplicity and good taste. For example, it always takes inherited properties into account leading to less surprises for users of your code.

Oolong.js grew out of my frustration with Underscore.js and Lodash.js and their inconsistent and sometimes outright ignorance of inherited properties. This leads to unnecessary complexity, arbitrary constraints and a leaky-implementation in your code or public APIs. This behavior is cancer propelled around by ignorance and misunderstandings between dictionaries and interfaces. Oolong.js is my first step at killing it.

Installing

npm install oolong

Oolong.js follows semantic versioning, so feel free to depend on its major version with something like >= 1.0.0 < 2 (a.k.a ^1.0.0).

API

For extended documentation on all functions, please see the Oolong.js API Documentation.

Oolong

License

Oolong.js is released under a Lesser GNU Affero General Public License, which in summary means:

  • You can use this program for no cost.
  • You can use this program for both personal and commercial reasons.
  • You do not have to share your own program's code which uses this program.
  • You have to share modifications (e.g. bug-fixes) you've made to this program.

For more convoluted language, see the LICENSE file.

About

Andri Möll typed this and the code.
Monday Calendar supported the engineering work.

If you find Oolong.js needs improving, please don't hesitate to type to me now at andri@dot.ee or create an issue online.

更新日志

1.15.1 (Jul 21, 2016)

  • Fixes Oolong.create to not mutate the prototype argument under global strict mode when given objects to assign to it.
    This affected only people running their JavaScript engine (like V8) under global strict mode (--use-strict), which seems very rare.

1.15.0 (Jul 15, 2016)

1.14.1 (Nov 12, 2015)

  • Changes Oolong.pickDeep to take an array of keys (["a", "b", "c"]) instead of a string with embedded periods (a.b.c).
    As using periods initially was a brain fluke noticed shortly after releasing v1.14, increasing only the patch version number.

1.14.0 (Nov 12, 2015)

1.13.0 (Jul 24, 2015)

1.12.0 (Jun 26, 2015)

1.11.1 (Jun 24, 2015)

  • Fixes Oolong.isPlainObject to return false for Array.prototype.
    JavaScript is a prototypical language after all and the prototype of an array is an array.

1.11.0 (Jun 14, 2015)

1.10.0 (Jun 12, 2015)

1.9.0 (Jun 1, 2015)

1.8.0 (May 29, 2015)

1.7.0 (Apr 15, 2015)

  • Renames Objectware to Oolong.

1.6.0 (Feb 19, 2015)

1.5.0 (Feb 10, 2015)

1.4.0 (Feb 8, 2015)

1.3.0 (Feb 8, 2015)

1.2.0 (Feb 7, 2015)

  • Fixes Oolong.merge to clone plain objects objects recursively.
    Previously in some cases it cloned objects shallowly.
  • Adds Oolong.cloneDeep.

1.1.0 (Feb 7, 2015)

1.0.0 (Jan 13, 2015)

  • Perfectly objective.