From 1f42d023fbc661e1424a0fb1ef9e146e6dfb8a69 Mon Sep 17 00:00:00 2001 From: dandean Date: Mon, 20 Dec 2010 23:55:06 -0800 Subject: [PATCH] documentation; --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index f60ec21..1d559d9 100644 --- a/README.md +++ b/README.md @@ -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 \ No newline at end of file