UNPKG

rubico

Version:

[a]synchronous functional programming

8 lines (7 loc) 401 B
/** * rubico v2.6.2 * https://github.com/a-synchronous/rubico * (c) 2019-2024 Richard Tong * rubico may be freely distributed under the MIT license. */ const objectKeysLength=e=>{let t=0;for(const n in e)t+=1;return t},size=e=>"string"==typeof e?e.length:null==e?0:"number"==typeof e.length?e.length:"number"==typeof e.size?e.size:e.constructor==Object?objectKeysLength(e):1;export default size;