
Security News
High Salaries No Longer Enough to Attract Top Cybersecurity Talent
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
A basic graph database
Note: This requires ES6 Collections - Enable them with --harmony-collections
There are two types of objects (by default):
You can register objects into a database and associate two objects together. To get the objects back you can either get all objects of a type or get all associated objects of an object (optionally restricting it to a type).
DB
Object
Data
ID
Don't use one of these with multiple databases - only the last one you register it with will work
var ddb = require('ddb')
var util = require('util')
// Create a database
var db = new ddb.DB
// Create a person class of identity
function Person() {
ddb.ID.call(this)
}
util.inherits(Person, ddb.ID)
// Create a name class of data
function Name() {
ddb.Data.apply(this, arguments)
}
util.inherits(Name, ddb.Data)
// Create a new person
var johnDoe = new Person
db.register(johnDoe) // and register him with in the db
console.log('John Doe:', johnDoe)
// Create the first name
var firstName = new Name('first', 'John')
db.register(firstName) // register it
db.assoc(johnDoe, firstName) // associate it with John Doe
// Create the last name
var lastName = new Name('last', 'Doe')
db.register(lastName) // register it
db.assoc(johnDoe, lastName) // associate it with John Doe
console.log('John Doe\'s names:', db.assocs(johnDoe, Name))
console.log('People with a last name of Doe:', db.assocs(new Name('last', 'Doe')))
FAQs
A basic graph database
The npm package ddb receives a total of 0 weekly downloads. As such, ddb popularity was classified as not popular.
We found that ddb 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
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.