
Security News
npm Introduces minimumReleaseAge and Bulk OIDC Configuration
npm rolls out a package release cooldown and scalable trusted publishing updates as ecosystem adoption of install safeguards grows.
An opinionated LevelUP abstraction that stores and operate on keys in the form of parent/child
Childish is an opinionated
LevelUP abstraction that stores
and operate on keys in the form of parent/child.
Besides giving you a way to store and delete these keys, you can query
for the existence of a key using .ok(key) get a list of all children
of a given parent using .children(parent) or a list of all parents
using .parents(child).
Notice that there are no values associated with the keys. This is just a database for storing parent-child relationships using a hierarchical key structure.
You can use any LevelDOWN compatible datastore you like as your backend. Here are a few popular once:
npm install childish
var levelup = require('level');
var db = require('childish')(levelup('/tmp/my-db'));
db.put('admin/odin', function (err) {
db.put('moderator/odin', function (err) {
db.put('moderator/thor', function (err) {
db.ok('admin/odin', function (err, ok) {
if (ok) console.log('Odin is an admin');
});
console.log('The follwoing users are admins:');
db.children('admin').pipe(console.log);
console.log('Odin have the following permissions:');
db.parents('odin').pipe(console.log);
});
});
});
db.put(key, callback) - Register a key (key format: parent/child)db.ok(key, callback) - Check if a key exists (key format: parent/child)db.del(key, callback) - Remove a key (key format: parent/child)db.children(parent) - Get a stream of all children for parentdb.parents(child) - Get a stream of all parents for childMIT
FAQs
An opinionated LevelUP abstraction that stores and operate on keys in the form of parent/child
We found that childish 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
npm rolls out a package release cooldown and scalable trusted publishing updates as ecosystem adoption of install safeguards grows.

Security News
AI agents are writing more code than ever, and that's creating new supply chain risks. Feross joins the Risky Business Podcast to break down what that means for open source security.

Research
/Security News
Socket uncovered four malicious NuGet packages targeting ASP.NET apps, using a typosquatted dropper and localhost proxy to steal Identity data and backdoor apps.