INNER CODE UNIT · JavaScript

getEnvToUnsignedInt

CloudI/CloudI · src/api/javascript/CloudI.js:112

var getEnvToUnsignedInt = function getEnvToUnsignedInt (name) {
    var value_str = process.env[name];
    if (value_str === undefined) {
        throw new InvalidInputException();
    }
    var value = parseInt(value_str);
    if (value < 0) {
        throw new InvalidInputException();
    }
    return value;
};

var InvalidInputException = function InvalidInputException () {
    var error = new Error('Invalid Input');
    error.name = 'InvalidInputException';
    this.message = error.message;
    if (error.stack) {
        this.stack = error.stack;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…