{"id":25301615,"url":"https://github.com/p2js/verbena-complex","last_synced_at":"2026-02-04T02:31:59.475Z","repository":{"id":264723490,"uuid":"894200544","full_name":"p2js/verbena-complex","owner":"p2js","description":"verbena + complex numbers","archived":false,"fork":false,"pushed_at":"2024-11-26T10:22:59.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-17T21:08:13.324Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p2js.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-11-25T23:48:13.000Z","updated_at":"2024-11-26T10:23:03.000Z","dependencies_parsed_at":"2025-02-13T06:48:10.473Z","dependency_job_id":"426c0d18-0ab3-432d-b84f-0adc8b9e55de","html_url":"https://github.com/p2js/verbena-complex","commit_stats":null,"previous_names":["p2js/verbena-complex"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/p2js/verbena-complex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2js%2Fverbena-complex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2js%2Fverbena-complex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2js%2Fverbena-complex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2js%2Fverbena-complex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p2js","download_url":"https://codeload.github.com/p2js/verbena-complex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2js%2Fverbena-complex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264721588,"owners_count":23653960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-02-13T06:48:07.803Z","updated_at":"2026-02-04T02:31:59.438Z","avatar_url":"https://github.com/p2js.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# verbena-complex\n\nThis package acts as a complex number extension to the [verbena](https://github.com/p2js/verbena) math function transcompiler to JS.\n\nIt uses verbena's standard lexer, parser and compiler, all completely unmodified. The magic happens with the library: All operations are redefined to convert all numbers to complex.js `Complex` numbers, and `i` is treated as a simple constant.\n\nSome additional logic is implemented after lexing and parsing to allow for additional robustness and ergonomics:\n- any identifier `i` will be converted to the constant `i` to allow implicit multiplications of variables by i, such as `ix`.\n- due to the lack of logical operator overloading in verbena, as well as the lack of a natural order on the complex numbers, function clauses are unimplemented and will be removed before compilation.\n\n## Usage\n\n```\nnpm install verbena-complex\n```\n\n```js\nimport { ComplexFunction } from 'verbena-complex';\n\nconst f = ComplexFunction(\"f(x) = re(x * (3+2i))\");\n\nconsole.log(f(2)); // { re: 6, im: 0 }\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp2js%2Fverbena-complex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp2js%2Fverbena-complex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp2js%2Fverbena-complex/lists"}