Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

crude

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crude - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

27

lib/controller-crud-base.js

@@ -0,1 +1,2 @@

/*jshint camelcase:false */
/**

@@ -20,13 +21,17 @@ * @fileOverview The bare CRUD command implementations

var ent;
if (typeof Entity === 'function' && Entity.prototype) {
if (Entity.getInstance) {
ent = Entity.getInstance();
/** @type {Entity} An instance of Entity with CRUD methods */
this.__defineGetter__('entity', function() {
if (ent) { return ent; }
if (typeof Entity === 'function' && Entity.prototype) {
if (Entity.getInstance) {
ent = Entity.getInstance();
} else {
ent = new Entity();
}
} else {
ent = new Entity();
ent = Entity;
}
} else {
ent = Entity;
}
/** @type {Entity} An instance of Entity with CRUD methods */
this.entity = ent;
return ent;
});

@@ -89,5 +94,3 @@ // prep pagination

var rdrUrl = this.getBaseUrl(req) + '/add';
var entity = new this.Entity(req.user);
return entity.create(req.body)
return this.entity.create(req.body)
.then(this._handleCreate.bind(this, req, res))

@@ -94,0 +97,0 @@ .catch(this.handleError.bind(this, req, res, rdrUrl));

{
"name": "crude",
"description": "Seamless CRUD control operations for node.",
"version": "0.2.0",
"version": "0.2.1",
"homepage": "https://github.com/talksession/node-crude",

@@ -6,0 +6,0 @@ "author": {

@@ -32,2 +32,4 @@ # node-crude

## Release History
- **v0.2.1**, *17 Feb 2014*
- Lazy instantiate Entities.
- **v0.2.0**, *17 Feb 2014*

@@ -34,0 +36,0 @@ - Upgrade to 0.2.1 Entity and Cip packages.

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