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.
Generator-based query interface for rethinkdb.
A simple wrapper around the excellent rethinkdb lib, with generator support, and some modeling goodness thrown in.
$ npm install remodel
var r = require('rethinkdb');
var co = require('co');
var remodel = require('remodel')('localhost');
var User = remodel.create('Users');
co(function *() {
var dbList = yield remodel(r.dbList());
var user = yield User.filter({email: 'a@test.com'});
})();
var r = require('rethinkdb');
// Provide connection details when requiring remodel.
// These connection details are passed directly to reql-then
// which sets up a connection pool for you
remodel = require('remodel'){
host: 'localhost',
port: 28015,
db: 'test',
authKey: '',
maxPoolSize: 10 // set to 1 to disable connection pooling
});
// query interface
function *() {
// accepts any rethinkdb query
// returns actual results, not a cursor
yield remodel.query(r.dbList());
yield remodel.query(r.db('test').tableList());
yield remodel.query(r.db('test').table('Users').insert({email: 'test@test.com'}));
// aliases
yield remodel.q(r.dbList());
yield remodel(r.dbList());
}
// model interface
var User = remodel.create('Users'); // pass the table name
function *() {
yield User.all(); // returns all users
// add your own helper finder methods
User.findByEmail = function *(email) {
return yield this.filter({email: email.trim().toLowerCase()});
}
// use regular rethinkdb querying
var user = yield User.get(1234); // primary key lookup
var users = yield User.filter({email: 'test@test.com'});
var users = yield User.getAll('test@test.com', {index: 'email'}); // use an index for faster querying
// complete list
yield User.between
yield User.count
yield User.filter
yield User.forEach
yield User.get
yield User.getAll
yield User.groupBy
yield User.groupedMapReduce
yield User.indexCreate
yield User.indexList
yield User.indexWait
yield User.info
yield User.insert
yield User.limit
yield User.map
yield User.orderBy
yield User.pluck
yield User.skip
yield User.union
yield User.withFields
yield User.without
}
MIT
FAQs
Generator-based query interface for rethinkdb.
We found that remodel 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.