Soup.clear() - shysolocup/stews GitHub Wiki

removes every entry
type: Function


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

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

console.log(arr);

arr.clear();

console.log(arr);
const { Soup } = require('stews');

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

console.log(obj);

obj.clear();

console.log(obj);
Soup(2) [ "a", "b" ] // before
Soup(0) [  ] // after
Soup(2) { key1: "val1", key2: "val2" } // before
Soup(0) {  } // after


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