UNPKG

rubico

Version:

[a]synchronous functional programming

17 lines (13 loc) 327 B
/** * Rubico v2.8.2 * https://rubico.land/ * * © Richard Yufei Tong, King of Software * Rubico may be freely distributed under the CFOSS license. */ const isArray = Array.isArray const uniq = arr => { if (!isArray(arr)) throw Error('uniq(arr): arr is not an array') return [...new Set(arr)] } export default uniq