Universeorange.com/Docs/

Priya library Function reference Global functions is.set

    ready(() => {
        console.log(is.set(this));
    });

This example uses this in the is.set function and the window object is in this.
true should be logged in the console.

ready(() => {
    let variable = 0;

    // Evaluates to true because variable is empty
    if (is.empty(variable)) {
        console.log('variable is either 0, empty, or not set at all');
    }

    // Evaluates as true because variable is set
    if (is.set(variable)) {
        console.log('variable is set even though it is empty');
    }
});

Console F12:

variable is either 0, empty, or not set at all
variable is set even though it is empty

Last modified: 2021-06-07

© 2021 universeorange.com