1.1.0 • Published 2 years ago

tec_node_variables v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

tecNodeVariables

This is a module for the node args. These are parsed into an object or an array of objects

Use

    npm i --save tecNodeVariables

    let tecNode = require("tecNodeVariables");

    // Here you can either specify an object with the variable keys or the default is set -> ["-s", "-w"]
    const tec = new tecNode(["-s", "-w", "-r"]);

    // Add a variable to the array
    tec.addVariable("-i")

    // Overwrites all existing variables
    tec.setVariables(["-i", "-h"]);

    // To get all variables
    let variables = tec.getVariables();

    // Search returns a object
    let test = tec.search("-v")
    console.log("test: ", test);
    // Example: { '-v' : 'test' }

    or

    let test = tec.search()
    console.log("test: ", test);
    // Example: [{ '-v' : 'test' }, { '-i', 'test2'}]
1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago