Comparing version 0.0.2 to 0.0.3
@@ -1,13 +0,7 @@ | ||
'use strict'; | ||
"use strict"; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
exports.__esModule = true; | ||
exports["default"] = void 0; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
/* eslint no-invalid-this: 0*/ | ||
var ExcludedClassProperties = ['__super__']; | ||
@@ -17,58 +11,45 @@ var ExcludedPrototypeProperties = ['constructor']; | ||
function mix(from, to, exclude) { | ||
var _iteratorNormalCompletion = true; | ||
var _didIteratorError = false; | ||
var _iteratorError = undefined; | ||
for (var _iterator = Object.getOwnPropertyNames(from), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { | ||
var _ref; | ||
try { | ||
for (var _iterator = Object.getOwnPropertyNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { | ||
var name = _step.value; | ||
if (_isArray) { | ||
if (_i >= _iterator.length) break; | ||
_ref = _iterator[_i++]; | ||
} else { | ||
_i = _iterator.next(); | ||
if (_i.done) break; | ||
_ref = _i.value; | ||
} | ||
if (exclude.indexOf(name) === -1) { | ||
if (!to.hasOwnProperty(name)) { | ||
var descriptor = Object.getOwnPropertyDescriptor(from, name); | ||
var name = _ref; | ||
Object.defineProperty(to, name, descriptor); | ||
} | ||
if (exclude.indexOf(name) === -1) { | ||
if (!to.hasOwnProperty(name)) { | ||
var descriptor = Object.getOwnPropertyDescriptor(from, name); | ||
Object.defineProperty(to, name, descriptor); | ||
} | ||
} | ||
} catch (err) { | ||
_didIteratorError = true; | ||
_iteratorError = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion && _iterator.return) { | ||
_iterator.return(); | ||
} | ||
} finally { | ||
if (_didIteratorError) { | ||
throw _iteratorError; | ||
} | ||
} | ||
} | ||
} | ||
var Mixin = (function () { | ||
function Mixin() { | ||
_classCallCheck(this, Mixin); | ||
} | ||
var Mixin = | ||
/*#__PURE__*/ | ||
function () { | ||
function Mixin() {} | ||
_createClass(Mixin, null, [{ | ||
key: 'includeInto', | ||
value: function includeInto(constructor) { | ||
// include static properties | ||
mix(this, constructor, ExcludedClassProperties); | ||
Mixin.includeInto = function includeInto(constructor) { | ||
// include static properties | ||
mix(this, constructor, ExcludedClassProperties); // include instance properties | ||
// include instance properties | ||
mix(this.prototype, constructor.prototype, ExcludedPrototypeProperties); | ||
mix(this.prototype, constructor.prototype, ExcludedPrototypeProperties); | ||
if (this.included) { | ||
this.included(constructor); | ||
} | ||
if (this.included) { | ||
this.included(constructor); | ||
} | ||
}]); | ||
}; | ||
return Mixin; | ||
})(); | ||
}(); | ||
exports.default = Mixin; | ||
exports["default"] = Mixin; | ||
@@ -75,0 +56,0 @@ for (var name in Mixin) { |
{ | ||
"name": "mixmatch", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Yet Another Mixin", | ||
@@ -22,5 +22,5 @@ "homepage": "http://github.com/fulcrumapp/mixmatch", | ||
"devDependencies": { | ||
"babel-cli": "^6.2.0", | ||
"babel-core": "^6.2.1", | ||
"babel-preset-es2015": "^6.1.18", | ||
"@babel/cli": "^7.5.5", | ||
"@babel/core": "^7.5.5", | ||
"@babel/preset-env": "^7.5.5", | ||
"chai": "^3.4.1", | ||
@@ -27,0 +27,0 @@ "eslint": "^1.10.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
25020
13
155
1