{"name":"chai-bites","version":"0.3.0","keywords":["chai","chai-plugin","assertions","testing","buffers","uint8array"],"author":{"name":"Alex Ostrovski","email":"ostrovski.alex@gmail.com"},"license":"Apache-2.0","_id":"chai-bites@0.3.0","maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"homepage":"https://github.com/achingbrain/chai-bites#readme","bugs":{"url":"https://github.com/achingbrain/chai-bites/issues"},"dist":{"shasum":"51aa3f6ea5e827fb59cf493bb730b33ef4ebed9a","tarball":"http://registry-npm.ywwl.com/chai-bites/download/chai-bites-0.3.0.tgz","fileCount":5,"integrity":"sha512-NV5HnBUWQDiEN5F1jXAG7CO6bfHW304+wY7cPhmWgW+SidIDEzLbHpw6lxwHBzemIIAR39Dm7ZhfmBxOujkbDQ==","signatures":[{"sig":"MEQCICZZl6gtJz3vGx+E4/VYqJEcHRcIvCM9FHmYx/qs+VyjAiAe0WNCrVWCTJAbj1lbrbNfc8FBLu5xtAWOr4XCd0Fghg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17895,"size":6537,"noattachment":false,"key":"/chai-bites/-/chai-bites-0.3.0.tgz"},"main":"index.js","type":"module","types":"index.d.ts","engines":{"node":">=10"},"gitHead":"8b450d77a45ba82553995c93945fa2932250a749","scripts":{"lint":"semistandard","test":"mocha test --exclude test/types.js","test-ts":"tsc -p test && node test/types.js","test-browser":"karma start"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"repository":{"url":"git+https://github.com/achingbrain/chai-bites.git","type":"git"},"_npmVersion":"11.8.0","description":"Chai assertions for byte arrays equality","directories":{},"_nodeVersion":"24.13.1","_hasShrinkwrap":false,"devDependencies":{"chai":"^5.1.0","karma":"^6.3.4","mocha":"^10.4.0","babelify":"^10.0.0","coveralls":"^3.1.1","browserify":"^17.0.0","typescript":"^5.4.5","@babel/core":"^7.15.0","@types/chai":"^4.2.21","karma-mocha":"^2.0.1","semistandard":"^17.0.0","karma-coverage":"^2.0.3","karma-browserify":"^8.1.0","karma-mocha-reporter":"^2.2.5","babel-plugin-istanbul":"^6.0.0","karma-firefox-launcher":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/chai-bites_0.3.0_1779518310866_0.0026631939133969773","host":"s3://npm-registry-packages-npm-production"},"readme":"Fork of [chai-bytes](https://www.npmjs.com/package/chai-bytes) published as ESM with relaxed input types.\n\n# Chai Assertions for Byte Arrays Equality\n\n[![Build status][workflow-image]][workflow-url]\n[![Code coverage][coveralls-image]][coveralls-url]\n[![Code style][code-style-image]][code-style-url]\n[![License][license-image]][license-url]\n\n[workflow-image]: https://github.com/slowli/chai-bytes/workflows/Node.js%20CI/badge.svg?branch=master\n[workflow-url]: https://github.com/slowli/chai-bytes/actions\n[coveralls-image]: https://img.shields.io/coveralls/slowli/chai-bytes.svg\n[coveralls-url]: https://coveralls.io/github/slowli/chai-bytes\n[code-style-image]: https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg\n[code-style-url]: https://github.com/Flet/semistandard\n[license-image]: https://img.shields.io/github/license/slowli/chai-bytes.svg\n[license-url]: https://opensource.org/licenses/Apache-2.0\n\n**chai-bytes** extends [Chai][chai] with a `equalBytes` function,\nwhich can be used to test equality of byte arrays (i.e., `Uint8Array` instances).\n\n## Basic Usage\n\n```javascript\nconst { expect, assert } = require('chai')\n  .use(require('chai-bytes'));\n\nconst buffer = new Uint8Array([ 1, 2, 3, 4, 5 ]);\nexpect(buffer).to.equalBytes('0102030405');\n// `assert` style works, too\nassert.equalBytes(buffer, [1, 2, 3, 4, 5], 'error message');\n```\n\nAn expected value passed to `equalBytes` can be:\n\n- Hexadecimal string, e.g., `'c0ffee'`\n- Array, e.g., `[1, 2, 3]`\n- Array-like object (i.e., an object having the `length` property\n  and items accessible by integer properties).\n  This includes `Uint8Array` instances, among other things\n\nIf the passed value does not fall into any of these categories,\na `TypeError` is thrown.\n\n## Developer Notes\n\n**chai-bytes** uses combined code coverage from the tested browser environments\n(Firefox and PhantomJS). This is because PhantomJS is a typical old environment\nthat may have problems with `Uint8Array`s (e.g., it misses a substantial parts\nof their methods).\n\n## License\n\n**chai-bytes** is available under [Apache-2.0 license](LICENSE).\n\n[chai]: https://chaijs.com/\n","publish_time":1779518311030,"_cnpm_publish_time":1779518311030,"dist-tags":{"latest":"0.3.1"}}