ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
## isLength + [link](./isLength "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L9895 "View in source.") + [npm](https://www.npmjs.com/package/lodash.islength "See the npm package.") ``` _.isLength(value) ``` 检查 `value` 是否是有效长度 **注意:** 这个方法参考自 [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). ### 参数 1. value (\*) 要检查的值 ### 返回值 (boolean) 如果是有效长度返回 `true`,否则返回 `false` ### 示例 ``` _.isLength(3); // => true _.isLength(Number.MIN_VALUE); // => false _.isLength(Infinity); // => false _.isLength('3'); // => false ```