{"name":"simdle-native","version":"1.0.2","description":"libsimdle JavaScript bindings for Node.js","main":"index.js","scripts":{"test":"standard && brittle test.mjs","prebuild":"prebuildify --napi","install":"node-gyp-build"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/simdle-native.git"},"author":{"name":"Kasper Isager Dalsgarð","email":"kasper@funktionel.co"},"license":"ISC","bugs":{"url":"https://github.com/holepunchto/simdle-native/issues"},"homepage":"https://github.com/holepunchto/simdle-native#readme","dependencies":{"b4a":"^1.6.0","napi-macros":"^2.0.0","node-gyp-build":"^4.2.3"},"devDependencies":{"brittle":"^3.1.0","prebuildify":"^5.0.1","standard":"^17.0.0"},"gitHead":"e02db52f739ec8c6e23a77f5c15b45cae7be69a6","_id":"simdle-native@1.0.2","_nodeVersion":"18.7.0","_npmVersion":"8.16.0","dist":{"integrity":"sha512-gwKU+Hiu/FNfakTV8/zIQu+HDGMJKzoMi/3fnod85FHL4Wtj60X0PZh3MSEcUonmpJ5FNf/ywTzD5Nh8ED5DGQ==","shasum":"70662480cee337ab94f5b0b9b0220054a882992a","tarball":"http://registry-npm.ywwl.com/simdle-native/download/simdle-native-1.0.2.tgz","fileCount":28,"unpackedSize":396861,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFR3+RG6FozdVQttfrRDl++fitdriA/YIgP2JLkFwzH3AiEAq6m7uchmTeiiGrJTh0k/Tj5SNAY2zQGUmuPF3qR9EoI="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGDqHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpqHA//VtbXbNSg4F2mN1sK0KskCXL+36sql14THMceNhFf17IuXMAX\r\nDvdJFMNNmLZwIHxP6Rvo5ru5WpZSP4x9s25zA5C38BjVOrgmPx3wM6cgae16\r\n1+Rvm7KQENQyWx3pfUTYg2airNL955nlnXhXDi9KDpDDgYJ4OVsUZDAQvtkX\r\nOZTfAWJqllfEDxBn2to2gB6ESSJfS+bJCnen7IhW8LVqCkS3V+Bjjh5PppfR\r\nl0F8njpNKxWew1hY02fjIvH0ft+gHpYzML8CjGYBd1sx83STkUlR1f5o12Wg\r\nwgdjmvLFD2lb24xKbPn4qoDFBvzDbmAMlierU1LJNsnKzLju0wuK3HsVsjgX\r\nPjuqg6RCK+1jWckqn3VmlrVFzqFYHKs+F0nedT4AKC/TKkztU8iitBVOaJlX\r\npWJq7v1wjoNTIrI+kQCcTjIzd5pe3xoKtFEX9EkhnywcqWydLy5wvzeHIlsu\r\nTI84gGR+YJoAnMjRMLIBIff0rPUH7Ar1qgggsaPpZgh56H1DeRyLvfyIwybI\r\nm454Ww7Ed2Ho3ZQkJia4OaJKJcesjdW9rUPYj1e9iOqh/gV+peIyf5QktWq0\r\nIZ2r51Z27mW7mlefrR92mZwI7tYaVq4+vM5aBEnxymcBmdiXp71OZVpeRzOM\r\nMOxXsTZnbSOcJy4aqHqayFwoL2DiqlkQ7Q8=\r\n=FNcW\r\n-----END PGP SIGNATURE-----\r\n","size":100502,"noattachment":false,"key":"/simdle-native/-/simdle-native-1.0.2.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"kasperisager","email":"kasperisager@hey.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simdle-native_1.0.2_1662532230928_0.12735598234256318"},"_hasShrinkwrap":false,"readme":"# simdle-native\n\nhttps://github.com/holepunchto/libsimdle JavaScript bindings for Node.js.\n\n```sh\nnpm install simdle-native\n```\n\n## Usage\n\n```js\nconst { cnt } = require('simdle-native')\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":1662532231067,"_cnpm_publish_time":1662532231067,"dist-tags":{"latest":"1.3.10"}}