Skip to content

Commit

Permalink
documentation;
Browse files Browse the repository at this point in the history
  • Loading branch information
dandean committed Dec 21, 2010
1 parent 0659f67 commit 1f42d02
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Expand Up @@ -11,4 +11,19 @@ Object additions adds methods to the `Object` class if not already present. The
* `extend`
* `values`

Usage
--------------------------------------------------------------------------------

To get a reference to the additions, while NOT modifying the global `Object` object, just require the package:

var additions = require("object-additions").object;
additions.isString("hi");
// -> true

If, on the other hand, you _want_ to just add these to the global `Object` object, call the `add` method:

require("object-additions").add();
Object.isString("hi");
// -> true

These additions are inspired (and sometimes directly copied from) Prototype.js

0 comments on commit 1f42d02

Please sign in to comment.