for adding addition to someone else's script in SS...
# suitescript
o
for adding addition to someone else's script in SS2.0, is there a similar way in SS1.0 to include it as a library script?
b
use the dependencies used in the define function to include your script module as a custom module
o
thank you!
would this work?
Copy code
/**
 * counter.js
 * @NApiVersion 2.x
 */
define(function(){
    var counter = 0;

    function incrementValue() { 
        counter++;
    }
    function getValue() { 
        return counter;
    }

    return {
        increment: incrementValue,
        value: getValue
    }
});
b
Thats part of a solution
You still need to add counter.js as a dependency to the original script
o
by using 'include' ?
...on the original
o
@battk you are a user guide Boss 😛 thank you
b
that one was literally the example underneath your example