Skip to content

Add DefineList.prototype.includes method

Choose a tag to compare

@cherifGsoul cherifGsoul released this 26 Dec 22:25
· 92 commits to master since this release

Fixes #277 by adding includes method to DefineList:

import {DefineList} from "can";

 const list = new DefineList(["a", "b", "c"]);

 console.log(list.includes("a")); // true
 console.log(list.includes("foo")); // false
 console.log(list.includes("c", -100)); // true
 console.log(list.includes("b", 100)); // false