UNPKG

enum

Version:

Enum is a javascript module that introduces the Enum Type. It works for node.js, in the browser and for deno.

10 lines (9 loc) 271 B
export const indexOf = Array.prototype.indexOf || function (find, i /* opt */) { if (i === undefined) i = 0 if (i < 0) i += this.length if (i < 0) i = 0 for (var n = this.length; i < n; i++) { if (i in this && this[i] === find) { return i } } return -1 }