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

protochain

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protochain - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

5

History.md

@@ -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 @@ ==================

4

index.js
'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])

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