Socket
Socket
Sign inDemoInstall

iridium

Package Overview
Dependencies
Maintainers
1
Versions
157
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iridium - npm Package Compare versions

Comparing version 5.7.2 to 5.7.3

8

dist/lib/Decorators.js

@@ -58,8 +58,4 @@ /// <reference path="../_references.d.ts" />

function ObjectID(target, name) {
target.constructor.schema = _.clone(target.constructor.schema || {});
target.constructor.schema[name] = MongoDB.ObjectID;
target.constructor.transforms[name] = {
fromDB: function (value) { return value && value._bsontype == 'ObjectID' ? new MongoDB.ObjectID(value.id).toHexString() : value; },
toDB: function (value) { return value && typeof value === 'string' ? new MongoDB.ObjectID(value) : value; }
};
Property(MongoDB.ObjectID)(target, name);
Transform(function (value) { return value && value._bsontype == 'ObjectID' ? new MongoDB.ObjectID(value.id).toHexString() : value; }, function (value) { return value && typeof value === 'string' ? new MongoDB.ObjectID(value) : value; })(target, name);
}

@@ -66,0 +62,0 @@ exports.ObjectID = ObjectID;

@@ -0,0 +0,0 @@ var _ = require('lodash');

@@ -0,0 +0,0 @@ /// <reference path="../_references.d.ts" />

@@ -0,0 +0,0 @@ var util = require('util');

@@ -63,8 +63,7 @@ /// <reference path="../_references.d.ts" />

export function ObjectID(target: { constructor: typeof Instance }, name: string) {
target.constructor.schema = <Schema>_.clone(target.constructor.schema || {});
target.constructor.schema[name] = MongoDB.ObjectID;
target.constructor.transforms[name] = {
fromDB: value => value && value._bsontype == 'ObjectID' ? new MongoDB.ObjectID(value.id).toHexString() : value,
toDB: value => value && typeof value === 'string' ? new MongoDB.ObjectID(value) : value
};
Property(MongoDB.ObjectID)(target, name);
Transform(
value => value && value._bsontype == 'ObjectID' ? new MongoDB.ObjectID(value.id).toHexString() : value,
value => value && typeof value === 'string' ? new MongoDB.ObjectID(value) : value
)(target, name);
}
{
"name": "iridium",
"version": "5.7.2",
"version": "5.7.3",
"author": "Benjamin Pannell <admin@sierrasoftworks.com>",

@@ -5,0 +5,0 @@ "description": "A custom lightweight ORM for MongoDB designed for power-users",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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