Nucleic Photon Magnetizer

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

    1.0.2 • Public • Published

    Remove Anything ✂️

    Total Downloads Latest Stable Version

    npm i remove-anything
    

    Removes props (eg. undefined) from an object

    An optimised way to remove any prop (eg. undefined) from an object. A small and simple integration.

    Usage

    import { removeProp } from 'remove-anything'
    
    const payload = { a: 1, b: undefined }
    const noUndefined = removeProp(payload, undefined)
    
    noUndefined // { a: 1 }
    
    const payload = { a: 1, b: undefined }
    const no1 = removeProp(payload, 1)
    
    no1 // { b: undefined }

    Meet the family

    Install

    npm i remove-anything

    DownloadsWeekly Downloads

    335

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    7.43 kB

    Total Files

    6

    Last publish

    Collaborators

    • mesqueeb