{"name":"chai-bites","version":"0.1.2","description":"Chai assertions for byte arrays equality","repository":{"type":"git","url":"git+https://github.com/achingbrain/chai-bites.git"},"bugs":{"url":"https://github.com/achingbrain/chai-bites/issues"},"engines":{"node":">=10"},"main":"index.js","types":"index.d.ts","scripts":{"lint":"semistandard","test":"mocha test --exclude test/types.js","test-browser":"karma start","test-ts":"tsc -p test && node test/types.js"},"keywords":["chai","chai-plugin","assertions","testing","buffers","uint8array"],"author":{"name":"Alex Ostrovski","email":"ostrovski.alex@gmail.com"},"license":"Apache-2.0","devDependencies":{"@babel/core":"^7.15.0","@types/chai":"^4.2.21","babel-plugin-istanbul":"^6.0.0","babelify":"^10.0.0","browserify":"^17.0.0","chai":"^4.3.4","coveralls":"^3.1.1","karma":"^6.3.4","karma-browserify":"^8.1.0","karma-coverage":"^2.0.3","karma-firefox-launcher":"^2.1.1","karma-mocha":"^2.0.1","karma-mocha-reporter":"^2.2.5","mocha":"^9.0.3","semistandard":"^16.0.1","typescript":"^4.3.5"},"peerDependencies":{"chai":">=2 <5"},"gitHead":"ecf6572986d55de4357804622d615aa947f8e500","homepage":"https://github.com/achingbrain/chai-bites#readme","_id":"chai-bites@0.1.2","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-eZVKGTywFkRuMle/UkiT9OXU4y4WeNy0yKe2t5iclIW3Yn9X3l7iWZoSeTjTpeQ1SIMn3In0rctjVCaRuKCmng==","shasum":"6e267143689ee4bae617a400863348e533b6bf10","tarball":"http://registry-npm.ywwl.com/chai-bites/download/chai-bites-0.1.2.tgz","fileCount":5,"unpackedSize":17875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJht6eICRA9TVsSAnZWagAAZkQP/jpvk/b74hnGjTHGpJBO\ntN2Db7NkdvmWf992VHB4gzS132xQrAJyTkmGAMnCQ76hlzBSsb9g/mdygjCF\n7mwxJmF+CcAU7q2pGgIlC/lY8NxlTQV/6cxBqYj0cY44/1ZxUTRNt4Mcv8hL\n9TsW3fbBQGlnowkkRZDMZON2EpXtd43yw51uhOo5mz+GQtx3uAaeYEZGMevQ\nejyio/uoVj9uBMNsNAZONGQ3joqHcxDpU7eIwCqWCnIM3j99u/ofcv0vCL0i\nOZpZ1xqNAy5JNZ9uPjNgmnh+xTqYs+gqUJnvUxgZDj/PfwaQHbibJvV1DTci\nJ+jdI5hM1Nwjl9atqhjqESug6StVHUu12Goq8apAgyY9RXtwUaGR4DKgrN9a\nssOo42WonvD+Dc6rnaqpaffCHfXfX0WleR5MznV/O8YPgXphdKHbBhCmS6JB\nGlGwMZpjKqbvMYQ1phVbYnJnljTRBPFnnc/62VX66Kr2+wmIaJSYSx8nMV8S\nD9AqWw11AD+vFu8I/2jWZ+oo2SBj5eh48SX0Zy2P8BxP2L3a6J4FGWeqhbHR\n8UVOBnj6q7OlDdPAPVPZ6ZG/yW6hRPuRstjLM/xP7s5/9NJREDU10KAEIGat\ngwgt9VrzK2NR8SQJM6DHJ2TTfrgkZ2sgmdL0Lht4rkTAiWj7o92swgHDf43K\nTUIW\r\n=YdXf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDStzM20yyJO05Wp34xTeHlXAj3M9NmYuwv9OMV1fkqbQIhAPGXUSMdkDyyHU46tCMAM3TUr6Ezf9qAkOOH9Fd4Ip4I"}],"size":6555,"noattachment":false,"key":"/chai-bites/-/chai-bites-0.1.2.tgz"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chai-bites_0.1.2_1639425928347_0.4637807366155302"},"_hasShrinkwrap":false,"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":1639425928492,"_cnpm_publish_time":1639425928492,"dist-tags":{"latest":"0.3.1"}}