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

chai-quantifiers

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chai-quantifiers - npm Package Compare versions

Comparing version 1.0.0-alpha.2 to 1.0.0-alpha.3

10

package.json
{
"name": "chai-quantifiers",
"version": "1.0.0-alpha.2",
"description": "Array quantifier assertions for chai",
"version": "1.0.0-alpha.3",
"description": "Array quantifier assertions for chai assertion library",
"main": "src/chai-quantifiers.js",

@@ -12,5 +12,6 @@ "repository": {

"chai",
"assertion",
"assertions",
"chai-plugin",
"quantifiers"
"quantifiers",
"array"
],

@@ -35,3 +36,2 @@ "author": "Frank Thelen>",

"chai": "^4.1.2",
"chai-as-promised": "^7.1.1",
"coveralls": "^3.0.0",

@@ -38,0 +38,0 @@ "eslint": "^4.18.0",

# chai-quantifiers
Array quantifier assertions for [Chai](https://www.npmjs.com/package/chai).
Array quantifier assertions for [Chai](http://chaijs.com/) assertion library.

@@ -27,3 +27,3 @@ [![Build Status](https://travis-ci.org/frankthelen/chai-quantifiers.svg?branch=master)](https://travis-ci.org/frankthelen/chai-quantifiers)

A few examples:
A quick example:
```javascript

@@ -35,2 +35,4 @@ const chai = require('chai');

const { expect } = chai;
describe('chai-quantifiers', () => {

@@ -37,0 +39,0 @@ it('containAll should be true if all items are true', () => {

const evaluate = (array, predicate) =>
array.reduce(
(acc, item, i) =>
(predicate(item) ? ({ t: [...acc.t, i], f: acc.f }) : ({ t: acc.t, f: [...acc.f, i] })),
(predicate(item) ? { t: [...acc.t, i], f: acc.f } : { t: acc.t, f: [...acc.f, i] }),
{ t: [], f: [] }

@@ -6,0 +6,0 @@ );

const chai = require('chai');
const chaiAsPromised = require('chai-as-promised');
const chaiQuantifiers = require('..');
chai.use(chaiAsPromised);
chai.use(chaiQuantifiers);

@@ -7,0 +5,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