diff --git a/README.md b/README.md index f7dd256..08b6231 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,16 @@ -localStorage -=== +# DOMStorage + +See https://github.com/coolaj86/node-dom-storage for a slightly better version of the same thing. + +# localStorage An inefficient, but as W3C-compliant as possible using only pure JavaScript, `localStorage` implementation. -Purpose ----- +## Purpose This is meant for the purpose of being able to run unit-tests and such for browser-y modules in node. -Usage ----- +## Usage var localStorage = require('localStorage') , myValue = { foo: 'bar', baz: 'quux' } @@ -18,8 +19,7 @@ Usage localStorage.setItem('myKey', JSON.stringify(myValue)); myValue = localStorage.getItem('myKey'); -API ---- +## API * getItem(key) * setItem(key, value) @@ -28,8 +28,9 @@ API * key(n) * length -Tests ---- +## Tests + + null === localStorage.getItem('key'); 0 === localStorage.length; null === localStorage.getItem('doesn't exist'); diff --git a/lib/package.json b/package.json similarity index 85% rename from lib/package.json rename to package.json index 84ab55b..a66c771 100644 --- a/lib/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "AJ ONeal (http://coolaj86.info)", "name": "localStorage", "description": "W3C localStorage for Node.JS", - "version": "1.0.1", + "version": "1.0.2", "repository": { "type": "git", "url": "git://github.com/coolaj86/node-localStorage.git" @@ -10,7 +10,7 @@ "engines": { "node": ">= v0.2.0" }, - "main": "localStorage.js", + "main": "./lib/localStorage.js", "dependencies": {}, "devDependencies": {} }