{"id":17652389,"url":"https://github.com/bashleigh/wave-func","last_synced_at":"2025-09-03T03:32:33.171Z","repository":{"id":103668646,"uuid":"369598630","full_name":"bashleigh/wave-func","owner":"bashleigh","description":"A strictly typed order of all the things that make up our reality as we know it. ⚛️ Ψ","archived":false,"fork":false,"pushed_at":"2022-05-11T10:16:36.000Z","size":129,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T08:02:31.357Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/bashleigh.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":"2021-05-21T16:47:17.000Z","updated_at":"2023-03-10T08:05:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"ca9102e1-408f-425d-a877-108dda5419ea","html_url":"https://github.com/bashleigh/wave-func","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bashleigh/wave-func","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bashleigh%2Fwave-func","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bashleigh%2Fwave-func/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bashleigh%2Fwave-func/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bashleigh%2Fwave-func/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bashleigh","download_url":"https://codeload.github.com/bashleigh/wave-func/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bashleigh%2Fwave-func/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273385082,"owners_count":25096030,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-23T11:46:44.496Z","updated_at":"2025-09-03T03:32:33.149Z","avatar_url":"https://github.com/bashleigh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ψ Func\n\nA TypeScript based relation to the fundamental building blocks of our reality.\n\nI found it difficult to learn the different and difference between the fundamental particles. So I've built a strictly typed package of all of them and how they relate to each other. This is mainly because of the similarly named particles and the same suffix used for all the different types.\n\n## Install\n\n```bash\n$ yarn add wave-func\n```\n\n## Fundamental Particles\n\n### Properties\nProperty | Purpose | Example value\n--- | --- | ---\nparticle.name | The name of the particle | `electron`\nparticle.group | The group of the particle | `fermion`\nparticle.type | The type (subtype) of the particle | `lepton`\nparticle.appliedForces | An array of forces the particle interacts with | `[ForceType.ELECTROMAGNETISM]`\nparticle.charge | An object of the particles charge with positive/negative values | `{value: 0.333333, state: 'negative'}`\nparticle.chargeForHumans | The charge value for humans | `+2/3` `-1/3`\nparticle.scalar | A boolean as to whether the particle is scalar | `false`\nparticle.antiMatter | A boolean as to whether the particle is considered antimatter | `false`\nparticle.mass | The overall mass of the particle in gmev | `.511`\nparticle.theoretical | A boolean whether the particle is proven or theoretical | `false`\nparticle.symbol | The particle's symbol | `e`\nparticle.spin | The particles spin | `\"1/2\"`\n\nBelow is a list of all different types of fundamental particles and some brief info.\n\n### Fermions\n\nAll particles with mass.\n\n#### Quarks\n\nname | charge | spin | anti matter\n--- | --- | --- | ---\nUpQuark | +2/3 | 1/2 | false\nDownQuark | -1/3 | 1/2 | false\nTopQuark | +2/3 | 1/2 | false\nBottomQuark | -1/3 | 1/2 | false\nStrangeQuark | -1/3 | 1/2 | false\nCharmQuark | +2/3 | 1/2 | false\nCharmQuark | +2/3 | 1/2 | false\nAntiUpQuark | -2/3 | 1/2 | true\nAntiDownQuark | +1/3 | 1/2 | true\nAntiTopQuark | -2/3 | 1/2 | true\nAntiBottomQuark | +1/3 | 1/2 | true\nAntiStrangeQuark | +1/3 | 1/2 | true\nAntiCharmQuark | -2/3 | 1/2 | true\nAntiCharmQuark | -2/3 | 1/2 | true\n\n#### Leptons\n\nname | charge | spin | anti matter\n--- | --- | --- | ---\nElectron | -1 | 1/2 | false\nPositron | +1 | 1/2 | true\nElectronNeutrino | 0 | 1/2 | false\nElectronAntiNeutrino | 0 | 1/2 | true\nMuon | -1 | 1/2 | false\nAntiMuon | +1 | 1/2 | true\nTau | -1 | 1/2 | false\nAntiTau | +1 | 1/2 | true\nTauNeutrino | -1 | 1/2 | false\nAntiTauNeutrino | 0 | 1/2 | true\nMuonNeutrino | 0 | 1/2 | false\nAntiMuonNeutrino | 0 | 1/2 | true\n\n#### Bosons\n\n'Communication' or 'transfer' particles that interact with applied forced or fermions\n\nname | Forces | Scalar | Spin | Charge\n--- | --- | --- | --- | ---\nPhoton | Electromagnetic | false | 1 | 0\nGluon | Strong force | false | 1 | 0\nZBoson | Weak force | false | 1 | 0\nPositiveWBoson | Weak force | false | 1 | 1\nNegativeWBoson | Weak force | false | 1 | -1\nHiggs Boson | | true | 0 | 0\n\n```ts\nimport { Photon, UpQuark } from 'wave-func';\n\nconst photon = new Photo();\n\nconst up = new UpQuark();\n\nconst bosons = getBosons(up); // [Gluon, PositiveWBoson, NegativeWBoson, ZBoson]\n```\n\n## Forces \n\n- Electromagnetic\n- Weak force\n- Strong force (chromodynamic)\n\n## Spin\n\nThe spin of a particle\n\n## Elements \n\nThe atoms of our reality\n\n```ts\nimport { Oxygen } from 'wave-func';\n\nconst oxygen = new Oxygen();\n\nconsole.log(oxygen.symbol, oxygen.hardons, oxygen.electrons, oxygen.electronShells, oxygen.meltingPoint, oxygen.boilingPoint)\n\n```\n\n### Properties\n\nProperty | Purpose | Example value\n--- | --- | ---\nelement.electrons | The amount of electrons charged to atom. In shells | `[2, 8, 8, 2]`\nelement.electronShells | The number of electron shells on an atm | `4`\nelement.name | The name of the element from `ElementName` enum | `Calcium`\nelement.number | The atomic number of the element (number of protons considered neutral) | `20`\nelement.atomicSymbol | The symbol given to the atomic structure | `Ca`\nelement.symbol | The atomic symbol and the sub of the element's proton count if required | `21Ca`\nelement.group | The atomic group of the element | `Alkalin metals`\nelement.meltingPoint | The melting point of the element in kelvin | `1115`\nelement.boilingPoint | The boiling point of the element in kelvin | `1757`\nelement.hardons | An array of hardon particles in the nucleus | `[[Function Proton], [Function Neutron]]` (not a helpful example)\nelement.charge | The overall charge of the element (sum of proton charge, neutron charge and electron charge) | `0` `1`\nelement.overallChargeStatus | The overall charge of the element: positive or negative | `negative`\nelement.stable | A boolean of the overall atom's charge | `true`\n\n\n### Functions\n\n#### addHardon\n\nAdds a hardon particle to the nucleus which will change the overall atom's charge, stability and symbol output.\n\n```ts\nconst element = new Oxygen();\n\nconsole.log(element.symbol); // O\nconsole.log(element.charge); // 0\nconsole.log(element.stable); // true\n\nelement.addHardon(new Proton());\n\nconsole.log(element.symbol); // 9O\nconsole.log(element.charge); // 1\nconsole.log(element.stable); // false\n```\n\n\u003e Eventually I want to be able to change the element's atomic name and prototype based on the overall protons/neutrons in the hardon array (nucleus)\n\n\n## Charge \n\n```ts\nimport { Proton, Neutron, Carbon } from 'wave-func';\n\nconst proton = new Proton();\nconst neutron = new Neutron();\n\nconsole.log(proton.charge); // 1\nconsole.log(neutron.charge); // 0\n\nconst carbon = new Carbon();\n\nconsole.log(carbon.charge); // 0\n\ncarbon.addHardon(new Proton());\nconsole.log(carbon.charge); // 1\n```\n\n## Anti matter\n\n```ts\nimport { Proton, Electron, oppositeMatter } from 'wave-func';\n\nconst antiMatter = oppositeMatter(new Proton()); // AntiProton\nconst antiMatter = oppositeMatter(new Electron()); // Positron\n```\n\n# Idea\n\n```ts\nimport { Oxygen, Neutron, Proton } from 'wave-func';\n\nconst element = new Oxygen();\n\nconsole.log(element.constructor); // [Function Oxygen]\nelement.addHardon(new Neutron());\n\nconsole.log(element.contructor, element.symbol); // [Function Oxygen] 9O\n\nelement.addHardon(new Proton());\nconsole.log(element.constructor, element.symbol); // [Function Fluorine] F\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbashleigh%2Fwave-func","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbashleigh%2Fwave-func","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbashleigh%2Fwave-func/lists"}