{"_id":"simdle-universal@1.1.3","bugs":{"url":"https://github.com/holepunchto/simdle-universal/issues"},"dist":{"shasum":"e3f151a824ab73a5f57ee6c3474fcd076d93afd3","tarball":"http://registry-npm.ywwl.com/simdle-universal/download/simdle-universal-1.1.3.tgz","fileCount":6,"integrity":"sha512-zHS9dhxjOa2sgOfFO49BoeGS8tvjWw8ixttBiLB9vI9OSDLjluW1oLZZvA+3eclxD6S1BvJf8yFxnF4z9m77Iw==","signatures":[{"sig":"MEMCH2+EfYTOwqTDsIqUwu6xzrr+4NSWB0Cr0k7dQ5TvSB8CIHaJ83qbjiAudbrZgetl1pQSFVX+XTqVZEhOkNtTju+b","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCzNZcGiuUCs5xDITPCaR9ehZge+nZyhZPv3j0G3XAvKQIhANInTQhHw7yqpZc3+j2ikS5zfaLWhvO6ETDRkwHA8w40"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/simdle-universal@1.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":21020,"size":6136,"noattachment":false,"key":"/simdle-universal/-/simdle-universal-1.1.3.tgz"},"main":"index.js","name":"simdle-universal","author":{"name":"Kasper Isager Dalsgarð","email":"kasper@funktionel.co"},"browser":{"./index.js":"./fallback.js"},"gitHead":"b933bb8e31f847cd2f9117ab6a15fb385dec57e9","license":"ISC","scripts":{"lint":"prettier --check . && lunte","test":"npm run test:node && npm run test:bare","format":"prettier --write . && lunte --fix","test:bare":"brittle-bare --coverage test.mjs","test:node":"brittle-node --coverage test.mjs"},"version":"1.1.3","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"f14a00d8-c75b-45a2-8f5f-a699f6efd13a"}},"homepage":"https://github.com/holepunchto/simdle-universal#readme","repository":{"url":"git+https://github.com/holepunchto/simdle-universal.git","type":"git"},"_npmVersion":"11.19.1","description":"Universal wrapper for libsimdle with a JavaScript fallback","directories":{},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_nodeVersion":"24.22.1","dependencies":{"b4a":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"lunte":"^1.8.6","brittle":"^3.1.0","prettier":"^3.6.2","prettier-config-holepunch":"^2.0.0"},"optionalDependencies":{"simdle-native":"^1.1.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/simdle-universal_1.1.3_1793117716939_0.49021047520165617"},"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\nApache 2.0\n","publish_time":1793117717056,"_cnpm_publish_time":1793117717056,"dist-tags":{"latest":"1.1.3"}}