Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    fd-setattrpublic

    fd-setattr

    Build Status npm version

    Add or change the attributes of a DOM element in a functional way.

    Installation

    npm install fd-setattr --save

    Usage

    let setattr = require('fd-setattr');
     
    let hide = setattr('hidden', true);
     
    hide(img); 
     

    API

    setAttr :: name -> value -> elem
    

    A curried function that takes in:

    • name -> Name of the attribute.

    • value -> Value for the attribute.

    • elem -> DOM element.

    Keywords

    install

    npm i fd-setattr

    Downloadsweekly downloads

    3

    version

    1.0.0

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar
    • avatar