{"id":22710578,"url":"https://github.com/smallhelm/level-json-coerce-null","last_synced_at":"2025-06-15T00:33:01.280Z","repository":{"id":57157592,"uuid":"67165212","full_name":"smallhelm/level-json-coerce-null","owner":"smallhelm","description":"db.put(key, undefined....) will give you problems. This codec fixes it.","archived":true,"fork":false,"pushed_at":"2016-09-01T21:49:43.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-06T15:02:25.401Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"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/smallhelm.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":"2016-09-01T20:47:50.000Z","updated_at":"2025-02-09T23:08:56.000Z","dependencies_parsed_at":"2022-09-07T20:33:18.266Z","dependency_job_id":null,"html_url":"https://github.com/smallhelm/level-json-coerce-null","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/smallhelm/level-json-coerce-null","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Flevel-json-coerce-null","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Flevel-json-coerce-null/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Flevel-json-coerce-null/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Flevel-json-coerce-null/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smallhelm","download_url":"https://codeload.github.com/smallhelm/level-json-coerce-null/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Flevel-json-coerce-null/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259905299,"owners_count":22929915,"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-12-10T12:10:39.173Z","updated_at":"2025-06-15T00:33:01.227Z","avatar_url":"https://github.com/smallhelm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# level-json-coerce-null\n\n[![build status](https://secure.travis-ci.org/smallhelm/level-json-coerce-null.svg)](https://travis-ci.org/smallhelm/level-json-coerce-null)\n\ndb.put(key, undefined....) will give you problems. This codec fixes it.\n\nIt simply coerces undefined to null so it will encode properly. Note that when it decodes it will be null instead of undefined.\n\nTo use it, simply change\n```js\nvar db = level(... {\n  valueEncoding: \"json\"\n})\n```\nTo this\n```js\nvar db = level(... {\n  valueEncoding: require(\"level-json-coerce-null\")\n})\n```\n\n## Rant\nIt's quite annoying that javascript has 2 ways of representing \"nothing\".\n * `null` - an object that is meant to represent nothing\n * `undefined` - the true nothing (it's also a re-assignable identifier)\n\nWAT!\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallhelm%2Flevel-json-coerce-null","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmallhelm%2Flevel-json-coerce-null","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallhelm%2Flevel-json-coerce-null/lists"}