ramda-extension
Version:
Helpful functions built on top of the mighty Ramda
21 lines (20 loc) • 437 B
JavaScript
import { uniq, length } from 'ramda';
import composeC from './composeC';
/**
* Returns number of unique values in an input array
*
* @func
* @category List
*
* @param {array} xs Data
*
* @return {number} Number of Unique values in input array
*
* @example
*
* R_.uniqLength(["hello", "world", "world"]) // 2
*
* @sig [a] -> Number
*/
var uniqLength = /*#__PURE__*/composeC(length, uniq);
export default uniqLength;