UNPKG

rubico

Version:

[a]synchronous functional programming

9 lines (8 loc) 483 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,sameValueZero=function(n,e){return n===e||n!=n&&e!=e},objectIncludes=function(n,e){for(const r in n)if(sameValueZero(e,n[r]))return!0;return!1},includes=n=>function(e){return null!=e&&("function"==typeof e.includes?e.includes(n):e.constructor==Object&&objectIncludes(e,n))};export default includes;