Package Exports
- array-includes-all
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (array-includes-all) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
array-includes-all
Check if an array includes all the elements of another array
arrayIncludesAll(['a', 'b', 'c'], ['a', 'b']); //=> true
arrayIncludesAll(['a', 'b', 'c'], ['a', 'b', 'd']); //=> true
arrayIncludesAll([1, 2, NaN], [NaN]); //=> trueInstallation
Package managers
npm
npm install array-includes-allbower
bower install array-includes-allStandalone
Download the script file directly.
API
arrayIncludesAll(array, searchElements [, fromIndex])
array: Array
searchElements: Array (the elements to search for)
fromIndex: Array (the position in the array at which to begin searching)
Return: Boolean
The API is similar to Array.prototype.includes.call, except that the second argument takes an array of the elements to search for instead of a single element.
arrayIncludesAll([1, 2], [1, 2]); //=> true
arrayIncludesAll([1, 2], [1, 2], 1); //=> falseLicense
Copyright (c) 2016 Shinnosuke Watanabe
Licensed under the MIT License.