{"name":"simdle-universal","version":"1.0.4","description":"Universal wrapper for libsimdle with a JavaScript fallback","main":"index.js","browser":{"./index.js":"./fallback.js"},"scripts":{"test":"standard && brittle test.mjs","prebuild":"prebuildify --napi --cwd native"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/simdle-universal.git"},"author":{"name":"Kasper Isager Dalsgarð","email":"kasper@funktionel.co"},"license":"ISC","bugs":{"url":"https://github.com/holepunchto/simdle-universal/issues"},"homepage":"https://github.com/holepunchto/simdle-universal#readme","dependencies":{"b4a":"^1.6.0","node-gyp-build":"^4.2.3"},"devDependencies":{"brittle":"^3.1.0","napi-macros":"^2.0.0","prebuildify":"^5.0.1","standard":"^17.0.0"},"gitHead":"e12c175f329eda7d96419916fddafb4308d287d1","_id":"simdle-universal@1.0.4","_nodeVersion":"18.7.0","_npmVersion":"8.16.0","dist":{"integrity":"sha512-uEdy5B4OlL49FGAP1CBDYDp/Kn4k4nFPe6Z+85a7DiMeC0rDBZRqfe4AliN2oQ6qXviHclNPW7ds/NxHOzEsBQ==","shasum":"acb1f953e4f4b881d8b1edd5f1078705965d4c99","tarball":"http://registry-npm.ywwl.com/simdle-universal/download/simdle-universal-1.0.4.tgz","fileCount":12,"unpackedSize":413394,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB+RMIYNJ0HrlfItU978/+1MHGtBkjqBogXND3WTqVLQAiEAsF4ArYSyrKuuupmXx14c3LJGNClbKOO66xNwIctWNoU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGG/AACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpo9Q/9Hdh7ehWtzAa3s4ab1MQQVKUtyeFx0++iP4tr2d/9yLhC2Wy/\r\nKWRc20nA7Burni+FADeezYOzq+K8G4flmxoeuRYHzVDvt08F5h48wW3GyZ0A\r\np8Nh+UickfRvaFBFpITXmqgivH1MfCS5M8oymTDLHONG5apgdqe9okLBhFSA\r\n+vCmWHAkuMb6hrPEavm3Oid/Uj4AsDcteFm0KYs0lzNzS0COWD2HD93jcM8d\r\n48C552qeOJWguPM7yiXrrk8nbH+B0Q4k0SCh/UJMDwDE1kmfjLG5kInd9k1N\r\nQii8+WLw0ZROlYcMm3NcDpvFx4RWLIVPW0sljNn7fzUF5k6wmXZZi4gOBpuo\r\nlbcnsH1AHr2AXxpdw5NMCWYMHrEHJ6Ka+ip8bznT95u/UQIYQod78fMyZGlW\r\n77a8RLXmGTasvfAU9EiQLvwb1kBrlfB+1Nqgtxo2NKeXqOStYj6+/XsPaZmX\r\nU2xGFgIlyg5sjLKW7VRLtN90dbbRHh1dAJlrA8PcCE9R6Dp7gIl5RcLe8gmc\r\njbJmFj2QsN3mtNMFTx0qEmukcQqZYFfxCnvPlkF5R0/PEZ4lvykuy9VT3zw4\r\ny8yV6OI6Ph3IcGz7F9S26gCSvJ0BLRPQVI8xXdvjs0XeIwF5Lm8BH/IFHkKM\r\nlQi2Z+l2y7YLvhZ0NkT0EYh96btfQrOw5Lo=\r\n=eOHS\r\n-----END PGP SIGNATURE-----\r\n","size":104698,"noattachment":false,"key":"/simdle-universal/-/simdle-universal-1.0.4.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"},{"name":"kasperisager","email":"kasperisager@hey.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simdle-universal_1.0.4_1662545855809_0.30961055822327666"},"_hasShrinkwrap":false,"readme":"# simdle-universal\n\nUniversal wrapper for https://github.com/holepunchto/libsimdle with a JavaScript fallback.\n\n```sh\nnpm install simdle-universal\n```\n\n## Usage\n\n```js\nconst { cnt } = require('simdle-universal')\n\ncnt(Buffer.alloc(16, 0xff))\n// <Buffer 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08>\n```\n\n## API\n\nThe lane width of all APIs is determined by the input buffer. That is, if providing a `Uint8Array` the lane width will be 8 bits, if providing a `Uint16Array` the lane width will be 16 bits and so on.\n\n#### `const result = allo(buffer)`\n\nCheck if the buffer contains only ones.\n\n#### `const result = allz(buffer)`\n\nCheck if the buffer contains only zeros.\n\n#### `const result = and(a, b[, result])`\n\nCompute the bitwise AND of `a` and `b`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n#### `const result = clear(a, b[, result])`\n\nClear the bits in `b` from `a`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n#### `const result = clo(buffer[, result])`\n\nCount the number of leading ones in `buffer`, storing the result in `result`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n#### `const result = clz(buffer[, result])`\n\nCount the number of leading zeroes in `buffer`, storing the result in `result`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n#### `const result = cnt(buffer[, result])`\n\nCompute the population count in `buffer`, storing the result in `result`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n#### `const result = cto(buffer[, result])`\n\nCount the number of trailing ones in `buffer`, storing the result in `result`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n#### `const result = ctz(buffer[, result])`\n\nCount the number of trailing zeroes in `buffer`, storing the result in `result`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n#### `const result = not(buffer[, result])`\n\nCompute the bitwise NOT in `buffer`, storing the result in `result`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n#### `const result = or(a, b[, result])`\n\nCompute the bitwise OR of `a` and `b`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n#### `const result = sum(buffer)`\n\nCompute the sum of `buffer` as a `bigint`.\n\n#### `const result = xor(a, b[, result])`\n\nCompute the bitwise XOR of `a` and `b`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n## License\n\nISC\n","publish_time":1662545856022,"_cnpm_publish_time":1662545856022,"dist-tags":{"latest":"1.1.3"}}