Skip to content

Commit

Permalink
Improve jsdoc for is-object
Browse files Browse the repository at this point in the history
  • Loading branch information
mroderick committed Aug 31, 2019
1 parent 452e11d commit a2875ce
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions lib/is-object.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
"use strict";

// Returns true when the value is a regular Object and not a specialized Object
//
// This helps speeding up deepEqual cyclic checks
// The premise is that only Objects are stored in the visited array.
// So if this function returns false, we don't have to do the
// expensive operation of searching for the value in the the array of already
// visited objects
/**
* Returns `true` when the value is a regular Object and not a specialized Object
*
* This helps speed up deepEqual cyclic checks
*
* The premise is that only Objects are stored in the visited array.
* So if this function returns false, we don't have to do the
* expensive operation of searching for the value in the the array of already
* visited objects
*
* @private
* @param {object} value The object to examine
* @returns {boolean} `true` when the object is a non-specialised object
*/
function isObject(value) {
return (
typeof value === "object" &&
Expand Down

0 comments on commit a2875ce

Please sign in to comment.