textlint-rule-helper
Version:
A helper library for textlint rule.
17 lines • 511 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.includesType = void 0;
/**
* Return true if `types` includes `type`.
* It compares with `===` like `types.some(t => t === type)`, without creating a closure.
*/
var includesType = function (types, type) {
for (var i = 0; i < types.length; i++) {
if (types[i] === type) {
return true;
}
}
return false;
};
exports.includesType = includesType;
//# sourceMappingURL=includes-type.js.map