{"id":18245017,"url":"https://github.com/edgeapp/biggystring","last_synced_at":"2025-04-04T13:32:00.331Z","repository":{"id":48032972,"uuid":"98355171","full_name":"EdgeApp/biggystring","owner":"EdgeApp","description":"Floating point big number library using only strings as inputs and outputs","archived":false,"fork":false,"pushed_at":"2024-07-16T23:30:25.000Z","size":269,"stargazers_count":3,"open_issues_count":7,"forks_count":3,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-20T14:10:02.323Z","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/EdgeApp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-07-25T22:27:25.000Z","updated_at":"2024-07-16T23:30:27.000Z","dependencies_parsed_at":"2023-11-17T02:25:56.344Z","dependency_job_id":"9e561736-91e2-41af-a1f9-29cbabe1bff2","html_url":"https://github.com/EdgeApp/biggystring","commit_stats":{"total_commits":64,"total_committers":10,"mean_commits":6.4,"dds":0.59375,"last_synced_commit":"fbec04bd26571385d9c3177519f842f906c06440"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdgeApp%2Fbiggystring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdgeApp%2Fbiggystring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdgeApp%2Fbiggystring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdgeApp%2Fbiggystring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EdgeApp","download_url":"https://codeload.github.com/EdgeApp/biggystring/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247185116,"owners_count":20897905,"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":"2024-11-05T09:18:36.246Z","updated_at":"2025-04-04T13:32:00.013Z","avatar_url":"https://github.com/EdgeApp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# biggystring\n\nFloating point big number library using only strings as inputs and outputs\n\n## Install\n\n    npm install biggystring\n\n## Use\n\n    const bs = require('biggystring')\n\n### Basic Math\n\n    bs.add('32', '10') // =\u003e '42'\n    bs.sub('32', '10') // =\u003e '22'\n    bs.mul('32', '10') // =\u003e '320'\n    bs.div('32', '10') // =\u003e '3' Truncates remainder\n\n### Hex\n\n    bs.add('0xa', '10')   // =\u003e '20'\n    bs.add('0xa', '0x20') // =\u003e '42'\n    bs.add('10', '0x10')  // =\u003e '26'\n\n### Comparisons\n\n    bs.gt('32', '10')  // =\u003e True\n    bs.lt('32', '10')  // =\u003e False\n    bs.gte('32', '32') // =\u003e True\n    bs.lte('32', '10') // =\u003e False\n    bs.eq('32', '10')  // =\u003e False\n    bs.eq('32', '32')  // =\u003e True\n\n### Floating point operations (base 10 only)\n\n    bs.add('3.2', '1.3') // =\u003e '4.5'\n    bs.sub('3.2', '1.3') // =\u003e '1.9'\n    bs.mul('3.2', '1.3') // =\u003e '4.16'\n\n    // For `div`, 3rd arg is decimal precision, 4th arg is base\n    bs.div('10', '3.0', 5, 10) // =\u003e '3.33333'\n    bs.div('1.23', '3.3', 5, 10) // =\u003e '0.37272'\n\n### Rounding functions (base 10 only)\n\n    bs.floor('123.456', 0) =\u003e '123'\n    bs.floor('123.456', 1) =\u003e '120'\n    bs.floor('123.456', -1) =\u003e '123.4'\n    \n    bs.ceil('123.456', 0) =\u003e '124'\n    bs.ceil('123.456', 1) =\u003e '130'\n    bs.ceil('123.456', -1) =\u003e '123.5'\n\n    bs.round('123.456', 0) =\u003e '123'\n    bs.round('125.456', 1) =\u003e '130'\n    bs.round('123.456', -1) =\u003e '123.5'\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgeapp%2Fbiggystring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedgeapp%2Fbiggystring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgeapp%2Fbiggystring/lists"}