{"id":15640615,"url":"https://github.com/jonschlinkert/omit-empty","last_synced_at":"2025-04-09T12:09:53.248Z","repository":{"id":21010337,"uuid":"24301021","full_name":"jonschlinkert/omit-empty","owner":"jonschlinkert","description":"Recursively omit empty properties from an object. Omits empty objects, arrays, strings, and optionally zero. Similar results to what you would expect with `compact` for arrays.","archived":false,"fork":false,"pushed_at":"2019-12-06T20:38:44.000Z","size":32,"stargazers_count":73,"open_issues_count":3,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-02T11:05:47.391Z","etag":null,"topics":["empty","javascript","jonschlinkert","keys","object","omit","remove","utility"],"latest_commit_sha":null,"homepage":"https://github.com/jonschlinkert","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/jonschlinkert.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2014-09-21T19:23:39.000Z","updated_at":"2025-02-04T13:47:19.000Z","dependencies_parsed_at":"2022-08-03T15:10:32.457Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/omit-empty","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fomit-empty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fomit-empty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fomit-empty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fomit-empty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/omit-empty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036067,"owners_count":21037092,"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":["empty","javascript","jonschlinkert","keys","object","omit","remove","utility"],"created_at":"2024-10-03T11:38:44.194Z","updated_at":"2025-04-09T12:09:53.222Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","readme":"# omit-empty [![NPM version](https://img.shields.io/npm/v/omit-empty.svg?style=flat)](https://www.npmjs.com/package/omit-empty) [![NPM monthly downloads](https://img.shields.io/npm/dm/omit-empty.svg?style=flat)](https://npmjs.org/package/omit-empty) [![NPM total downloads](https://img.shields.io/npm/dt/omit-empty.svg?style=flat)](https://npmjs.org/package/omit-empty) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/omit-empty.svg?style=flat\u0026label=Travis)](https://travis-ci.org/jonschlinkert/omit-empty)\n\n\u003e Recursively omit empty properties from an object. Omits empty objects, arrays, strings or zero.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save omit-empty\n```\n\n## Heads up!\n\nBreaking changes in v1.0.0! See the [Release History](#CHANGELOG.md).\n\n## Usage\n\n```js\nconst omitEmpty = require('omit-empty');\n\nconsole.log(omitEmpty({ a: 'a', b: '' }));\n//=\u003e { a: 'a' }\n\nconsole.log(omitEmpty({ a: 'a', b: { c: 'c', d: '' } }));\n//=\u003e { a: 'a', b: { c: 'c' } }\n\nconsole.log(omitEmpty({ a: ['a'], b: [] }));\n//=\u003e { a: ['a'] }\n\nconsole.log(omitEmpty({ a: 0, b: 1 }));\n//=\u003e { a: 0, b: 1 }\n\n// set omitZero to true, to evaluate \"0\" as falsey\nconsole.log(omitEmpty({ a: 0, b: 1 }, { omitZero: true }));\n//=\u003e { b: 1 }\n```\n\n## About\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eContributing\u003c/strong\u003e\u003c/summary\u003e\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eRunning Tests\u003c/strong\u003e\u003c/summary\u003e\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eBuilding docs\u003c/strong\u003e\u003c/summary\u003e\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n\u003c/details\u003e\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object \"Returns true if an object was created by the `Object` constructor.\")\n* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject \"Returns true if the value is an object and not an array or null.\")\n* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of \"Get the native type of a value.\")\n\n### Contributors\n\n| **Commits** | **Contributor** |  \n| --- | --- |  \n| 31 | [jonschlinkert](https://github.com/jonschlinkert) |  \n| 1  | [kakadiadarpan](https://github.com/kakadiadarpan) |  \n\n### Author\n\n**Jon Schlinkert**\n\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on December 10, 2018._","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fomit-empty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Fomit-empty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fomit-empty/lists"}