https://github.com/ryanhefner/lomit
🪶 Lightweight object omit method, just because.
https://github.com/ryanhefner/lomit
object omit utility utility-function
Last synced: 6 days ago
JSON representation
🪶 Lightweight object omit method, just because.
- Host: GitHub
- URL: https://github.com/ryanhefner/lomit
- Owner: ryanhefner
- License: mit
- Created: 2017-09-14T03:22:16.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-02-04T06:49:23.000Z (almost 5 years ago)
- Last Synced: 2025-03-13T09:57:28.280Z (11 months ago)
- Topics: object, omit, utility, utility-function
- Language: JavaScript
- Homepage: https://www.pkgstats.com/pkg:lomit
- Size: 1.81 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# lomit
[](https://github.com/ryanhefner/lomit)
[](LICENSE)
[](https://www.npmjs.com/package/lomit)



Lightweight function for omitting properties from an object.
## Install
Via [npm](https://npmjs.com/package/lomit)
```sh
npm install --save lomit
```
Via [Yarn](https://yarnpkg.com/package/lomit)
```sh
yarn add lomit
```
## How to use
```js
import { omit } from 'lomit';
omit({name: '', title: ''}, ['title']);
```
```sh
Output: {name: ''}
```
### Deep omits (*__New!__*)
```js
import { omit } from 'lomit';
omit({name: '', title: '', location: { city: '', state: '' }}, ['title', 'location.city']);
```
```sh
Output: {name: '', location: { state: '' }}
```
## License
[MIT](LICENSE) © [Ryan Hefner](https://www.ryanhefner.com)