Plato on Github
Report Home
src/literal.js
Maintainability
86.91
Lines of code
29
Difficulty
8.75
Estimated Errors
0.06
Function weight
By Complexity
By SLOC
/** * @file Literal objects * @since 0.2.1 */ /*#ifndef(UMD)*/ "use strict"; /*exported _gpfIsLiteralObject*/ // Check if the parameter is a literal object /*#endif*/ var _gpfObjectToString = Object.prototype.toString; /** * Check if the parameter is a literal object * * @param {*} value Value to check * @return {Boolean} True if the value is a literal object * @since 0.2.1 */ function _gpfIsLiteralObject (value) { return value instanceof Object && _gpfObjectToString.call(value) === "[object Object]" && Object.getPrototypeOf(value) === Object.getPrototypeOf({}); } /** * @gpf:sameas _gpfIsLiteralObject * @since 0.2.1 */ gpf.isLiteralObject = _gpfIsLiteralObject;