
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
category-count-stream
Advanced tools
Writable object stream for getting percentages of categories
Count occurances of nominal categories in a JSON object streams of a given key.
Install with npm install category-count-stream
.
var categorycount = require('category-count-stream')
var countFood = categorycount('food', function (result) {
console.log(result) // outputs { banana: 1, tofu: 2, missing: 1 }
})
countFood.write({food: 'banana'})
countFood.write({food: 'tofu'})
countFood.write({food: 'tofu'})
countFood.write({bla: 'blub'})
countFood.end()
If you install it with npm install category-count-stream -g
, there will
be the category-count
tool available.
Given a file food.ldjson
{"food": "tofu"}
{"food": "tofu"}
{"food": "tofu"}
{"food": "banana"}
{"bla": "blub"}
This command will return the following:
$ category-count food < food.ldjson
{"tofu":3,"banana":1,"missing":1}
FAQs
Writable object stream for getting percentages of categories
We found that category-count-stream 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.