diff options
author | Daniel Baumann <daniel@debian.org> | 2025-01-24 09:00:09 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2025-01-24 09:00:09 +0100 |
commit | 4bf4dabd48aa70da3699b9a023f22689645d24f4 (patch) | |
tree | ed8175444649e71c0ed0e5f1d30101786ca2473e /pkg/runner/testdata/actions/node12/node_modules/is-plain-object/dist/is-plain-object.js | |
parent | Initial commit. (diff) | |
download | forgejo-act-debian.tar.xz forgejo-act-debian.zip |
Adding upstream version 1.24.0.HEADupstream/1.24.0upstreamdebian
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'pkg/runner/testdata/actions/node12/node_modules/is-plain-object/dist/is-plain-object.js')
-rw-r--r-- | pkg/runner/testdata/actions/node12/node_modules/is-plain-object/dist/is-plain-object.js | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/pkg/runner/testdata/actions/node12/node_modules/is-plain-object/dist/is-plain-object.js b/pkg/runner/testdata/actions/node12/node_modules/is-plain-object/dist/is-plain-object.js new file mode 100644 index 0000000..d134e4f --- /dev/null +++ b/pkg/runner/testdata/actions/node12/node_modules/is-plain-object/dist/is-plain-object.js @@ -0,0 +1,38 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +/*! + * is-plain-object <https://github.com/jonschlinkert/is-plain-object> + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObject(o) { + return Object.prototype.toString.call(o) === '[object Object]'; +} + +function isPlainObject(o) { + var ctor,prot; + + if (isObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (ctor === undefined) return true; + + // If has modified prototype + prot = ctor.prototype; + if (isObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +} + +exports.isPlainObject = isPlainObject; |