mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Modularize master branch.
This commit is contained in:
27
isTypedArray.js
Normal file
27
isTypedArray.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import baseIsTypedArray from './_baseIsTypedArray.js';
|
||||
import baseUnary from './_baseUnary.js';
|
||||
import nodeUtil from './_nodeUtil.js';
|
||||
|
||||
/* Node.js helper references. */
|
||||
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a typed array.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 3.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isTypedArray(new Uint8Array);
|
||||
* // => true
|
||||
*
|
||||
* _.isTypedArray([]);
|
||||
* // => false
|
||||
*/
|
||||
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
||||
|
||||
export default isTypedArray;
|
||||
Reference in New Issue
Block a user