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

lodash-decorators

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash-decorators - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

11

dist/decoratorFactory.js

@@ -72,2 +72,6 @@ 'use strict';

function isGetter(getter) {
return Boolean(getter['' + _settings2['default'].annotationPrefix + 'isGetter']);
}
/**

@@ -95,8 +99,7 @@ * Creates a generic decorator for a method on an object.

var result = TYPE_MAP[type].apply(TYPE_MAP, [root[method], target, get || value].concat(args));
if (get) {
descriptor.get = result;
var toWrap = isGetter(get) ? get : get.call(this);
descriptor.get = TYPE_MAP[type].apply(TYPE_MAP, [root[method], target, toWrap].concat(args));
} else if (value) {
descriptor.value = result;
descriptor.value = TYPE_MAP[type].apply(TYPE_MAP, [root[method], target, value].concat(args));
}

@@ -103,0 +106,0 @@

{
"name": "lodash-decorators",
"author": "Steven Sojka",
"version": "0.0.5",
"version": "0.0.6",
"engines": {

@@ -6,0 +6,0 @@ "node": ">=0.12.0"

@@ -27,2 +27,6 @@ 'use strict';

function isGetter(getter) {
return Boolean(getter[`${settings.annotationPrefix}isGetter`]);
}
/**

@@ -42,8 +46,8 @@ * Creates a generic decorator for a method on an object.

const { value, get } = descriptor;
const result = TYPE_MAP[type](root[method], target, (get || value), ...args);
if (get) {
descriptor.get = result;
const toWrap = isGetter(get) ? get : get.call(this);
descriptor.get = TYPE_MAP[type](root[method], target, toWrap, ...args);
} else if (value) {
descriptor.value = result;
descriptor.value = TYPE_MAP[type](root[method], target, value, ...args);
}

@@ -50,0 +54,0 @@

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