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

proton-model

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proton-model - npm Package Compare versions

Comparing version 1.1.9 to 1.2.0

25

index.js

@@ -47,3 +47,2 @@ 'use strict'

this._schema = this.mongoose.Schema(this.schema())
console.log('Schema', this.mongoose.Schema, this._schema)
this._createStaticMethods(constructor)

@@ -60,2 +59,3 @@ // this._createInstanceMethods(prototype)

if (this._isInstanceMethod(name, method)) {
this.proton.log.silly('Instance method', name, method.value)
this._schema.method(name, method.value)

@@ -71,2 +71,3 @@ }

if (this._isStaticMethod(name, method)) {
this.proton.log.silly('Static method', name, method.value)
this._schema.statics[name] = method.value

@@ -82,2 +83,3 @@ }

if (this._isVirtualMethod(name, method)) {
this.proton.log.silly('Virtual method', name, method.value)
this._setVirtualMethod(name, method)

@@ -89,15 +91,26 @@ }

_isStaticMethod(name, method) {
return (name !== 'prototype' && name != 'schema' && name !== 'length')
return (
name &&
name !== 'prototype' &&
name != 'schema' &&
name !== 'length'
)
}
_isInstanceMethod(name, method) {
return (name !== 'constructor' &&
return (
name &&
name !== 'constructor' &&
name != 'schema' &&
!(method.set || method.get))
!(method.set || method.get)
)
}
_isVirtualMethod(name, method) {
return (name !== 'constructor' &&
return (
name &&
name !== 'constructor' &&
name != 'schema' &&
(_.has(method, 'set') || _.has(method, 'get')))
(_.has(method, 'set') || _.has(method, 'get'))
)
}

@@ -104,0 +117,0 @@

{
"name": "proton-model",
"version": "1.1.9",
"version": "1.2.0",
"description": "",

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

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