https://github.com/charliewilco/sanitize-object
https://github.com/charliewilco/sanitize-object
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/charliewilco/sanitize-object
- Owner: charliewilco
- Created: 2018-06-18T07:49:03.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-10T23:19:56.000Z (over 5 years ago)
- Last Synced: 2025-02-24T08:50:35.540Z (4 months ago)
- Language: TypeScript
- Size: 76.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Sanitize Object

When you need a cloned object without the stowaways.
## Install
```
yarn add @charliewilco/sanitize-object
```## Example
```js
const sanitize = require('@charliewilco/sanitize-object')const cloned = sanitize(
{ dateAdded: '2017-11-21T15:57:28.109Z', title: 'Some Entry' },
['dateAdded']
)console.log(cloned)
// Result: { title: 'Some Entry' }
```