UNPKG

foxts

Version:

Opinionated collection of common TypeScript utils by @SukkaW

5 lines 429 B
/** * Ponyfill for the TC39 "Property Counting" proposal. * * @see https://github.com/tc39/proposal-object-property-count */function t(t){let e=0;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function e(t){return Object.getOwnPropertyNames(t).length}function n(t){return Object.getOwnPropertySymbols(t).length}export{e as getOwnPropertyNamesLength,n as getOwnPropertySymbolsLength,t as keysLength};