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

chai-arrays

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chai-arrays - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

6

.eslintrc.js

@@ -82,9 +82,9 @@ module.exports = {

"max-len": "off",
"max-lines": "error",
"max-lines": "off",
"max-nested-callbacks": "error",
"max-params": "error",
"max-statements": "error",
"max-statements": "off",
"max-statements-per-line": "error",
"multiline-ternary": "error",
"new-cap": "error",
"new-cap": "off",
"new-parens": "error",

@@ -91,0 +91,0 @@ "newline-after-var": [

@@ -71,2 +71,34 @@ const doesContain = function(array, element) {

chai.Assertion.addMethod('Uint8Array', function() {
this.assert(
this._obj instanceof Uint8Array,
'expected #{this} to be an Uint8Array',
'expected #{this} not to be an Uint8Array'
);
});
chai.Assertion.addMethod('Uint16Array', function() {
this.assert(
this._obj instanceof Uint16Array,
'expected #{this} to be an Uint16Array',
'expected #{this} not to be an Uint16Array'
);
});
chai.Assertion.addMethod('Uint32Array', function() {
this.assert(
this._obj instanceof Uint32Array,
'expected #{this} to be an Uint32Array',
'expected #{this} not to be an Uint32Array'
);
});
chai.Assertion.addMethod('Uint8ClampedArray', function() {
this.assert(
this._obj instanceof Uint8ClampedArray,
'expected #{this} to be an Uint8ClampedArray',
'expected #{this} not to be an Uint8ClampedArray'
);
});
chai.Assertion.addMethod('sorted', function(sortfn) {

@@ -73,0 +105,0 @@ this.assert(

{
"name": "chai-arrays",
"version": "1.1.0",
"version": "2.0.0",
"description": "a simple chai plugin for better array assertions",

@@ -5,0 +5,0 @@ "main": "assertArrays.js",

@@ -30,2 +30,7 @@ # chai-arrays [![CircleCI](https://circleci.com/gh/GaneshSPatil/chai-arrays.svg?style=shield)](https://circleci.com/gh/GaneshSPatil/chai-arrays)

expect('foobar').not.to.be.array();
expect(new Uint8Array([1])).to.be.Uint8Array();
expect(new Uint16Array([1])).to.be.Uint16Array();
expect(new Uint32Array([1])).to.be.Uint32Array();
expect(new Uint8ClampedArray([1])).to.be.Uint8ClampedArray();
```

@@ -32,0 +37,0 @@

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