Comparing version 1.0.4 to 1.0.5
@@ -0,1 +1,6 @@ | ||
1.0.5 / 2016-06-30 | ||
================== | ||
* Fix default export for CommonJS compatibility. (@ljharb) | ||
1.0.4 / 2016-06-30 | ||
@@ -2,0 +7,0 @@ ================== |
'use strict' | ||
export default protochain | ||
function protochain (obj) { | ||
module.exports = function protochain (obj) { | ||
const chain = [] | ||
@@ -7,0 +5,0 @@ let target = getPrototypeOf(obj) |
{ | ||
"name": "protochain", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Get the prototype chain of any value as an Array", | ||
@@ -5,0 +5,0 @@ "main": "protochain.js", |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = protochain; | ||
function protochain(obj) { | ||
module.exports = function protochain(obj) { | ||
var chain = []; | ||
@@ -18,3 +12,3 @@ var target = getPrototypeOf(obj); | ||
return chain; | ||
} | ||
}; | ||
@@ -21,0 +15,0 @@ function getPrototypeOf(obj) { |
'use strict' | ||
import test from 'tape' | ||
import protochain from './' | ||
const test = require('tape') | ||
const protochain = require('./') | ||
@@ -17,2 +17,5 @@ test('protochain', t => { | ||
/* eslint-enable no-new-wrappers */ | ||
/* eslint-disable no-new-func */ | ||
strictEqualArray(t, protochain(new Function()), [Function.prototype, Object.prototype]) | ||
/* eslint-enable no-new-func */ | ||
strictEqualArray(t, protochain(new RegExp('abc')), [RegExp.prototype, Object.prototype]) | ||
@@ -42,2 +45,3 @@ strictEqualArray(t, protochain(new Date()), [Date.prototype, Object.prototype]) | ||
t.test('non-object values cooerce to object counterparts correctly', t => { | ||
strictEqualArray(t, protochain(function () {}), [Function.prototype, Object.prototype]) | ||
strictEqualArray(t, protochain('abc'), [String.prototype, Object.prototype]) | ||
@@ -44,0 +48,0 @@ strictEqualArray(t, protochain(123), [Number.prototype, Object.prototype]) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
11420
0
147
1