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

node-entity

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-entity - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

14

adaptors/mongoose.adp.js

@@ -90,7 +90,17 @@ /**

var prom;
if (__.isObject(id)) {
return this._mongFindOne(id);
prom = this._mongFindOne(id);
} else {
return this._mongFindById(id);
prom = this._mongFindById(id);
}
// intercept "Cast to ID" error types and return null instead
return prom.catch(function(err) {
if (err.name === 'CastError' && err.type === 'ObjectId') {
return null;
}
throw err;
});
};

@@ -97,0 +107,0 @@

2

package.json
{
"name": "node-entity",
"description": "The MVCe implementation for Node.js",
"version": "0.2.6",
"version": "0.2.7",
"homepage": "https://github.com/thanpolas/entity",

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

@@ -475,2 +475,4 @@ # Entity

- **v0.2.7**, *01 Jul 2014*
- Mute mongoose cast to ID errors
- **v0.2.6**, *27 Jun 2014*

@@ -477,0 +479,0 @@ - support more complex queries using `between` selector.

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