Soup.toUpperCase() - shysolocup/stews GitHub Wiki

turns strings (keys and values) into uppercase
type: Function

alt names:

  • upper()

arguments:

  • ?entries Any
    list of keys or indexes (array or arguments) to turn to uppercase

    if given it'll only turn those indexes to uppercase
    if not given it'll turn all entries to uppercase

list: pair:
const { Soup } = require('stews');


let arr = new Soup([ "a", "b", "c" ]);


// turns all entries to uppercase
console.log(arr.toUpperCase());


// turns only indexes 0 and 2
console.log(arr.toUpperCase(0, 2));
const { Soup } = require('stews');


let obj = new Soup({ key1: "val1", key2: "val2", key3: "val3" });


// turns all entries to uppercase
console.log(obj.toUpperCase());


// turns only indexes 0 and 2
console.log(obj.toUpperCase(0, 2));
Soup(3) [ "A", "B", "C" ] // turns all entries to uppercase
Soup(3) [ "A", "b", "C" ] // turns only indexes 0 and 2
Soup(3) { KEY1: "VAL1", KEY2: "VAL2", KEY3: "VAL3" } // turns all entries to uppercase
Soup(3) { KEY1: "VAL1", key2: "val2", KEY3: "VAL3" } // turns only indexes 0 and 2


⚠️ **GitHub.com Fallback** ⚠️