{"id":18064908,"url":"https://github.com/eoin-obrien/logiq","last_synced_at":"2026-01-21T11:34:05.282Z","repository":{"id":37052313,"uuid":"490365408","full_name":"eoin-obrien/logiq","owner":"eoin-obrien","description":"Awesome logical and bitwise operators with support for BigInt and TypedArrays","archived":false,"fork":false,"pushed_at":"2025-10-14T05:36:13.000Z","size":81,"stargazers_count":2,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T18:47:39.662Z","etag":null,"topics":["bitwise","esm","logic","nodejs","npm","operators","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/logiq","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eoin-obrien.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-09T16:39:58.000Z","updated_at":"2023-07-31T15:32:45.000Z","dependencies_parsed_at":"2023-10-13T02:54:16.879Z","dependency_job_id":"654ae8bd-2d25-43b1-a9d7-be52ed105fb0","html_url":"https://github.com/eoin-obrien/logiq","commit_stats":{"total_commits":88,"total_committers":4,"mean_commits":22.0,"dds":0.6136363636363636,"last_synced_commit":"4226e35fa8099bbcd6ce35560e6bc3b63298480f"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":"sindresorhus/node-module-boilerplate","purl":"pkg:github/eoin-obrien/logiq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eoin-obrien%2Flogiq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eoin-obrien%2Flogiq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eoin-obrien%2Flogiq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eoin-obrien%2Flogiq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eoin-obrien","download_url":"https://codeload.github.com/eoin-obrien/logiq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eoin-obrien%2Flogiq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28632771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitwise","esm","logic","nodejs","npm","operators","typescript"],"created_at":"2024-10-31T06:08:21.691Z","updated_at":"2026-01-21T11:34:05.263Z","avatar_url":"https://github.com/eoin-obrien.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# logiq\n\n[![CI](https://github.com/eoin-obrien/logiq/actions/workflows/main.yml/badge.svg)](https://github.com/eoin-obrien/logiq/actions/workflows/main.yml)\n[![Maintainability](https://api.codeclimate.com/v1/badges/8dee5c13c8b4c346be9e/maintainability)](https://codeclimate.com/github/eoin-obrien/logiq/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/8dee5c13c8b4c346be9e/test_coverage)](https://codeclimate.com/github/eoin-obrien/logiq/test_coverage)\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo)\n\n\u003e Awesome logical and bitwise operators with support for `BigInt` and `TypedArray`\n\n## Install\n\n```sh\nnpm install logiq\n```\n\n## Usage\n\n```js\nimport {logical, bitwise, bigint, typedArray} from 'logiq';\n\nlogical.xor(true, false);\n//=\u003e true\n\nbitwise.xor(0b1100, 0b1010);\n//=\u003e 6\n\nbigint.xor(0b1100n, 0b1010n);\n//=\u003e 6n\n\ntypedArray.xor(Uint8Array.of(255, 127, 0), Uint8Array.of(255));\n//=\u003e Uint8Array(3) [ 0, 128, 255 ]\n```\n\n## Modules\n\n### logical\n\n```js\nimport {logical} from 'logiq';\n```\n\nProvides logical connectives that return `boolean` values.\nAccepts arguments of type `any` and converts them to `boolean` values before processing.\n\n### bitwise\n\n```js\nimport {bitwise} from 'logiq';\n```\n\nProvides bitwise operators for the basic `number` type. All numbers in JavaScript are signed, so some functions may flip the sign bit and yield unexpected results.\n\n### bigint\n\n```js\nimport {bigint} from 'logiq';\n```\n\nProvides bitwise operators for the `bigint` type. Operands are automatically converted to `bigint` before processing. Remember that `bigint` is signed, so some functions may flip the sign bit and yield unexpected results.\n\n### typedArray\n\n```js\nimport {typedArray} from 'logiq';\n```\n\nProvides bitwise operators for all of the built-in `TypedArray` types. Under the hood, the module uses `Uint8Array` for compatibility between different `TypedArray` variants. The result is also returned as a `Uint8Array`.\n\nIf the operands differ in byte length, the shorter of the two will be repeated as many times as needed to match the other's length. This is useful in cases where a mask needs to be applied to every block of data in an array.\n\n## API\n\nEach `logiq` module exports the same set of functions. All binary operators are variadic and left-associative. For example, `and(a, b, c)` is equivalent to `(a AND b) AND c`.\n\n### not(p)\n\nPerforms logical negation or bitwise NOT.\n\n### and(p, q, ...args)\n\nPerforms logical conjunction or bitwise AND.\n\n### or(p, q, ...args)\n\nPerforms logical disjunction or bitwise OR.\n\n### imply(p, q, ...args)\n\nPerforms logical implication or bitwise IMPLY.\n\n### xor(p, q, ...args)\n\nPerforms logical exclusive disjunction or bitwise XOR.\n\n### nand(p, q, ...args)\n\nPerforms logical alternative denial or bitwise NAND.\n\n### nor(p, q, ...args)\n\nPerforms logical joint denial or bitwise NOR.\n\n### nimply(p, q, ...args)\n\nPerforms logical nonimplication or bitwise NIMPLY.\n\n### xnor(p, q, ...args)\n\nPerforms logical biconditional or bitwise XNOR.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feoin-obrien%2Flogiq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feoin-obrien%2Flogiq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feoin-obrien%2Flogiq/lists"}