moved root so that README and tests are included

This commit is contained in:
AJ ONeal 2013-01-26 02:07:18 -07:00
parent bb756b5cf4
commit b5717e42b2
2 changed files with 13 additions and 12 deletions

View File

@ -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. 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. 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') var localStorage = require('localStorage')
, myValue = { foo: 'bar', baz: 'quux' } , myValue = { foo: 'bar', baz: 'quux' }
@ -18,8 +19,7 @@ Usage
localStorage.setItem('myKey', JSON.stringify(myValue)); localStorage.setItem('myKey', JSON.stringify(myValue));
myValue = localStorage.getItem('myKey'); myValue = localStorage.getItem('myKey');
API ## API
---
* getItem(key) * getItem(key)
* setItem(key, value) * setItem(key, value)
@ -28,8 +28,9 @@ API
* key(n) * key(n)
* length * length
Tests ## Tests
---
null === localStorage.getItem('key');
0 === localStorage.length; 0 === localStorage.length;
null === localStorage.getItem('doesn't exist'); null === localStorage.getItem('doesn't exist');

View File

@ -2,7 +2,7 @@
"author": "AJ ONeal <coolaj86@gmail.com> (http://coolaj86.info)", "author": "AJ ONeal <coolaj86@gmail.com> (http://coolaj86.info)",
"name": "localStorage", "name": "localStorage",
"description": "W3C localStorage for Node.JS", "description": "W3C localStorage for Node.JS",
"version": "1.0.1", "version": "1.0.2",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/coolaj86/node-localStorage.git" "url": "git://github.com/coolaj86/node-localStorage.git"
@ -10,7 +10,7 @@
"engines": { "engines": {
"node": ">= v0.2.0" "node": ">= v0.2.0"
}, },
"main": "localStorage.js", "main": "./lib/localStorage.js",
"dependencies": {}, "dependencies": {},
"devDependencies": {} "devDependencies": {}
} }