moved root so that README and tests are included
This commit is contained in:
parent
bb756b5cf4
commit
b5717e42b2
21
README.md
21
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');
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"author": "AJ ONeal <coolaj86@gmail.com> (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": {}
|
||||
}
|
Loading…
Reference in New Issue