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

underscore-inherit

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

underscore-inherit - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

.travis.yml

2

bower.json
{
"name": "underscore-inherit",
"version": "1.0.0",
"version": "1.0.1",
"main": "underscore-inherit.js",

@@ -5,0 +5,0 @@ "dependencies": {

{
"name": "underscore-inherit",
"version": "1.0.0",
"version": "1.0.1",
"author": "Casey Foster <c@sey.me>",

@@ -11,4 +11,10 @@ "main": "underscore-inherit",

"devDependencies": {
"underscore": "x"
"chai": "x",
"mocha": "x",
"underscore": "x",
"watchy": "x"
},
"scripts": {
"test": "make test"
}
}
underscore-inherit
==================
[![Build Status](https://secure.travis-ci.org/caseywebdev/underscore-inherit.png)](http://travis-ci.org/caseywebdev/underscore-inherit)
Add constructor extensibility to Underscore.js.

@@ -5,0 +7,0 @@

@@ -8,21 +8,16 @@ (function () {

var slice = [].slice;
// Define the mixin
_.mixin({
inherit: function () {
var protoProps;
var staticProps;
var Parent = _.reduce(arguments, function (Parent, arg) {
if (_.isFunction(arg)) {
if (!Parent) return arg;
return _.inherit(arg, {constructor: Parent});
}
if (_.isObject(arg)) {
if (!protoProps) {
protoProps = arg;
} else if (!staticProps) {
staticProps = arg;
}
}
return Parent;
}, null) || function () {};
var args = slice.call(arguments);
var Parent;
while (_.isFunction(args[0])) {
var arg = args.shift();
Parent = Parent ? _.inherit(arg, {constructor: Parent}) : arg;
}
if (!Parent) Parent = function () {};
var protoProps = args[0];
var staticProps = args[1];

@@ -29,0 +24,0 @@ // `Child` is the passed in `constructor` proto property

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