https://github.com/mesqueeb/nestify-anything
Recreates an object from any `nested.props`. A simple and small integration.
https://github.com/mesqueeb/nestify-anything
nest-objects nest-paths nested nestify nestify-objects paths
Last synced: 9 months ago
JSON representation
Recreates an object from any `nested.props`. A simple and small integration.
- Host: GitHub
- URL: https://github.com/mesqueeb/nestify-anything
- Owner: mesqueeb
- License: mit
- Created: 2019-08-05T04:44:22.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2025-08-04T20:52:29.000Z (10 months ago)
- Last Synced: 2025-09-10T13:38:41.751Z (9 months ago)
- Topics: nest-objects, nest-paths, nested, nestify, nestify-objects, paths
- Language: TypeScript
- Homepage:
- Size: 813 KB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Nestify anything 🧅
```
npm i nestify-anything
```
Recreates an object from any `nested.props`. A simple and small integration.
Can be used in combination with [flatten-anything 🏏](https://github.com/mesqueeb/flatten-anything), which does the exact opposite of this one! 😉
## Meet the family (more tiny utils with TS support)
- [is-what 🙉](https://github.com/mesqueeb/is-what)
- [is-where 🙈](https://github.com/mesqueeb/is-where)
- [merge-anything 🥡](https://github.com/mesqueeb/merge-anything)
- [check-anything 👁](https://github.com/mesqueeb/check-anything)
- [remove-anything ✂️](https://github.com/mesqueeb/remove-anything)
- [getorset-anything 🐊](https://github.com/mesqueeb/getorset-anything)
- [map-anything 🗺](https://github.com/mesqueeb/map-anything)
- [filter-anything ⚔️](https://github.com/mesqueeb/filter-anything)
- [copy-anything 🎭](https://github.com/mesqueeb/copy-anything)
- [case-anything 🐫](https://github.com/mesqueeb/case-anything)
- [flatten-anything 🏏](https://github.com/mesqueeb/flatten-anything)
- [nestify-anything 🧅](https://github.com/mesqueeb/nestify-anything)
## Usage
```js
import { nestifyObject } from 'nestify-anything'
const target = {
'name': 'Ho-oh',
'types.fire': true,
'types.flying': true,
}
nestifyObject(target)
// returns {
// name: 'Ho-oh',
// types: { fire: true, flying: true }
// }
```
Currently the library only works with the dot character `'.'` as separator. If you need other characters like slash `'/'`, let me know in an issue!