@eivifj/dot

    1.0.3 • Public • Published

    dot

    Get and set object properties with dot notation

    Installation

    $ npm install @eivifj/dot
    

    API

    dot.set(object, path, value)

    dot.set(obj, 'cool.aid', 'rocks');
    assert(obj.cool.aid === 'rocks');

    dot.get(object, path)

    var value = dot.get(obj, 'cool.aid');
    assert(value === 'rocks');

    dot.delete(object, path)

    var value = dot.delete(obj, 'cool.aid');
    assert(!obj.cool.hasOwnProperty('aid'));

    License

    MIT

    Install

    npm i @eivifj/dot

    DownloadsWeekly Downloads

    6,520

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    4.54 kB

    Total Files

    4

    Last publish

    Collaborators

    • eivifj