Repository URL to install this package:
|
Version:
6.0.4 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var curry_1 = require("../../fp/curry");
/**
* @desc haystack includes needle
* @memberOf includes
* @version 1.0.0
* @since 4.0.0
*
* @param haystack haystack includes needle
* @param needle needle in haystack
* @return needle in haystack
*
* @name includes
* @alias haystackNeedle
* @func
*
* @TODO `~haystack.indexOf(needle)`
*
* {@link https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#Bitwise_NOT mozilla-bitwise-not}
* @see {@link mozilla-bitwise-not}
* @see conditional/includes/flipped
*
* @example
*
* includes('eh', 'e') //=> true
* includes('eh', 'nope') //=> false
* includes(['eh'], 'eh') //=> true
* includes(['eh'], 'nope') //=> false
*
*/
var includes = function (haystack, needle) {
return haystack.includes(needle);
};
exports.default = curry_1.default(2, includes);
//# sourceMappingURL=haystackNeedle.js.map