
Product
Introducing Pull Request Stories to Help Security Teams Track Supply Chain Risks
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
@dashevo/dapi-db-counterstore
Advanced tools
A simple counters database. Useful for example counting events separate from data.
Used in orbit-db.
npm install orbit-db ipfs
First, create an instance of OrbitDB:
const IPFS = require('ipfs')
const OrbitDB = require('orbit-db')
const ipfs = new IPFS()
const orbitdb = new OrbitDB(ipfs)
Get a log database and add an entry to it:
const counter = orbitdb.counter('visitors')
counter.inc()
console.log(counter.value)
// 1
counter.inc(4)
console.log(counter.value)
// 5
Later, when the database contains data, load the history and query when ready:
const counter = orbitdb.counter('visitors')
counter.events.on('ready', () => {
counter.inc()
console.log(counter.value)
// 6
})
See example/index.html for a detailed example. Note that to run this example, you need to have a local IPFS daemon running at port 5001.
See orbit-db's API Documenations for full details.
See orbit-db's contributing guideline.
MIT © 2016-2018 Protocol Labs Inc., Haja Networks Oy, 2018 Dash Core Group, Inc.
FAQs
Counter store for dapi-db
The npm package @dashevo/dapi-db-counterstore receives a total of 0 weekly downloads. As such, @dashevo/dapi-db-counterstore popularity was classified as not popular.
We found that @dashevo/dapi-db-counterstore demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 open source maintainers 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.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.