@cycle/storage
Advanced tools
Comparing version 4.0.0 to 4.1.0
@@ -1,29 +0,23 @@ | ||
/* eslint-disable */ | ||
var h = CycleDOM.h | ||
var makeDOMDriver = CycleDOM.makeDOMDriver | ||
var storageDriver = CycleStorageDriver.default | ||
import { run } from '@cycle/run'; | ||
import { makeDOMDriver, div, input } from '@cycle/dom'; | ||
import storageDriver from '../lib/index'; | ||
function main(response) { | ||
const DOM = response.DOM | ||
const storage = response.storage | ||
const storageRequest$ = DOM.select('input') | ||
.events('keydown') | ||
.debounce(50) | ||
.map(function(ev) { | ||
return { | ||
function main(sources) { | ||
const storageRequest$ = sources.DOM.select('input') | ||
.events('input') | ||
.map(ev => ({ | ||
key: 'inputText', | ||
value: ev.target.value | ||
}; | ||
}); | ||
})); | ||
return { | ||
DOM: storage.local | ||
const vdom$ = sources.storage.local | ||
.getItem('inputText') | ||
.startWith('') | ||
.map(function(text) { | ||
return h('div', [ | ||
h('input', { type: 'text', value: text}), | ||
h('div', 'currently in localStorage under key "inputText": ' + text), | ||
]) | ||
}), | ||
.map(text => div([ | ||
input({ attrs: { type: 'text' }, props: { value: text }}), | ||
div(['currently in localStorage under key "inputText": ' + text]) | ||
])); | ||
return { | ||
DOM: vdom$, | ||
storage: storageRequest$ | ||
@@ -33,5 +27,5 @@ }; | ||
Cycle.run(main, { | ||
run(main, { | ||
DOM: makeDOMDriver('#app'), | ||
storage: storageDriver, | ||
}) |
{ | ||
"name": "@cycle/storage", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"description": "A Cycle.js driver for localStorage and sessionStorage.", | ||
"main": "lib/index.js", | ||
"author": "Kahlil Lechelt", | ||
"license": "MIT", | ||
"repository": "kahlil/cycle-storage-driver", | ||
"scripts": { | ||
"transpile": "babel -d lib src", | ||
"zuul:local": "zuul --local 8080 -- test/test.js", | ||
"test:ci": "zuul -- test/test.js", | ||
"test": "npm-run-all lint transpile zuul:local", | ||
"lint": "eslint src/*.js test/*.js", | ||
"prepublish": "npm run transpile", | ||
"open": "opener http://localhost:8080/__zuul", | ||
"docs": "node ./scripts/make-api-docs.js", | ||
"mkdirp:dist": "mkdirp dist", | ||
"browserify": "browserify src/index.js -t babelify -t browserify-shim --standalone CycleStorageDriver --exclude rx --outfile dist/cycle-storage-driver.js", | ||
"browserify:example": "browserify src/index.js -t babelify -t browserify-shim --standalone CycleStorageDriver --exclude rx --outfile example/cycle-storage-driver.js", | ||
"uglify": "uglifyjs dist/cycle-storage-driver.js -o dist/cycle-storage-driver.min.js", | ||
"build:js": "npm-run-all mkdirp:dist browserify browserify:example uglify", | ||
"serve": "live-server example" | ||
}, | ||
"repository": "https://github.com/cyclejs/storage/tree/master", | ||
"contributors": [ | ||
{ | ||
"name": "Andre Staltz", | ||
"email": "andre@staltz.com" | ||
}, | ||
{ | ||
"name": "Jan van Brügge", | ||
"email": "jan@vanbruegge.de" | ||
} | ||
], | ||
"main": "lib/index.js", | ||
"typings": "lib/index.d.ts", | ||
"types": "lib/index.d.ts", | ||
"dependencies": { | ||
"@cycle/run": "^3.0.0" | ||
"@cycle/run": "^3.1.0" | ||
}, | ||
"peerDependencies": { | ||
"xstream": ">=2" | ||
"xstream": "*" | ||
}, | ||
"devDependencies": { | ||
"@cycle/rxjs-run": "^6.1.0", | ||
"babel-cli": "^6.1.2", | ||
"babel-eslint": "^4.1.4", | ||
"babel-preset-es2015": "^6.1.4", | ||
"babel-preset-stage-0": "^6.1.2", | ||
"babelify": "^7.2.0", | ||
"browserify": "^12.0.1", | ||
"browserify-shim": "^3.8.11", | ||
"eslint": "^1.9.0", | ||
"eslint-config-cycle": "^3.0.0", | ||
"eslint-plugin-cycle": "^1.0.2", | ||
"faucet": "0.0.1", | ||
"live-server": "^0.8.2", | ||
"@cycle/dom": "^18.0.0", | ||
"@types/node": "^8.0.19", | ||
"@types/tape": "^4.2.30", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-preset-stage-0": "^6.24.1", | ||
"babelify": "^7.3.0", | ||
"browserify": "^14.4.0", | ||
"browserify-shim": "^3.8.14", | ||
"cp-cli": "^1.0.2", | ||
"localstorage-memory": "^1.0.2", | ||
"markdox": "^0.1.10", | ||
"mkdirp": "^0.5.1", | ||
"npm-run-all": "^1.2.13", | ||
"opener": "^1.4.1", | ||
"tape": "^4.2.2", | ||
"uglify-js": "^2.6.0", | ||
"watchify": "^3.6.0", | ||
"xstream": "^10.3.0", | ||
"zuul": "^3.7.2" | ||
"opener": "^1.4.3", | ||
"prettier": "^1.5.3", | ||
"tape": "^4.8.0", | ||
"ts-node": "^3.3.0", | ||
"typescript": "^2.4.2", | ||
"xstream": "^10.9.0" | ||
}, | ||
"engines": { | ||
"node": ">=0.10.0" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"browserify-shim": { | ||
"rx": "global:Rx" | ||
"xstream": "global:xstream" | ||
}, | ||
"scripts": { | ||
"format": "prettier --write --single-quote --no-bracket-spacing --trailing-comma=all '{src,test}/**/*.{ts,js}'", | ||
"build": "tsc -d", | ||
"docs": "node ./.scripts/make-api-docs.js", | ||
"test-node": "ts-node test/*.ts", | ||
"test": "npm run test-node", | ||
"test:ci": "npm run test", | ||
"prebrowserify": "mkdirp dist", | ||
"browserify": "browserify lib/index.js --global-transform=browserify-shim --standalone CycleStorage --exclude xstream --outfile dist/cycle-storage.js", | ||
"minify": "node ./.scripts/minify.js dist/cycle-storage.js dist/cycle-storage.min.js", | ||
"prebrowserify:example": "mkdirp dist/example", | ||
"browserify:example": "browserify example/app.js -t babelify --outfile dist/example/app.js", | ||
"example": "npm run build && npm run browserify && npm run browserify:example && cp-cli example/index.html dist/example/index.html && opener dist/example/index.html" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
18
1
2
25802
24
504
2
Updated@cycle/run@^3.1.0