
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
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.
The npm package remodel receives a total of 1 weekly downloads. As such, remodel popularity was classified as not popular.
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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.