Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
js-core-data
Advanced tools
==============
CoreData is very powerful framework created by Apple for working with data. This module is heavily inspired by it's principles and simplifies usage by implementing methods to fit server environment. Providing easy interface for defining data model, version migration, working with entities and persisting data to persistent store.
View Node Package Manager:
npm install --save js-core-data
Then install database client:
npm install --save mysql|sqlite3|pg
For more information please visit documentation: ViewDocs.io documentation
var CoreData = require('js-core-data');
var db = new CoreData('sqlite://:memory:');
var User = db.define('User',{username:'string'});
var Company = db.define('Company',{name:'string'});
db.defineRelationship(User,Company,'company',{inverse:'users'});
db.defineRelationship(Company,User,'users',{inverse:'company',toMany:true});
db.syncSchema({force:true}).then(function(){
console.log('schema synced')
var context = db.createContext();
var user1 = context.create('User',{username:'user1'});
var user2 = context.create('User',{username:'user2'});
var company = context.create('Company',{name:'test company'});
user1.setCompany(company);
company.addUser(user2);
context.save().then(function(){
context.destroy();
})
})
To run tests locally you need docker
and docker-compose
installed
docker-compose up
npm test
FAQs
ORM inspired by Apple's Objective-C CoreData
We found that js-core-data 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.