chai-exclude
Advanced tools
Comparing version 1.0.11 to 1.0.12
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
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
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
196
13392
5
218