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

mong

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mong - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

28

lib/model.js

@@ -74,2 +74,19 @@ 'use strict'

function mappedArray (name) {
return function () {
var args = arguments
var proto = this.prototype
return get(this)
.then(function (c) {
return c[name].apply(c, args).toArray()
})
.then(function (array) {
array.forEach(function (doc) {
doc[PROTO] = proto
})
return array
})
}
}
function mappedRawResult (name) {

@@ -110,7 +127,10 @@ return function () {

;['find', 'findOne', 'findAndModify']
.forEach(function (name) {
Document[name] = mapped(name)
})
Document.findOne = mapped('findOne')
Document.findAndModify = mapped('findAndModify')
Document.find = mappedArray('find')
Document._collection = function () {
return get(this)
}
;['update', 'remove', 'aggregate', 'ensureIndex']

@@ -117,0 +137,0 @@ .forEach(function (name) {

2

package.json
{
"name": "mong",
"version": "2.0.0",
"version": "2.0.1",
"description": "Lightweight models for mongodb objects",

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

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