You can use inArray() here, defined at the end of src/core.js