From b5717e42b200913ad9ce6fffb4595a27532fd1d6 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 26 Jan 2013 02:07:18 -0700 Subject: [PATCH] moved root so that README and tests are included --- README.md | 21 +++++++++++---------- lib/package.json => package.json | 4 ++-- 2 files changed, 13 insertions(+), 12 deletions(-) rename lib/package.json => package.json (85%) 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": {} }