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

chai-exclude

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chai-exclude - npm Package Compare versions

Comparing version 1.0.11 to 1.0.12

45

lib/chai-exclude.js
const fclone = require('fclone')
module.exports = (chai, utils) => {
module.exports = function (chai, utils) {
const assert = chai.assert

@@ -8,2 +8,22 @@ const Assertion = chai.Assertion

/**
* Check if the argument is an array.
*
* @param {any} arg
* @returns {Boolean}
*/
function isArray (arg) {
return Array.isArray(arg)
}
/**
* Check if the argument is an object.
*
* @param {any} arg
* @returns {Boolean}
*/
function isObject (arg) {
return arg === Object(arg) && Object.prototype.toString.call(arg) !== '[object Array]'
}
/**
* Remove keys from an object or an array.

@@ -90,22 +110,2 @@ *

/**
* Check if the argument is an array.
*
* @param {any} arg
* @returns {Boolean}
*/
function isArray (arg) {
return Array.isArray(arg)
}
/**
* Check if the argument is an object.
*
* @param {any} arg
* @returns {Boolean}
*/
function isObject (arg) {
return arg === Object(arg) && Object.prototype.toString.call(arg) !== '[object Array]'
}
/**
* Override standard assertEqual method to remove the keys from other part of the equation.

@@ -126,2 +126,5 @@ *

// In case of 'use strict' and babelified code
arguments[0] = val;
_super.apply(this, arguments)

@@ -128,0 +131,0 @@ }

{
"name": "chai-exclude",
"version": "1.0.11",
"version": "1.0.12",
"description": "Exclude keys to compare from a deep equal operation with chai expect and assert",

@@ -10,5 +10,8 @@ "main": "lib/chai-exclude.js",

"homepage": "https://github.com/mesaugat/chai-exclude",
"files": [
"lib"
],
"scripts": {
"test": "mocha",
"lint": "standard lib test --fix"
"lint": "standard --fix"
},

@@ -15,0 +18,0 @@ "keywords": [

@@ -6,3 +6,2 @@ # chai-exclude

[![Build Status](https://travis-ci.org/mesaugat/chai-exclude.svg?branch=master)](https://travis-ci.org/mesaugat/chai-exclude)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/18c8dd78120442688cb4b19f758c4b96)](https://www.codacy.com/app/mesaugat/chai-exclude?utm_source=github.com&utm_medium=referral&utm_content=mesaugat/chai-exclude&utm_campaign=badger)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

@@ -9,0 +8,0 @@

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