How to use the indexOf function from methods

Find comprehensive JavaScript methods.indexOf code examples handpicked from public code repositorys.

137
138
139
140
141
142
143
144
 */


function supports (method) {
  return method &&
    typeof method === 'string' &&
    methods.indexOf(method.toLowerCase()) !== -1
}
fork icon0
star icon0
watch icon1