Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
small async json in-memory store with cursors and events, < 3kb min, < 2kb gz
• Example • Why • API • License
import create from 'attostore'
var store = create({
a: 'myInitValue',
b:{c: 'myNestedValue'}
})
store.ref().on('b/*', function(val, old, key, obj) {
console.log('key "c" changed')
})
store.ref(['b', 'c']).on('', function(val, old, key, obj) {
console.log('key "c" changed')
})
store.ref('b/c').set('newValue').then(function(patch) {
console.log(patch && patch.length ? 'changed' : 'not changed')
})
store.ref(['b', 'c']).set('anotherValue', function(err, acts) {
if (!err) console.log(patch && patch.length ? 'changed' : 'not changed')
})
supports different environments
var create = require('attostore')
import create from 'attostore'
var create = window.attostore
attostore(initValue: any
): Store
store.ref(path: Array|string|number
): Ref
store.patch(acts: Array
, ondone: (err, acts) => void
]): void
ref.root: Ref
ref.parent: Ref
ref.keys(path: Path
): Array
ref.set(path: Path
, value: any
, ondone: (err, acts) => void
): void
ref.set(path: Path
, value: any
): Promise
ref.del(path: Path
, ondone: (err, acts) => void
): void
ref.del(path: Path
): Promise
ref.on(path: Path
, handler: (val, old, key)=>void
, [, context: any
]): Ref
ref.once(path: Path
, handler: (val, old, key)=>void
, [, context: any
]): Ref
ref.off(path: Path
, handler: (val, old, key)=>void
, [, context: any
]): Ref
ref.query(transform: any => any
): Query
query.on(path: Path
, handler: (val, old, key)=>void
, [, context: any
]): Ref
query.once(path: Path
, handler: (val, old, key)=>void
, [, context: any
]): Ref
query.off(path: Path
, handler: (val, old, key)=>void
, [, context: any
]): Ref
Array|string|number
0
, "0"
, [0]
, ["0"]
are equivalent''
, null
, undefined
are equivalenta/b
, ["a", "b"]
are equivalentref.on('*/id', cb)
Simple patch format for atomic changes:
[{k: 'a/b/c', v: 'abc'}, {k:['a','b','c']}]
FAQs
json data store
We found that attostore demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.