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

chai-bytes

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chai-bytes - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

index.d.ts

6

index.js

@@ -23,3 +23,3 @@ 'use strict';

*/
module.exports = function (chai, utils) {
module.exports = function (chai) {
var Assertion = chai.Assertion;

@@ -59,2 +59,6 @@

});
chai.assert.equalBytes = function (value, expected, message) {
return new Assertion(value, message, chai.assert.equalBytes, true).to.equalBytes(expected);
};
};

28

package.json
{
"name": "chai-bytes",
"version": "0.1.1",
"version": "0.1.2",
"description": "Chai assertions for byte arrays equality",

@@ -16,8 +16,12 @@ "repository": {

"main": "index.js",
"types": "index.d.ts",
"files": [
"index.js"
"index.js",
"index.d.ts"
],
"scripts": {
"lint": "semistandard",
"test": "mocha test",
"test": "mocha test --exclude test/types.js",
"test-browser": "karma start",
"test-ts": "tsc -p test && node test/types.js",
"coverage": "karma start && ./node_modules/.bin/lcov-result-merger 'coverage/*/lcov.info' coverage/lcov.info"

@@ -36,11 +40,12 @@ },

"devDependencies": {
"@types/chai": "^4.1.7",
"babel-plugin-istanbul": "^4.1.4",
"babelify": "^7.3.0",
"browserify": "^14.4.0",
"browserify": "^16.2.3",
"chai": "^4.0.2",
"coveralls": "^2.13.1",
"karma": "^1.7.0",
"karma-browserify": "^5.1.1",
"karma-coverage": "^1.1.1",
"karma-firefox-launcher": "^1.0.1",
"coveralls": "^3.0.2",
"karma": "^3.1.4",
"karma-browserify": "^6.0.0",
"karma-coverage": "^1.1.2",
"karma-firefox-launcher": "^1.1.0",
"karma-mocha": "^1.3.0",

@@ -50,4 +55,5 @@ "karma-mocha-reporter": "^2.2.3",

"lcov-result-merger": "^1.2.0",
"mocha": "^3.4.2",
"semistandard": "^11.0.0"
"mocha": "^5.2.0",
"semistandard": "^11.0.0",
"typescript": "^3.2.2"
},

@@ -54,0 +60,0 @@ "peerDependencies": {

@@ -23,8 +23,9 @@ # Chai Assertions for Byte Arrays Equality

```javascript
const expect = require('chai')
.use(require('chai-bytes'))
.expect();
const { expect, assert } = require('chai')
.use(require('chai-bytes'));
var buffer = new Uint8Array([ 1, 2, 3, 4, 5 ]);
const buffer = new Uint8Array([ 1, 2, 3, 4, 5 ]);
expect(buffer).to.equalBytes('0102030405');
// `assert` style works, too
assert.equalBytes(buffer, [1, 2, 3, 4, 5], 'error message');
```

@@ -52,3 +53,3 @@

(c) 2017 Alex Ostrovski
(c) 2018 Alex Ostrovski

@@ -55,0 +56,0 @@ **chai-bytes** is available under [Apache-2.0 license](LICENSE).

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