123456789101112131415161718 |
- 'use strict';
- var $TypeError = require('es-errors/type');
- var Get = require('./Get');
- var ToLength = require('./ToLength');
- var Type = require('./Type');
- module.exports = function LengthOfArrayLike(obj) {
- if (Type(obj) !== 'Object') {
- throw new $TypeError('Assertion failed: `obj` must be an Object');
- }
- return ToLength(Get(obj, 'length'));
- };
|