@httpx/plain-object
Advanced tools
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../src/is-plain-object.ts","../src/assert-plain-object.ts","../src/is-static-built-in-class.ts"],"names":["isPlainObject","v","proto","assertPlainObject","msgOrErrorFactory","isStaticBuiltInClass"],"mappings":"aAqDO,IAAMA,CAGXC,CAAAA,CAAAA,EAGyB,CACzB,GAAIA,CAAM,GAAA,IAAA,EAAQ,OAAOA,CAAAA,EAAM,QAC7B,CAAA,OAAO,MAGT,CAAA,IAAMC,CAAQ,CAAA,MAAA,CAAO,cAAeD,CAAAA,CAAC,CACrC,CAAA,OACEC,CAAU,GAAA,IAAA,EACVA,CAAU,GAAA,MAAA,CAAO,SAEjB,EAAA,MAAA,CAAO,cAAeA,CAAAA,CAAK,CAAM,GAAA,IAErC,EC5BO,SAASC,CAGdF,CAAAA,CAAAA,CACAG,CAGsB,CAAA,CACtB,GAAI,CAACJ,CAAsBC,CAAAA,CAAC,CAC1B,CAAA,MACEG,CAAsB,GAAA,MAAA,EACtB,OAAOA,CAAAA,EAAsB,QAEvB,CAAA,IAAI,SAAUA,CAAAA,CAAAA,EAAqB,mBAAmB,CAAA,CAExDA,CAAkB,EAE5B,CC1DO,IAAMC,CAAwBJ,CAAAA,CAAAA,EAC5BA,CAAM,GAAA,IAAA,EAAQA,CAAM,GAAA,IAAA,EAAQA,CAAM,GAAA","file":"index.cjs","sourcesContent":["import type { BasePlainObject, DefaultBasePlainObject } from './internal.types';\nimport type { PlainObject } from './plain-object.types';\n\n/**\n * Check if a value is a plain object\n *\n * A plain object is a basic JavaScript object, such as {}, { data: [] }, new Object() or Object.create(null).\n *\n * @example\n * ```typescript\n * import { isPlainObject } from '@httpx/plain-object';\n *\n * // β π True\n *\n * isPlainObject({ }); // β \n * isPlainObject({ key: 'value' }); // β \n * isPlainObject({ key: new Date() }); // β \n * isPlainObject(new Object()); // β \n * isPlainObject(Object.create(null)); // β \n * isPlainObject({ nested: { key: true} }); // β \n * isPlainObject(new Proxy({}, {})); // β \n * isPlainObject({ [Symbol('tag')]: 'A' }); // β \n *\n * // β π (node context, workers, ...)\n * const runInNewContext = await import('node:vm').then(\n * (mod) => mod.runInNewContext\n * );\n * isPlainObject(runInNewContext('({})')); // β \n *\n * // βπ False\n *\n * class Test { };\n * isPlainObject(new Test()) // β\n * isPlainObject(10); // β\n * isPlainObject(null); // β\n * isPlainObject('hello'); // β\n * isPlainObject([]); // β\n * isPlainObject(new Date()); // β\n * isPlainObject(new Uint8Array([1])); // β\n * isPlainObject(Buffer.from('ABC')); // β\n * isPlainObject(Promise.resolve({})); // β\n * isPlainObject(Object.create({})); // β\n * isPlainObject(new (class Cls {})); // β\n * isPlainObject(globalThis); // β\n *\n * // β π Note that static built-in classes are treated as plain objects\n * // check for `isStaticBuiltInClass` to exclude if needed\n *\n * isPlainObject(Math); // β \n * isPlainObject(JSON); // β \n * isPlainObject(Atomics); // β \n * ```\n */\nexport const isPlainObject = <\n TValue extends BasePlainObject = DefaultBasePlainObject,\n>(\n v: unknown\n): v is TValue extends DefaultBasePlainObject\n ? BasePlainObject\n : PlainObject<TValue> => {\n if (v === null || typeof v !== 'object') {\n return false;\n }\n\n const proto = Object.getPrototypeOf(v) as typeof Object.prototype | null;\n return (\n proto === null ||\n proto === Object.prototype ||\n // Required to support node:vm.runInNewContext({})\n Object.getPrototypeOf(proto) === null\n );\n};\n","import type {\n BasePlainObject,\n DefaultBasePlainObject,\n MsgOrErrorFactory,\n} from './internal.types';\nimport { isPlainObject } from './is-plain-object';\nimport type { PlainObject } from './plain-object.types';\n\n/**\n * Assert a value is a plain object\n *\n * @example\n * ```typescript\n * import { assertPlainObject } from '@httpx/plain-object';\n * import type { PlainObject } from '@httpx/plain-object';\n *\n * function fn(value: unknown) {\n *\n * // π Throws `new TypeError('Not a plain object')` if not a plain object\n * assertPlainObject(value);\n *\n * // π Throws `new TypeError('Custom message')` if not a plain object\n * assertPlainObject(value, 'Custom message');\n *\n * // π Throws custom error if not a plain object\n * assertPlainObject(value, () => {\n * throw new HttpBadRequest('Custom message');\n * });\n *\n * return value;\n * }\n *\n * try {\n * const value = fn({ key: 'value' });\n * // β Value is known to be PlainObject<unknown>\n * assertType<PlainObject>(value);\n * } catch (error) {\n * console.error(error);\n * }\n * ```\n *\n * @throws TypeError\n */\nexport function assertPlainObject<\n TValue extends BasePlainObject = DefaultBasePlainObject,\n>(\n v: unknown,\n msgOrErrorFactory?: MsgOrErrorFactory\n): asserts v is TValue extends DefaultBasePlainObject\n ? BasePlainObject\n : PlainObject<TValue> {\n if (!isPlainObject<TValue>(v)) {\n if (\n msgOrErrorFactory === undefined ||\n typeof msgOrErrorFactory === 'string'\n ) {\n throw new TypeError(msgOrErrorFactory ?? `Not a PlainObject`);\n }\n throw msgOrErrorFactory();\n }\n}\n","export type StaticBuiltInClass = Math | JSON | Atomics;\n\nexport const isStaticBuiltInClass = (v: unknown): v is StaticBuiltInClass => {\n return v === Math || v === JSON || v === Atomics;\n};\n"]} | ||
| {"version":3,"sources":["../src/is-plain-object.ts","../src/assert-plain-object.ts","../src/is-static-built-in-class.ts"],"names":["isPlainObject","v","proto","assertPlainObject","msgOrErrorFactory","isStaticBuiltInClass"],"mappings":"aAqDO,IAAMA,CAAAA,CAGXC,CAAAA,EAGyB,CACzB,GAAIA,CAAAA,GAAM,IAAA,EAAQ,OAAOA,CAAAA,EAAM,QAAA,CAC7B,OAAO,MAAA,CAGT,IAAMC,CAAAA,CAAQ,MAAA,CAAO,cAAA,CAAeD,CAAC,CAAA,CACrC,OACEC,CAAAA,GAAU,IAAA,EACVA,CAAAA,GAAU,MAAA,CAAO,SAAA,EAEjB,MAAA,CAAO,cAAA,CAAeA,CAAK,CAAA,GAAM,IAErC,EC5BO,SAASC,CAAAA,CAGdF,CAAAA,CACAG,CAAAA,CAGsB,CACtB,GAAI,CAACJ,CAAAA,CAAsBC,CAAC,CAAA,CAC1B,MACEG,CAAAA,GAAsB,MAAA,EACtB,OAAOA,CAAAA,EAAsB,QAAA,CAEvB,IAAI,SAAA,CAAUA,CAAAA,EAAqB,mBAAmB,CAAA,CAExDA,CAAAA,EAEV,CC1DO,IAAMC,CAAAA,CAAwBJ,CAAAA,EAC5BA,CAAAA,GAAM,IAAA,EAAQA,CAAAA,GAAM,IAAA,EAAQA,CAAAA,GAAM","file":"index.cjs","sourcesContent":["import type { BasePlainObject, DefaultBasePlainObject } from './internal.types';\nimport type { PlainObject } from './plain-object.types';\n\n/**\n * Check if a value is a plain object\n *\n * A plain object is a basic JavaScript object, such as {}, { data: [] }, new Object() or Object.create(null).\n *\n * @example\n * ```typescript\n * import { isPlainObject } from '@httpx/plain-object';\n *\n * // β π True\n *\n * isPlainObject({ }); // β \n * isPlainObject({ key: 'value' }); // β \n * isPlainObject({ key: new Date() }); // β \n * isPlainObject(new Object()); // β \n * isPlainObject(Object.create(null)); // β \n * isPlainObject({ nested: { key: true} }); // β \n * isPlainObject(new Proxy({}, {})); // β \n * isPlainObject({ [Symbol('tag')]: 'A' }); // β \n *\n * // β π (node context, workers, ...)\n * const runInNewContext = await import('node:vm').then(\n * (mod) => mod.runInNewContext\n * );\n * isPlainObject(runInNewContext('({})')); // β \n *\n * // βπ False\n *\n * class Test { };\n * isPlainObject(new Test()) // β\n * isPlainObject(10); // β\n * isPlainObject(null); // β\n * isPlainObject('hello'); // β\n * isPlainObject([]); // β\n * isPlainObject(new Date()); // β\n * isPlainObject(new Uint8Array([1])); // β\n * isPlainObject(Buffer.from('ABC')); // β\n * isPlainObject(Promise.resolve({})); // β\n * isPlainObject(Object.create({})); // β\n * isPlainObject(new (class Cls {})); // β\n * isPlainObject(globalThis); // β\n *\n * // β π Note that static built-in classes are treated as plain objects\n * // check for `isStaticBuiltInClass` to exclude if needed\n *\n * isPlainObject(Math); // β \n * isPlainObject(JSON); // β \n * isPlainObject(Atomics); // β \n * ```\n */\nexport const isPlainObject = <\n TValue extends BasePlainObject = DefaultBasePlainObject,\n>(\n v: unknown\n): v is TValue extends DefaultBasePlainObject\n ? BasePlainObject\n : PlainObject<TValue> => {\n if (v === null || typeof v !== 'object') {\n return false;\n }\n\n const proto = Object.getPrototypeOf(v) as typeof Object.prototype | null;\n return (\n proto === null ||\n proto === Object.prototype ||\n // Required to support node:vm.runInNewContext({})\n Object.getPrototypeOf(proto) === null\n );\n};\n","import type {\n BasePlainObject,\n DefaultBasePlainObject,\n MsgOrErrorFactory,\n} from './internal.types';\nimport { isPlainObject } from './is-plain-object';\nimport type { PlainObject } from './plain-object.types';\n\n/**\n * Assert a value is a plain object\n *\n * @example\n * ```typescript\n * import { assertPlainObject } from '@httpx/plain-object';\n * import type { PlainObject } from '@httpx/plain-object';\n *\n * function fn(value: unknown) {\n *\n * // π Throws `new TypeError('Not a plain object')` if not a plain object\n * assertPlainObject(value);\n *\n * // π Throws `new TypeError('Custom message')` if not a plain object\n * assertPlainObject(value, 'Custom message');\n *\n * // π Throws custom error if not a plain object\n * assertPlainObject(value, () => {\n * throw new HttpBadRequest('Custom message');\n * });\n *\n * return value;\n * }\n *\n * try {\n * const value = fn({ key: 'value' });\n * // β Value is known to be PlainObject<unknown>\n * assertType<PlainObject>(value);\n * } catch (error) {\n * console.error(error);\n * }\n * ```\n *\n * @throws TypeError\n */\nexport function assertPlainObject<\n TValue extends BasePlainObject = DefaultBasePlainObject,\n>(\n v: unknown,\n msgOrErrorFactory?: MsgOrErrorFactory\n): asserts v is TValue extends DefaultBasePlainObject\n ? BasePlainObject\n : PlainObject<TValue> {\n if (!isPlainObject<TValue>(v)) {\n if (\n msgOrErrorFactory === undefined ||\n typeof msgOrErrorFactory === 'string'\n ) {\n throw new TypeError(msgOrErrorFactory ?? `Not a PlainObject`);\n }\n throw msgOrErrorFactory();\n }\n}\n","export type StaticBuiltInClass = Math | JSON | Atomics;\n\nexport const isStaticBuiltInClass = (v: unknown): v is StaticBuiltInClass => {\n return v === Math || v === JSON || v === Atomics;\n};\n"]} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../src/is-plain-object.ts","../src/assert-plain-object.ts","../src/is-static-built-in-class.ts"],"names":["isPlainObject","v","proto","assertPlainObject","msgOrErrorFactory","isStaticBuiltInClass"],"mappings":"AAqDO,IAAMA,CAGXC,CAAAA,CAAAA,EAGyB,CACzB,GAAIA,CAAM,GAAA,IAAA,EAAQ,OAAOA,CAAAA,EAAM,QAC7B,CAAA,OAAO,MAGT,CAAA,IAAMC,CAAQ,CAAA,MAAA,CAAO,cAAeD,CAAAA,CAAC,CACrC,CAAA,OACEC,CAAU,GAAA,IAAA,EACVA,CAAU,GAAA,MAAA,CAAO,SAEjB,EAAA,MAAA,CAAO,cAAeA,CAAAA,CAAK,CAAM,GAAA,IAErC,EC5BO,SAASC,CAGdF,CAAAA,CAAAA,CACAG,CAGsB,CAAA,CACtB,GAAI,CAACJ,CAAsBC,CAAAA,CAAC,CAC1B,CAAA,MACEG,CAAsB,GAAA,MAAA,EACtB,OAAOA,CAAAA,EAAsB,QAEvB,CAAA,IAAI,SAAUA,CAAAA,CAAAA,EAAqB,mBAAmB,CAAA,CAExDA,CAAkB,EAE5B,CC1DO,IAAMC,CAAwBJ,CAAAA,CAAAA,EAC5BA,CAAM,GAAA,IAAA,EAAQA,CAAM,GAAA,IAAA,EAAQA,CAAM,GAAA","file":"index.mjs","sourcesContent":["import type { BasePlainObject, DefaultBasePlainObject } from './internal.types';\nimport type { PlainObject } from './plain-object.types';\n\n/**\n * Check if a value is a plain object\n *\n * A plain object is a basic JavaScript object, such as {}, { data: [] }, new Object() or Object.create(null).\n *\n * @example\n * ```typescript\n * import { isPlainObject } from '@httpx/plain-object';\n *\n * // β π True\n *\n * isPlainObject({ }); // β \n * isPlainObject({ key: 'value' }); // β \n * isPlainObject({ key: new Date() }); // β \n * isPlainObject(new Object()); // β \n * isPlainObject(Object.create(null)); // β \n * isPlainObject({ nested: { key: true} }); // β \n * isPlainObject(new Proxy({}, {})); // β \n * isPlainObject({ [Symbol('tag')]: 'A' }); // β \n *\n * // β π (node context, workers, ...)\n * const runInNewContext = await import('node:vm').then(\n * (mod) => mod.runInNewContext\n * );\n * isPlainObject(runInNewContext('({})')); // β \n *\n * // βπ False\n *\n * class Test { };\n * isPlainObject(new Test()) // β\n * isPlainObject(10); // β\n * isPlainObject(null); // β\n * isPlainObject('hello'); // β\n * isPlainObject([]); // β\n * isPlainObject(new Date()); // β\n * isPlainObject(new Uint8Array([1])); // β\n * isPlainObject(Buffer.from('ABC')); // β\n * isPlainObject(Promise.resolve({})); // β\n * isPlainObject(Object.create({})); // β\n * isPlainObject(new (class Cls {})); // β\n * isPlainObject(globalThis); // β\n *\n * // β π Note that static built-in classes are treated as plain objects\n * // check for `isStaticBuiltInClass` to exclude if needed\n *\n * isPlainObject(Math); // β \n * isPlainObject(JSON); // β \n * isPlainObject(Atomics); // β \n * ```\n */\nexport const isPlainObject = <\n TValue extends BasePlainObject = DefaultBasePlainObject,\n>(\n v: unknown\n): v is TValue extends DefaultBasePlainObject\n ? BasePlainObject\n : PlainObject<TValue> => {\n if (v === null || typeof v !== 'object') {\n return false;\n }\n\n const proto = Object.getPrototypeOf(v) as typeof Object.prototype | null;\n return (\n proto === null ||\n proto === Object.prototype ||\n // Required to support node:vm.runInNewContext({})\n Object.getPrototypeOf(proto) === null\n );\n};\n","import type {\n BasePlainObject,\n DefaultBasePlainObject,\n MsgOrErrorFactory,\n} from './internal.types';\nimport { isPlainObject } from './is-plain-object';\nimport type { PlainObject } from './plain-object.types';\n\n/**\n * Assert a value is a plain object\n *\n * @example\n * ```typescript\n * import { assertPlainObject } from '@httpx/plain-object';\n * import type { PlainObject } from '@httpx/plain-object';\n *\n * function fn(value: unknown) {\n *\n * // π Throws `new TypeError('Not a plain object')` if not a plain object\n * assertPlainObject(value);\n *\n * // π Throws `new TypeError('Custom message')` if not a plain object\n * assertPlainObject(value, 'Custom message');\n *\n * // π Throws custom error if not a plain object\n * assertPlainObject(value, () => {\n * throw new HttpBadRequest('Custom message');\n * });\n *\n * return value;\n * }\n *\n * try {\n * const value = fn({ key: 'value' });\n * // β Value is known to be PlainObject<unknown>\n * assertType<PlainObject>(value);\n * } catch (error) {\n * console.error(error);\n * }\n * ```\n *\n * @throws TypeError\n */\nexport function assertPlainObject<\n TValue extends BasePlainObject = DefaultBasePlainObject,\n>(\n v: unknown,\n msgOrErrorFactory?: MsgOrErrorFactory\n): asserts v is TValue extends DefaultBasePlainObject\n ? BasePlainObject\n : PlainObject<TValue> {\n if (!isPlainObject<TValue>(v)) {\n if (\n msgOrErrorFactory === undefined ||\n typeof msgOrErrorFactory === 'string'\n ) {\n throw new TypeError(msgOrErrorFactory ?? `Not a PlainObject`);\n }\n throw msgOrErrorFactory();\n }\n}\n","export type StaticBuiltInClass = Math | JSON | Atomics;\n\nexport const isStaticBuiltInClass = (v: unknown): v is StaticBuiltInClass => {\n return v === Math || v === JSON || v === Atomics;\n};\n"]} | ||
| {"version":3,"sources":["../src/is-plain-object.ts","../src/assert-plain-object.ts","../src/is-static-built-in-class.ts"],"names":["isPlainObject","v","proto","assertPlainObject","msgOrErrorFactory","isStaticBuiltInClass"],"mappings":"AAqDO,IAAMA,CAAAA,CAGXC,CAAAA,EAGyB,CACzB,GAAIA,CAAAA,GAAM,IAAA,EAAQ,OAAOA,CAAAA,EAAM,QAAA,CAC7B,OAAO,MAAA,CAGT,IAAMC,CAAAA,CAAQ,MAAA,CAAO,cAAA,CAAeD,CAAC,CAAA,CACrC,OACEC,CAAAA,GAAU,IAAA,EACVA,CAAAA,GAAU,MAAA,CAAO,SAAA,EAEjB,MAAA,CAAO,cAAA,CAAeA,CAAK,CAAA,GAAM,IAErC,EC5BO,SAASC,CAAAA,CAGdF,CAAAA,CACAG,CAAAA,CAGsB,CACtB,GAAI,CAACJ,CAAAA,CAAsBC,CAAC,CAAA,CAC1B,MACEG,CAAAA,GAAsB,MAAA,EACtB,OAAOA,CAAAA,EAAsB,QAAA,CAEvB,IAAI,SAAA,CAAUA,CAAAA,EAAqB,mBAAmB,CAAA,CAExDA,CAAAA,EAEV,CC1DO,IAAMC,CAAAA,CAAwBJ,CAAAA,EAC5BA,CAAAA,GAAM,IAAA,EAAQA,CAAAA,GAAM,IAAA,EAAQA,CAAAA,GAAM","file":"index.mjs","sourcesContent":["import type { BasePlainObject, DefaultBasePlainObject } from './internal.types';\nimport type { PlainObject } from './plain-object.types';\n\n/**\n * Check if a value is a plain object\n *\n * A plain object is a basic JavaScript object, such as {}, { data: [] }, new Object() or Object.create(null).\n *\n * @example\n * ```typescript\n * import { isPlainObject } from '@httpx/plain-object';\n *\n * // β π True\n *\n * isPlainObject({ }); // β \n * isPlainObject({ key: 'value' }); // β \n * isPlainObject({ key: new Date() }); // β \n * isPlainObject(new Object()); // β \n * isPlainObject(Object.create(null)); // β \n * isPlainObject({ nested: { key: true} }); // β \n * isPlainObject(new Proxy({}, {})); // β \n * isPlainObject({ [Symbol('tag')]: 'A' }); // β \n *\n * // β π (node context, workers, ...)\n * const runInNewContext = await import('node:vm').then(\n * (mod) => mod.runInNewContext\n * );\n * isPlainObject(runInNewContext('({})')); // β \n *\n * // βπ False\n *\n * class Test { };\n * isPlainObject(new Test()) // β\n * isPlainObject(10); // β\n * isPlainObject(null); // β\n * isPlainObject('hello'); // β\n * isPlainObject([]); // β\n * isPlainObject(new Date()); // β\n * isPlainObject(new Uint8Array([1])); // β\n * isPlainObject(Buffer.from('ABC')); // β\n * isPlainObject(Promise.resolve({})); // β\n * isPlainObject(Object.create({})); // β\n * isPlainObject(new (class Cls {})); // β\n * isPlainObject(globalThis); // β\n *\n * // β π Note that static built-in classes are treated as plain objects\n * // check for `isStaticBuiltInClass` to exclude if needed\n *\n * isPlainObject(Math); // β \n * isPlainObject(JSON); // β \n * isPlainObject(Atomics); // β \n * ```\n */\nexport const isPlainObject = <\n TValue extends BasePlainObject = DefaultBasePlainObject,\n>(\n v: unknown\n): v is TValue extends DefaultBasePlainObject\n ? BasePlainObject\n : PlainObject<TValue> => {\n if (v === null || typeof v !== 'object') {\n return false;\n }\n\n const proto = Object.getPrototypeOf(v) as typeof Object.prototype | null;\n return (\n proto === null ||\n proto === Object.prototype ||\n // Required to support node:vm.runInNewContext({})\n Object.getPrototypeOf(proto) === null\n );\n};\n","import type {\n BasePlainObject,\n DefaultBasePlainObject,\n MsgOrErrorFactory,\n} from './internal.types';\nimport { isPlainObject } from './is-plain-object';\nimport type { PlainObject } from './plain-object.types';\n\n/**\n * Assert a value is a plain object\n *\n * @example\n * ```typescript\n * import { assertPlainObject } from '@httpx/plain-object';\n * import type { PlainObject } from '@httpx/plain-object';\n *\n * function fn(value: unknown) {\n *\n * // π Throws `new TypeError('Not a plain object')` if not a plain object\n * assertPlainObject(value);\n *\n * // π Throws `new TypeError('Custom message')` if not a plain object\n * assertPlainObject(value, 'Custom message');\n *\n * // π Throws custom error if not a plain object\n * assertPlainObject(value, () => {\n * throw new HttpBadRequest('Custom message');\n * });\n *\n * return value;\n * }\n *\n * try {\n * const value = fn({ key: 'value' });\n * // β Value is known to be PlainObject<unknown>\n * assertType<PlainObject>(value);\n * } catch (error) {\n * console.error(error);\n * }\n * ```\n *\n * @throws TypeError\n */\nexport function assertPlainObject<\n TValue extends BasePlainObject = DefaultBasePlainObject,\n>(\n v: unknown,\n msgOrErrorFactory?: MsgOrErrorFactory\n): asserts v is TValue extends DefaultBasePlainObject\n ? BasePlainObject\n : PlainObject<TValue> {\n if (!isPlainObject<TValue>(v)) {\n if (\n msgOrErrorFactory === undefined ||\n typeof msgOrErrorFactory === 'string'\n ) {\n throw new TypeError(msgOrErrorFactory ?? `Not a PlainObject`);\n }\n throw msgOrErrorFactory();\n }\n}\n","export type StaticBuiltInClass = Math | JSON | Atomics;\n\nexport const isStaticBuiltInClass = (v: unknown): v is StaticBuiltInClass => {\n return v === Math || v === JSON || v === Atomics;\n};\n"]} |
+13
-14
| { | ||
| "name": "@httpx/plain-object", | ||
| "description": "Fast and lightweight utility functions to check if a value is a plain object.", | ||
| "version": "2.0.9", | ||
| "version": "2.1.0", | ||
| "license": "MIT", | ||
@@ -54,4 +54,4 @@ "author": { | ||
| "check-dist": "run-s check-dist-esm check-dist-cjs", | ||
| "check-dist-cjs": "es-check --not './dist/*.map.js' -v es2022 './dist/**/*.cjs'", | ||
| "check-dist-esm": "es-check --not './dist/*.map.js' -v es2022 --module './dist/**/*.mjs'", | ||
| "check-dist-cjs": "es-check --not './dist/*.map.js' -v es2023 './dist/**/*.cjs'", | ||
| "check-dist-esm": "es-check --not './dist/*.map.js' -v es2023 --module './dist/**/*.mjs'", | ||
| "check-pub": "attw --pack && publint", | ||
@@ -75,14 +75,14 @@ "check-size": "size-limit", | ||
| "devDependencies": { | ||
| "@arethetypeswrong/cli": "0.18.1", | ||
| "@belgattitude/eslint-config-bases": "7.0.0", | ||
| "@arethetypeswrong/cli": "0.18.2", | ||
| "@belgattitude/eslint-config-bases": "7.3.0", | ||
| "@httpx/devtools-vitest": "workspace:^", | ||
| "@sindresorhus/is": "7.0.1", | ||
| "@sindresorhus/is": "7.0.2", | ||
| "@size-limit/file": "11.2.0", | ||
| "@size-limit/webpack": "11.2.0", | ||
| "@types/lodash-es": "4.17.12", | ||
| "browserslist": "4.25.0", | ||
| "browserslist": "4.25.1", | ||
| "browserslist-to-esbuild": "2.1.1", | ||
| "cross-env": "7.0.3", | ||
| "es-check": "9.1.2", | ||
| "es-toolkit": "1.38.0", | ||
| "es-check": "9.1.4", | ||
| "es-toolkit": "1.39.5", | ||
| "esbuild": "0.25.5", | ||
@@ -94,18 +94,17 @@ "eslint": "8.57.1", | ||
| "npm-run-all2": "8.0.4", | ||
| "prettier": "3.5.3", | ||
| "prettier": "3.6.1", | ||
| "publint": "0.3.12", | ||
| "redux": "5.0.1", | ||
| "rimraf": "6.0.1", | ||
| "rollup": "4.41.1", | ||
| "size-limit": "11.2.0", | ||
| "tsup": "8.5.0", | ||
| "typedoc": "0.28.5", | ||
| "typedoc-plugin-markdown": "4.6.4", | ||
| "typedoc-plugin-markdown": "4.7.0", | ||
| "typescript": "5.8.3", | ||
| "vitest": "3.1.4", | ||
| "vitest": "3.2.4", | ||
| "webpack": "5.99.9" | ||
| }, | ||
| "engines": { | ||
| "node": ">=18" | ||
| "node": ">=20.9.0" | ||
| } | ||
| } |
+3
-3
@@ -14,3 +14,3 @@ # @httpx/plain-object | ||
| [](https://github.com/belgattitude/httpx/blob/main/packages/plain-object/.size-limit.cjs) | ||
| [](#compatibility) | ||
| [](#compatibility) | ||
| [](#compatibility) | ||
@@ -35,3 +35,3 @@ [](https://bundlephobia.com/package/@httpx/plain-object@latest) | ||
| - π Lightweight (starts at [~80B](#bundle-size)) | ||
| - π‘οΈ Tested on [node 18-22, browser, cloudflare workers and runtime/edge](#compatibility). | ||
| - π‘οΈ Tested on [node 20-24, browser, cloudflare workers and runtime/edge](#compatibility). | ||
| - π Works cross-realms (node:vm runInNewContext,...) | ||
@@ -241,3 +241,3 @@ - ποΈ Available in ESM and CJS formats. | ||
| |------------|----|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| | Node | β | CI for 18.x, 20.x & 22.x. | | ||
| | Node | β | CI for 20.x, 22.x & 24.x. | | ||
| | Browser | β | Tested with latest chrome (vitest/playwright) | | ||
@@ -244,0 +244,0 @@ | Browserslist | β | [> 95%](https://browserslist.dev/?q=ZGVmYXVsdHMsIGNocm9tZSA%2BPSA5NiwgZmlyZWZveCA%2BPSAxMDUsIGVkZ2UgPj0gMTEzLCBzYWZhcmkgPj0gMTUsIGlvcyA%2BPSAxNSwgb3BlcmEgPj0gMTAzLCBub3QgZGVhZA%3D%3D) on 01/2025. [defaults, chrome >= 96, firefox >= 105, edge >= 113, safari >= 15, ios >= 15, opera >= 103, not dead](https://github.com/belgattitude/httpx/blob/main/packages/plain-object/.browserslistrc) | |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
29
-3.33%42276
-0.02%