{"id":13493421,"url":"https://github.com/reconbot/js-off","last_synced_at":"2025-04-13T16:32:12.438Z","repository":{"id":66221209,"uuid":"171377992","full_name":"reconbot/js-off","owner":"reconbot","description":null,"archived":false,"fork":false,"pushed_at":"2019-02-19T02:21:16.000Z","size":19,"stargazers_count":41,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-04T18:11:34.350Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/reconbot.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}},"created_at":"2019-02-19T00:40:02.000Z","updated_at":"2024-09-17T13:39:20.000Z","dependencies_parsed_at":"2023-02-21T23:00:51.502Z","dependency_job_id":null,"html_url":"https://github.com/reconbot/js-off","commit_stats":null,"previous_names":["reconbot/jsoff"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconbot%2Fjs-off","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconbot%2Fjs-off/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconbot%2Fjs-off/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconbot%2Fjs-off/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reconbot","download_url":"https://codeload.github.com/reconbot/js-off/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248743907,"owners_count":21154765,"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-07-31T19:01:15.076Z","updated_at":"2025-04-13T16:32:12.149Z","avatar_url":"https://github.com/reconbot.png","language":"JavaScript","readme":"# jsoff\n\nCount which JSON fields you've accessed and remove the rest.\n\n```js\nconst { jsOff, countSymbol } = require('@reconbot/jsoff')\nconst input = {\n  foo: {\n    bar: 4,\n    baz: null\n  },\n  arr: [{ name: 'spock', age: 64 }, { name: undefined }]\n}\n\nconst data = jsOff(input)\n\nconsole.log(data.foo.bar)\nconsole.log(data.arr.map(i =\u003e i.name ))\n\nconsole.log(data[countSymbol])\n// { foo: 1, arr: 1 })\nconsole.log(data.arr[0][countSymbol])\n// { name: 1, age: 0 }\nconsole.log(JSON.stringify(data))\n// {\"foo\":{\"bar\":4},\"arr\":[{\"name\":\"spock\"},{}]}\n```\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freconbot%2Fjs-off","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freconbot%2Fjs-off","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freconbot%2Fjs-off/lists"}