update, text, response

This commit is contained in:
2025-11-02 11:09:14 +01:00
parent 14776c86b0
commit eed8a4ddcf
2794 changed files with 156786 additions and 129204 deletions

View File

@@ -1,6 +1,8 @@
# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object)
> Returns true if an object was created by the `Object` constructor.
> Returns true if an object was created by the `Object` constructor, or Object.create(null).
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
## Install
@@ -14,11 +16,17 @@ Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to ch
## Usage
with es modules
```js
var isPlainObject = require('is-plain-object');
import { isPlainObject } from 'is-plain-object';
```
**true** when created by the `Object` constructor.
or with commonjs
```js
const { isPlainObject } = require('is-plain-object');
```
**true** when created by the `Object` constructor, or Object.create(null).
```js
isPlainObject(Object.create({}));
@@ -29,6 +37,8 @@ isPlainObject({foo: 'bar'});
//=> true
isPlainObject({});
//=> true
isPlainObject(null);
//=> true
```
**false** when not created by the `Object` constructor.
@@ -42,34 +52,32 @@ isPlainObject([]);
//=> false
isPlainObject(new Foo);
//=> false
isPlainObject(null);
//=> false
isPlainObject(Object.create(null));
//=> false
```
## About
### Related projects
* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.")
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.")
### Contributing
<details>
<summary><strong>Contributing</strong></summary>
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### Contributors
</details>
| **Commits** | **Contributor** |
| --- | --- |
| 17 | [jonschlinkert](https://github.com/jonschlinkert) |
| 6 | [stevenvachon](https://github.com/stevenvachon) |
| 3 | [onokumus](https://github.com/onokumus) |
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
<details>
<summary><strong>Running Tests</strong></summary>
### Building docs
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```
</details>
<details>
<summary><strong>Building docs</strong></summary>
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
@@ -79,26 +87,39 @@ To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
### Running tests
</details>
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
### Related projects
```sh
$ npm install && npm test
```
You might also be interested in these projects:
* [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.")
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.")
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 19 | [jonschlinkert](https://github.com/jonschlinkert) |
| 6 | [TrySound](https://github.com/TrySound) |
| 6 | [stevenvachon](https://github.com/stevenvachon) |
| 3 | [onokumus](https://github.com/onokumus) |
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
* [GitHub Profile](https://github.com/jonschlinkert)
* [Twitter Profile](https://twitter.com/jonschlinkert)
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
### License
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 11, 2017._
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 28, 2019._

View File

@@ -1,3 +1,7 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
@@ -5,27 +9,22 @@
* Released under the MIT License.
*/
'use strict';
var isObject = require('isobject');
function isObjectObject(o) {
return isObject(o) === true
&& Object.prototype.toString.call(o) === '[object Object]';
function isObject(o) {
return Object.prototype.toString.call(o) === '[object Object]';
}
module.exports = function isPlainObject(o) {
function isPlainObject(o) {
var ctor,prot;
if (isObjectObject(o) === false) return false;
if (isObject(o) === false) return false;
// If has modified constructor
ctor = o.constructor;
if (typeof ctor !== 'function') return false;
if (ctor === undefined) return true;
// If has modified prototype
prot = ctor.prototype;
if (isObjectObject(prot) === false) return false;
if (isObject(prot) === false) return false;
// If constructor does not have an Object-specific method
if (prot.hasOwnProperty('isPrototypeOf') === false) {
@@ -34,4 +33,6 @@ module.exports = function isPlainObject(o) {
// Most likely a plain Object
return true;
};
}
exports.isPlainObject = isPlainObject;

34
node_modules/is-plain-object/dist/is-plain-object.mjs generated vendored Normal file
View File

@@ -0,0 +1,34 @@
/*!
* 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;
}
export { isPlainObject };

View File

@@ -1,5 +0,0 @@
export = isPlainObject;
declare function isPlainObject(o: any): boolean;
declare namespace isPlainObject {}

1
node_modules/is-plain-object/is-plain-object.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export function isPlainObject(o: any): boolean;

View File

@@ -1,80 +1,53 @@
{
"_from": "is-plain-object@^2.0.3",
"_id": "is-plain-object@2.0.4",
"_inBundle": false,
"_integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
"_location": "/is-plain-object",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "is-plain-object@^2.0.3",
"name": "is-plain-object",
"escapedName": "is-plain-object",
"rawSpec": "^2.0.3",
"saveSpec": null,
"fetchSpec": "^2.0.3"
},
"_requiredBy": [
"/copy-props",
"/each-props",
"/extend-shallow/is-extendable",
"/fined",
"/liftoff",
"/mixin-deep/is-extendable",
"/set-value"
"name": "is-plain-object",
"description": "Returns true if an object was created by the `Object` constructor, or Object.create(null).",
"version": "5.0.0",
"homepage": "https://github.com/jonschlinkert/is-plain-object",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"contributors": [
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
"Osman Nuri Okumuş (http://onokumus.com)",
"Steven Vachon (https://svachon.com)",
"(https://github.com/wtgtybhertgeghgtwtg)",
"Bogdan Chadkin (https://github.com/TrySound)"
],
"_resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
"_shasum": "2c163b3fafb1b606d9d17928f05c2a1c38e07677",
"_spec": "is-plain-object@^2.0.3",
"_where": "/var/www/html/jason/WeihnachtenMelly/node_modules/set-value",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"repository": "jonschlinkert/is-plain-object",
"bugs": {
"url": "https://github.com/jonschlinkert/is-plain-object/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Jon Schlinkert",
"url": "http://twitter.com/jonschlinkert"
},
{
"name": "Osman Nuri Okumuş",
"url": "http://onokumus.com"
},
{
"name": "Steven Vachon",
"url": "https://svachon.com"
},
{
"url": "https://github.com/wtgtybhertgeghgtwtg"
}
"license": "MIT",
"main": "dist/is-plain-object.js",
"module": "dist/is-plain-object.mjs",
"types": "is-plain-object.d.ts",
"files": [
"is-plain-object.d.ts",
"dist"
],
"dependencies": {
"isobject": "^3.0.1"
},
"deprecated": false,
"description": "Returns true if an object was created by the `Object` constructor.",
"devDependencies": {
"browserify": "^14.4.0",
"chai": "^4.0.2",
"gulp-format-md": "^1.0.0",
"mocha": "^3.4.2",
"mocha-phantomjs": "^4.1.0",
"phantomjs": "^2.1.7",
"uglify-js": "^3.0.24"
"exports": {
".": {
"import": "./dist/is-plain-object.mjs",
"require": "./dist/is-plain-object.js"
},
"./package.json": "./package.json"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.d.ts",
"index.js"
],
"homepage": "https://github.com/jonschlinkert/is-plain-object",
"scripts": {
"build": "rollup -c",
"test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html",
"test_node": "mocha -r esm",
"test": "npm run test_node && npm run build && npm run test_browser",
"prepare": "rollup -c"
},
"devDependencies": {
"chai": "^4.2.0",
"esm": "^3.2.22",
"gulp-format-md": "^1.0.0",
"mocha": "^6.1.4",
"mocha-headless-chrome": "^3.1.0",
"rollup": "^2.22.1"
},
"keywords": [
"check",
"is",
@@ -89,20 +62,6 @@
"typeof",
"value"
],
"license": "MIT",
"main": "index.js",
"name": "is-plain-object",
"repository": {
"type": "git",
"url": "git+https://github.com/jonschlinkert/is-plain-object.git"
},
"scripts": {
"browserify": "browserify index.js --standalone isPlainObject | uglifyjs --compress --mangle -o browser/is-plain-object.js",
"test": "npm run test_node && npm run browserify && npm run test_browser",
"test_browser": "mocha-phantomjs test/browser.html",
"test_node": "mocha"
},
"types": "index.d.ts",
"verb": {
"toc": false,
"layout": "default",
@@ -122,6 +81,5 @@
"lint": {
"reflinks": true
}
},
"version": "2.0.4"
}
}