Releases: belgattitude/httpx
@httpx/[email protected]
Patch Changes
- Updated dependencies [
d1a01e2
]:- @httpx/[email protected]
@httpx/[email protected]
Patch Changes
- #1535
d1a01e2
Thanks @belgattitude! - Mention comparison with redux isPlainObject (100% compat)
@httpx/[email protected]
Minor Changes
-
#1537
dfb209f
Thanks @belgattitude! - isPlainObject inline behaviour with @httpx/plain-object v2.-
#1530
4e1ecf4
Thanks @belgattitude! - Not 100% compatible with sindreshorsus/is-plain-obj anymoreThe changes shouldn't affect most users, but it's worth noting that the
isPlainObject
function no longer consider static built-in objects as plain objects (Math, JSON, Atomics).This fix an issue with
{ [Symbol.toStringTag]: 'tag' }
that wasn't considered as a plain object.If the behaviour is needed there's a new
isStaticBuiltInClass
function that can be used to check
if a value is a static built-in class (Math, JSON, Atomics).Another change to mention is that
isPlainObject
now accepts[Symbol.iterator]
as a valid property for plain objects.const v = { [Symbol.iterator]: function* () { yield 1; }, }; // Since v2 considered as a plain object
Which allows to add iterators to plain objects.
-
#1530
4e1ecf4
Thanks @belgattitude! - Fix issue with plain objects that contains a [Symbol.iterator]isPlainObject
now accepts[Symbol.iterator]
as a valid property for plain objects.const v = { [Symbol.iterator]: function* () { yield 1; }, }; // Since v2 considered as a plain object
Which allows to add iterators to plain objects.
-
#1530
4e1ecf4
Thanks @belgattitude! - Small performance increase@httpx/plain-object: `isPlainObject(v)` - bench/comparative.bench.ts > Compare calling isPlainObject with 110x mixed types values 1.11x faster than (sindresorhus/)is-plain-obj: `isPlainObj(v)` 1.79x faster than @sindresorhus/is: `is.plainObject(v)` 2.29x faster than (jonschlinkert/)is-plain-object: `isPlainObject(v)` 14.66x faster than estoolkit: `isPlainObject(v)` 73.82x faster than lodash-es: `_.isPlainObject(v)`
-
#1530
4e1ecf4
Thanks @belgattitude! - This fix an issue with{ [Symbol.toStringTag]: 'tag' }
that wasn't considered as a plain object. -
#1530
4e1ecf4
Thanks @belgattitude! - Bundle size reduction from 101B to 75B when importing isPlainObject from @httpx/plain-objectOnly { isPlainObject } (ESM) Package size is 1 B less than limit Size limit: 76 B Size: 75 B with all dependencies, minified and brotlied Only { assertPlainObject } (ESM) Package size is 1 B less than limit Size limit: 133 B Size: 132 B with all dependencies, minified and brotlied Import { assertPlainObject, isPlainObject } (ESM) Size: 139 B with all dependencies, minified and brotlied
-
#1530
4e1ecf4
Thanks @belgattitude! - isPlainObject allows static built-in classes: for Atomic, Math, Json.The changes shouldn't affect most users, but it's worth noting that the
isPlainObject
function no longer consider static build-in objects as plain objects (Math, JSON, Atomics).This fix an issue with
{ [Symbol.toStringTag]: 'tag' }
that wasn't considered as a plain object.If the behaviour is needed there's a new
isStaticBuiltInClass
function that can be used to check
if a value is a static built-in class (Math, JSON, Atomics).import { isPlainObject, isStaticBuiltInClass } from "@httpx/plain-object"; const v = Math; // or Atomics or JSON if (isPlainObject(v) && !isStaticBuiltInClass(v)) { console.log("v is a plain object but not a static built-in class"); }
-
#1530
4e1ecf4
Thanks @belgattitude! - Change assertPlainObject default message to 'Not a PlainObject'This change the default error message of
assertPlainObject
to 'Not a PlainObject' instead of 'Not a plain object'.
-
@httpx/[email protected]
@httpx/[email protected]
Major Changes
-
#1530
4e1ecf4
Thanks @belgattitude! - Not 100% compatible with sindreshorsus/is-plain-obj anymoreThe changes shouldn't affect most users, but it's worth noting that the
isPlainObject
function no longer consider static built-in objects as plain objects (Math, JSON, Atomics).This fix an issue with
{ [Symbol.toStringTag]: 'tag' }
that wasn't considered as a plain object.If the behaviour is needed there's a new
isStaticBuiltInClass
function that can be used to check
if a value is a static built-in class (Math, JSON, Atomics).Another change to mention is that
isPlainObject
now accepts[Symbol.iterator]
as a valid property for plain objects.const v = { [Symbol.iterator]: function* () { yield 1; }, }; // Since v2 considered as a plain object
Which allows to add iterators to plain objects.
-
#1530
4e1ecf4
Thanks @belgattitude! - Fix issue with plain objects that contains a [Symbol.iterator]isPlainObject
now accepts[Symbol.iterator]
as a valid property for plain objects.const v = { [Symbol.iterator]: function* () { yield 1; }, }; // Since v2 considered as a plain object
Which allows to add iterators to plain objects.
-
#1530
4e1ecf4
Thanks @belgattitude! - Small performance increase@httpx/plain-object: `isPlainObject(v)` - bench/comparative.bench.ts > Compare calling isPlainObject with 110x mixed types values 1.11x faster than (sindresorhus/)is-plain-obj: `isPlainObj(v)` 1.79x faster than @sindresorhus/is: `is.plainObject(v)` 2.29x faster than (jonschlinkert/)is-plain-object: `isPlainObject(v)` 14.66x faster than estoolkit: `isPlainObject(v)` 73.82x faster than lodash-es: `_.isPlainObject(v)`
-
#1530
4e1ecf4
Thanks @belgattitude! - This fix an issue with{ [Symbol.toStringTag]: 'tag' }
that wasn't considered as a plain object. -
#1530
4e1ecf4
Thanks @belgattitude! - Bundle size reduction from 101B to 75B when importing isPlainObject from @httpx/plain-objectOnly { isPlainObject } (ESM) Package size is 1 B less than limit Size limit: 76 B Size: 75 B with all dependencies, minified and brotlied Only { assertPlainObject } (ESM) Package size is 1 B less than limit Size limit: 133 B Size: 132 B with all dependencies, minified and brotlied Import { assertPlainObject, isPlainObject } (ESM) Size: 139 B with all dependencies, minified and brotlied
-
#1530
4e1ecf4
Thanks @belgattitude! - isPlainObject allows static built-in classes: for Atomic, Math, Json.The changes shouldn't affect most users, but it's worth noting that the
isPlainObject
function no longer consider static build-in objects as plain objects (Math, JSON, Atomics).This fix an issue with
{ [Symbol.toStringTag]: 'tag' }
that wasn't considered as a plain object.If the behaviour is needed there's a new
isStaticBuiltInClass
function that can be used to check
if a value is a static built-in class (Math, JSON, Atomics).import { isPlainObject, isStaticBuiltInClass } from "@httpx/plain-object"; const v = Math; // or Atomics or JSON if (isPlainObject(v) && !isStaticBuiltInClass(v)) { console.log("v is a plain object but not a static built-in class"); }
-
#1530
4e1ecf4
Thanks @belgattitude! - Change assertPlainObject default message to 'Not a PlainObject'This change the default error message of
assertPlainObject
to 'Not a PlainObject' instead of 'Not a plain object'.
@httpx/[email protected]
Patch Changes
- Updated dependencies [
003cdb3
]:- @httpx/[email protected]
@httpx/[email protected]
Minor Changes
- #1523
003cdb3
Thanks @belgattitude! - Small speedup for isPlainObject and size reduction
@httpx/[email protected]
Minor Changes
- #1523
003cdb3
Thanks @belgattitude! - Align isPlainObject implementation with @httpx/plain-object (speed+, no bc)
@httpx/[email protected]
Patch Changes
- Updated dependencies [
6bd5105
]:- @httpx/[email protected]
@httpx/[email protected]
Patch Changes
- #1434
6bd5105
Thanks @belgattitude! - internal: assertPlainObject error message remove explicit undefined union