update urls and license

This commit is contained in:
AJ ONeal 2018-03-27 23:15:41 -06:00
父節點 9c5ae4a36f
當前提交 2dedfc50e6
共有 1 個文件被更改,包括 20 次插入8 次删除

查看文件

@ -1,6 +1,13 @@
sessionStorage & localStorage for NodeJS
===
| **dom-storage**
| [atob](https://git.coolaj86.com/coolaj86/atob.js)
| [btoa](https://git.coolaj86.com/coolaj86/btoa.js)
| [unibabel.js](https://git.coolaj86.com/coolaj86/unibabel.js)
| Sponsored by [ppl](https://ppl.family)
An inefficient, but as W3C-compliant as possible using only pure JavaScript, `DOMStorage` implementation.
Purpose
@ -12,16 +19,15 @@ Usage
----
```javascript
var Storage = require('dom-storage')
var Storage = require('dom-storage');
// in-file, doesn't call `String(val)` on values (default)
, localStorage = new Storage('./db.json', { strict: false, ws: ' ' })
// in-file, doesn't call `String(val)` on values (default)
var localStorage = new Storage('./db.json', { strict: false, ws: ' ' });
// in-memory, does call `String(val)` on values (i.e. `{}` becomes `'[object Object]'`
, sessionStorage = new Storage(null, { strict: true })
// in-memory, does call `String(val)` on values (i.e. `{}` becomes `'[object Object]'`
var sessionStorage = new Storage(null, { strict: true });
, myValue = { foo: 'bar', baz: 'quux' }
;
var myValue = { foo: 'bar', baz: 'quux' };
localStorage.setItem('myKey', myValue);
myValue = localStorage.getItem('myKey');
@ -78,4 +84,10 @@ Notes
License
-------
* [Apache2](http://www.apache.org/licenses/LICENSE-2.0)
Code copyright 2012-2018 AJ ONeal
Dual-licensed MIT and Apache-2.0
Docs copyright 2012-2018 AJ ONeal
Docs released under Creative Commons.