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

    omappublic

    OMAP (ObjectMap)

    Maps object key to array of possible keys.

    npm install omap --save

    Example

    var omap = require("omap");
    
    var incoming = {
        "Access Token": "12345qwerty"
    }
    
    var potential = {
        "token": [
            "access-token",
            "token",
            "token-access",
        ]
    }
    
    var outgoing = omap(incoming, potential);
    
    // { token: '12345qwerty' }
    
    

    Keywords

    none

    install

    npm i omap

    Downloadsweekly downloads

    7

    version

    0.0.1

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar