文件名称:mock-dom-storage:NodeJS的简单模拟dom存储
文件大小:3KB
文件格式:ZIP
更新时间:2024-06-09 00:23:58
JavaScript
模拟存储 的内存实现,用于测试! var localStorage = MockDomStorage ( ) localStorage . setItem ( 'thing' , 'value' ) localStorage . getItem ( 'thing' ) // => 'value' localStorage . getItem ( 'unknown' ) // => null localStorage . length // => 1 localStorage . setItem ( 'hello' , 'world' ) localStorage . setItem ( 'name' , 'person' ) localStorage . length // => 3 api var mockStorage = require ( 'mock-dom-storag
【文件预览】:
mock-dom-storage-master
----test.js(2KB)
----.travis.yml(63B)
----README.md(1KB)
----.gitignore(57B)
----index.js(538B)
----package.json(512B)