{"id":29048539,"url":"https://github.com/vikyd/json-bigint-single","last_synced_at":"2025-10-20T05:43:27.842Z","repository":{"id":57687046,"uuid":"493666167","full_name":"vikyd/json-bigint-single","owner":"vikyd","description":"Single file version of json-bigint.","archived":false,"fork":false,"pushed_at":"2022-05-19T02:56:20.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-10T22:52:53.157Z","etag":null,"topics":["bigint","js","json-bigint","large","number"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/vikyd.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}},"created_at":"2022-05-18T13:04:19.000Z","updated_at":"2022-05-19T09:30:28.000Z","dependencies_parsed_at":"2022-09-27T10:50:28.844Z","dependency_job_id":null,"html_url":"https://github.com/vikyd/json-bigint-single","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vikyd/json-bigint-single","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikyd%2Fjson-bigint-single","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikyd%2Fjson-bigint-single/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikyd%2Fjson-bigint-single/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikyd%2Fjson-bigint-single/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vikyd","download_url":"https://codeload.github.com/vikyd/json-bigint-single/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikyd%2Fjson-bigint-single/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261200373,"owners_count":23123945,"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":["bigint","js","json-bigint","large","number"],"created_at":"2025-06-26T18:07:25.794Z","updated_at":"2025-10-20T05:43:22.781Z","avatar_url":"https://github.com/vikyd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# json-bigint-single\n\nSingle file version of [json-bigint](https://github.com/sidorares/json-bigint).\n\nSuitable for single line situation, like Postman `Global Variable`.\n\n# Install\n\nDownload directly from CDN:\n\n- unpkg: https://unpkg.com/json-bigint-single@1.0.0/dist/json-bigint-single.var.min.js\n  - page: https://unpkg.com/browse/json-bigint-single@1.0.0/\n\nOr by npm, yarn:\n\n```sh\n# npm\nnpm install json-bigint-single\n\n# yarn\nyarn add json-bigint-single\n```\n\n# Usage\n\n## Used in Postman Script\n\nIn Postman-like Apps:\n\n1. create new global variable:\n\n- name: `lib-json-bigint`\n- value: content of `dist/json-bigint-single.var.min.js`\n\n2. in Postman script:\n\n```js\n// 9007199254740991 - Number.MAX_SAFE_INTEGER:\n// 99999999999999998 - example bigger int\n// example json string:\nconst respBodyStr = `{\"a\": 99999999999999998}`;\n\n// load lib from global variable\neval(pm.globals.get(\"lib-json-bigint\"));\n\n// got variable: JsonBigInt\n// usage: https://github.com/sidorares/json-bigint\nconst obj = JsonBigInt.parse(respBodyStr);\n\n// before parse: {a: 99999999999999998}\n// after parse : {a: \"99999999999999998\"}\n// big int value becomes string\nconsole.log(obj);\n\n// need `.toString()` to get final string value\n// otherwise got a special object\nconst strVal = obj.a.toString();\n\n// postman assertion with string\npm.test(\"JSON value equals\", function () {\n  pm.expect(strVal).to.eql(\"99999999999999998\");\n});\n```\n\n# Development\n\nThis repo is a webpack build project.\n\n```sh\n# clone\ngit clone https://github.com/vikyd/json-bigint-single.git\n\n# get in\ncd json-bigint-single\n\n# install dependencies\nnpm install\n\n# build dist\nnpm run build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikyd%2Fjson-bigint-single","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvikyd%2Fjson-bigint-single","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikyd%2Fjson-bigint-single/lists"}