github.com/jfrog/frogbot@v1.1.1-0.20231221090046-821a26f50338/action/node_modules/is-plain-object/dist/is-plain-object.js (about)

     1  'use strict';
     2  
     3  Object.defineProperty(exports, '__esModule', { value: true });
     4  
     5  /*!
     6   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
     7   *
     8   * Copyright (c) 2014-2017, Jon Schlinkert.
     9   * Released under the MIT License.
    10   */
    11  
    12  function isObject(o) {
    13    return Object.prototype.toString.call(o) === '[object Object]';
    14  }
    15  
    16  function isPlainObject(o) {
    17    var ctor,prot;
    18  
    19    if (isObject(o) === false) return false;
    20  
    21    // If has modified constructor
    22    ctor = o.constructor;
    23    if (ctor === undefined) return true;
    24  
    25    // If has modified prototype
    26    prot = ctor.prototype;
    27    if (isObject(prot) === false) return false;
    28  
    29    // If constructor does not have an Object-specific method
    30    if (prot.hasOwnProperty('isPrototypeOf') === false) {
    31      return false;
    32    }
    33  
    34    // Most likely a plain Object
    35    return true;
    36  }
    37  
    38  exports.isPlainObject = isPlainObject;