Soup.toLowerCase() - shysolocup/stews GitHub Wiki

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

alt names:

  • lower()

arguments:

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

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

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


let arr = new Soup([ "A", "B", "C" ]);


// turns all entries to lowercase
console.log(arr.toLowerCase());


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


let obj = new Soup({ KEY1: "VAL1", KEY2: "VAL2", KEY3: "VAL3" });


// turns all entries to lowercase
console.log(obj.toLowerCase());


// turns only indexes 0 and 2
console.log(obj.toLowerCase(0, 2));
Soup(3) [ "a", "b", "c" ] // turns all entries to lowercase
Soup(3) [ "a", "B", "c" ] // turns only indexes 0 and 2
Soup(3) { key1: "val1", key2: "val2", key3: "val3" } // turns all entries to lowercase
Soup(3) { key1: "val1", KEY2: "VAL2", key3: "val3" } // turns only indexes 0 and 2


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