Nestable Processes Mutate

    nestify-anything
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.2 • Public • Published

    Nestify anything 🧅

    Total Downloads Latest Stable Version

    npm i nestify-anything
    

    Recreates an object from any nested.props. A simple and small integration.

    Can be used in combination with flatten-anything 🏏, which does the exact opposite of this one! 😉

    Meet the family

    Usage

    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!

    Install

    npm i nestify-anything

    DownloadsWeekly Downloads

    480

    Version

    2.0.2

    License

    MIT

    Unpacked Size

    9.24 kB

    Total Files

    6

    Last publish

    Collaborators

    • mesqueeb