Stew.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 { Stew } = require('stews');
let arr = new Stew([ "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 { Stew } = require('stews');
let obj = new Stew({ 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)); |
Stew(3) [ "A", "B", "C" ] // turns all entries to uppercase
Stew(3) [ "A", "b", "C" ] // turns only indexes 0 and 2 |
Stew(3) { KEY1: "VAL1", KEY2: "VAL2", KEY3: "VAL3" } // turns all entries to uppercase
Stew(3) { KEY1: "VAL1", key2: "val2", KEY3: "VAL3" } // turns only indexes 0 and 2 |