All files / libs/lang isPlainObject.js

100% Statements 3/3
100% Branches 0/0
100% Functions 1/1
100% Lines 3/3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23                1x                     1x 64x    
/**
 * @module      libs/lang/isPlainObject
 * @createdAt   2016-06-30
 *
 * @copyright   Copyright (c) 2016 Zhonglei Qiu
 * @license     Licensed under the MIT license.
 */
 
var toString = require('./toString')
 
/**
 * 判断 any 是不是一个原生的 Object,一般也叫做 PlainObject
 *
 * @param   {*}      any   任何的 JS 类型
 * @return  Boolean
 *
 * @author  Zhonglei Qiu
 * @since   2.0.0
 */
module.exports = function(any) {
  return toString(any) === '[object Object]'
}