Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

moved root so that README and tests are included

  • Loading branch information...
commit b5717e42b200913ad9ce6fffb4595a27532fd1d6 1 parent bb756b5
@coolaj86 authored
Showing with 13 additions and 12 deletions.
  1. +11 −10 README.md
  2. +2 −2 {lib → }/package.json
View
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');
View
4 lib/package.json → package.json
@@ -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": {}
}
Please sign in to comment.
Something went wrong with that request. Please try again.