New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rods

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rods - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

9

lib/model.js

@@ -75,2 +75,11 @@ var async = require('async');

model.prototype.saveAsync = function(args) {
var self = this;
return new Promise((resolve, reject) => {
self.save(args, function(err, data) {
if (err) return reject(err);
return resolve(data);
})
})
}

@@ -77,0 +86,0 @@ module.exports = model;

2

package.json
{
"name": "rods",
"version": "2.0.0",
"version": "2.0.1",
"description": "a micro ORM using knex",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -71,2 +71,14 @@ var assert = require('assert');

});
describe('.saveAsync()', async function() {
it('should save a user', async function() {
var u = await db.user.getAsync({name: 'bob'});
assert.equal(u.name, 'bob');
u.name = 'bob update';
await u.saveAsync();
var u = await db.user.getAsync(1);
assert.equal(u.name, 'bob update');
u.name = 'bob';
await u.saveAsync();
})
});
describe('.get()', function() {

@@ -73,0 +85,0 @@ it('should get a user', function(done) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc