ramda-extension
Version:
Helpful functions built on top of the mighty Ramda
21 lines (20 loc) • 600 B
JavaScript
import { curry, compose, isEmpty, intersection } from 'ramda';
/**
* Returns `true` if any of the items from first array is not the second array.
*
* @func
* @category List
*
* @param {Array} List
* @param {Array} List
* @return {Boolean} If any of the items from first array is not in the second array.
*
* @example
*
* R_.containsNone(['e', 'f'], ['a', 'b', 'c']) // true
* R_.containsNone(['a', 'f'], ['a', 'b', 'c']) // false
*
* @sig [a] -> [a] -> Boolean
*/
var containsNone = /*#__PURE__*/curry( /*#__PURE__*/compose(isEmpty, intersection));
export default containsNone;