
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
observ-sync-hash
Advanced tools
Synchronize an observable hash table with an array with primary keys
Synchronize an observable hash table with an array with primary keys
$ npm install --save observ-sync-hash
var sync = require('observ-sync-hash')
var ObservArray = require('observ-array')
var Hash = require('observ-varhash')
var array = ObservArray([])
var hash = Hash({})
sync(array, hash)
array.push(123)
hash()
//=> {123: null}
array.splice(0, 1)
hash()
//=> {}
sync(array, hash, [key])
-> function
Returns an unlisten
function.
Required
Type: function
Required
Type: function
Type: string
If provided, the hash keys will be derived from a property of each array item instead of the string values themselves. You can use id
or even dot syntax, e.g. foo.id
.
Type: boolean
Default: false
If true
, data from the array will be added to the hash instead of null
values.
MIT © Ben Drucker
FAQs
Synchronize an observable hash table with an array with primary keys
The npm package observ-sync-hash receives a total of 6 weekly downloads. As such, observ-sync-hash popularity was classified as not popular.
We found that observ-sync-hash 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
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.