Soup.endsWith() - shysolocup/stews GitHub Wiki
checks if it ends with stuff
type: Function
arguments:
- ?values
Any
list of values (array or arguments) to check for
if one of them is true it'll return true
list: | pair: |
const { Soup } = require('stews');
let arr = new Soup([ "abc", "def" ]);
// false because it doesn't end with that
console.log(arr.endsWith("de"));
// true because it does end with it
console.log(arr.endsWith("def"));
// true because it does end with one of them
console.log(arr.endsWith("de", "def")); |
const { Soup } = require('stews');
let obj = new Soup({ abc: 0, def: 1 });
// false because it doesn't end with that
console.log(obj.endsWith("de"));
// true because it does end with it
console.log(obj.endsWith("def"));
// true because it does end with that
console.log(obj.endsWith("de", "def")); |
false
true
true |
false
true
true |