{
  "_id": "deep-pick-omit",
  "maintainers": [
    {
      "name": "prazdevs",
      "email": "sachabouillez@gmail.com"
    }
  ],
  "dist-tags": {
    "latest": "1.2.1"
  },
  "author": {
    "name": "PraZ"
  },
  "_rev": "3-df49a1dd26be75541d96d972effff0c2",
  "description": "Deep-pick and deep-omit objects with typesafe paths.",
  "readme": "# deep-pick-omit\r\n\r\n[![npm version][version-src]][version-href]\r\n[![bundlephobia][bundle-src]][bundle-href]\r\n[![license][license-src]][license-href]\r\n\r\n> Deep-pick and deep-omit objects with typesafe paths.\r\n\r\n## Basic usage\r\n\r\nBoth `deepPick` and `deepOmit` take an object and an array of dot-notation paths to respectively pick and omit from the object. By default, TypeScript will infer types for paths and error if a path does not exist in the object.\r\n\r\n### `deepPick`\r\n\r\n```typescript\r\nimport { deepPick } from 'deep-pick-omit'\r\n\r\nconst obj = {\r\n  a: {\r\n    b: 'this',\r\n    c: 'not this'\r\n  },\r\n  d: 'this'\r\n}\r\n\r\ndeepPick(obj, ['a.b', 'e'])\r\n// -> { a: { b: 'this' }, d: 'this' }\r\n\r\ndeepPick(obj, ['f'])\r\n// -> TypeScript Error: `f` is not a key of `obj`\r\n```\r\n\r\n### `deepOmit`\r\n\r\n```typescript\r\nimport { deepOmit } from 'deep-pick-omit'\r\n\r\nconst obj = {\r\n  a: {\r\n    b: 'this',\r\n    c: 'not this'\r\n  },\r\n  d: 'this'\r\n}\r\n\r\ndeepOmit(obj, ['a.c'])\r\n// -> { a: { b: 'this' }, d: 'this' }\r\n\r\ndeepOmit(obj, ['f'])\r\n// -> TypeScript Error: `f` is not a key of `obj`\r\n```\r\n\r\n> [!NOTE]\r\n> Pathing through array values is not allowed typesafe path methods. See [unsafe methods](#unsafe-methods).\r\n\r\n## Unsafe methods\r\n\r\nIf paths type-safety is a problem for some edge cases, the package exposes the same methods without the type-checking on paths.\r\n\r\n### `deepPickUnsafe`\r\n\r\n```typescript\r\nimport { deepPickUnsafe } from 'deep-pick-omit'\r\n\r\nconst obj = {\r\n  a: {\r\n    c: 'not this'\r\n  },\r\n  d: 'this'\r\n}\r\n\r\ndeepPickUnsafe(obj, ['d', 'f'])\r\n// -> { d: 'this' }\r\n```\r\n\r\n### `deepOmitUnsafe`\r\n\r\n```typescript\r\nimport { deepOmitUnsafe } from 'deep-pick-omit'\r\n\r\nconst obj = {\r\n  a: {\r\n    b: 'this',\r\n    c: 'not this'\r\n  },\r\n  d: 'this'\r\n}\r\n\r\ndeepOmitUnsafe(obj, ['a.c', 'f'])\r\n// -> { a: { b: 'this' }, d: 'this' }\r\n```\r\n\r\n## License\r\n\r\n[MIT](./LICENSE) — Made with 💖.\r\n\r\n<!-- Badges -->\r\n\r\n[version-src]: https://img.shields.io/npm/v/deep-pick-omit?style=flat-square&labelColor=313244&color=f38ba8\r\n[version-href]: https://npmjs.com/package/deep-pick-omit\r\n[bundle-src]: https://img.shields.io/bundlephobia/minzip/deep-pick-omit?style=flat-square&labelColor=313244&color=f38ba8\r\n[bundle-href]: https://bundlephobia.com/result?p=deep-pick-omit\r\n[license-src]: https://img.shields.io/github/license/prazdevs/deep-pick-omit?style=flat-square&labelColor=313244&color=f38ba8\r\n[license-href]: https://github.com/prazdevs/deep-pick-omit/blob/main/LICENSE\r\n",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/prazdevs/deep-pick-omit.git"
  },
  "bugs": {
    "url": "https://github.com/prazdevs/deep-pick-omit/issues"
  },
  "license": "MIT",
  "versions": {
    "1.0.0": {
      "name": "deep-pick-omit",
      "version": "1.0.0",
      "author": {
        "name": "PraZ"
      },
      "license": "MIT",
      "_id": "deep-pick-omit@1.0.0",
      "maintainers": [
        {
          "name": "prazdevs",
          "email": "sachabouillez@gmail.com"
        }
      ],
      "homepage": "https://github.com/prazdevs/deep-pick-omit#readme",
      "bugs": {
        "url": "https://github.com/prazdevs/deep-pick-omit/issues"
      },
      "dist": {
        "shasum": "a78337d78e9763c27c503ada914740187470bd40",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/deep-pick-omit/-/deep-pick-omit-1.0.0.tgz",
        "fileCount": 8,
        "integrity": "sha512-M4lutCIYNFNxhArGgCgszERcSFOsV9fkNUkqUZYMyhYUAe2ibTm/JdlxpRQI7v5lg8SixhNNz1WdFPyIaCXC5A==",
        "signatures": [
          {
            "sig": "MEUCIQCu3j9vEg2x1QIeRO4l4BwM6eLfWT8wHU7lqkAU1ifwJQIgWVderXMZRuLjhOM62Grjr1RdbRgDbxJ/eNO4X+854HM=",
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
          }
        ],
        "unpackedSize": 5998
      },
      "main": "./dist/index.mjs",
      "type": "module",
      "types": "./dist/index.d.ts",
      "module": "./dist/index.mjs",
      "exports": {
        ".": {
          "types": {
            "import": "./dist/index.d.mts",
            "require": "./dist/index.d.cts"
          },
          "import": "./dist/index.mjs",
          "require": "./dist/index.cjs"
        }
      },
      "gitHead": "c35a0c43cf81f4c744b22bbe2677e947434b9e24",
      "scripts": {
        "lint": "eslint .",
        "test": "vitest",
        "build": "unbuild",
        "prepare": "simple-git-hooks",
        "release": "bumpp",
        "typecheck": "tsc --noEmit",
        "prepublishOnly": "pnpm build"
      },
      "_npmUser": {
        "name": "prazdevs",
        "email": "sachabouillez@gmail.com"
      },
      "repository": {
        "url": "git+https://github.com/prazdevs/deep-pick-omit.git",
        "type": "git"
      },
      "_npmVersion": "9.8.1",
      "description": "Deep-pick and deep-omit objects with typesafe paths.",
      "directories": {},
      "lint-staged": {
        "*": "eslint --fix"
      },
      "sideEffects": false,
      "_nodeVersion": "20.6.1",
      "dependencies": {
        "rambda": "8.6.0"
      },
      "_hasShrinkwrap": false,
      "packageManager": "pnpm@8.12.0",
      "devDependencies": {
        "vite": "^5.0.6",
        "bumpp": "^9.2.0",
        "eslint": "^8.55.0",
        "vitest": "^1.0.2",
        "unbuild": "^2.0.0",
        "typescript": "^5.3.3",
        "lint-staged": "^15.2.0",
        "simple-git-hooks": "^2.9.0",
        "@antfu/eslint-config": "^2.4.0"
      },
      "simple-git-hooks": {
        "pre-commit": "pnpm lint-staged"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/deep-pick-omit_1.0.0_1702239846999_0.21563174094123072",
        "host": "s3://npm-registry-packages"
      }
    },
    "1.1.0": {
      "name": "deep-pick-omit",
      "version": "1.1.0",
      "author": {
        "name": "PraZ"
      },
      "license": "MIT",
      "_id": "deep-pick-omit@1.1.0",
      "maintainers": [
        {
          "name": "prazdevs",
          "email": "sachabouillez@gmail.com"
        }
      ],
      "homepage": "https://github.com/prazdevs/deep-pick-omit#readme",
      "bugs": {
        "url": "https://github.com/prazdevs/deep-pick-omit/issues"
      },
      "dist": {
        "shasum": "ade80486a517f8aa812bf49ad616b38df0597f9d",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/deep-pick-omit/-/deep-pick-omit-1.1.0.tgz",
        "fileCount": 8,
        "integrity": "sha512-eKcVQlaA9zRl48lV5mNEeTqKqHq5GdMtsf8pnvUvCNqVbpbt86EDozLflFqxph/OAg3Ts97TvPtZKDvAoWUA7w==",
        "signatures": [
          {
            "sig": "MEQCIApIHV2fpTj6JzFvdWQwpzqQGz+LE+I5s+B4oSrA7xRWAiA+XKoUwdN1Vqa0rsdpMTXvLM/amahuCyuU5zW1YQszdw==",
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
          }
        ],
        "unpackedSize": 8973
      },
      "main": "./dist/index.mjs",
      "type": "module",
      "types": "./dist/index.d.ts",
      "module": "./dist/index.mjs",
      "exports": {
        ".": {
          "types": {
            "import": "./dist/index.d.mts",
            "require": "./dist/index.d.cts"
          },
          "import": "./dist/index.mjs",
          "require": "./dist/index.cjs"
        }
      },
      "gitHead": "eb3228d87d8dc2eecd7bfb9100354d314e64641d",
      "scripts": {
        "lint": "eslint .",
        "test": "vitest",
        "build": "unbuild",
        "prepare": "simple-git-hooks",
        "release": "bumpp",
        "typecheck": "tsc --noEmit",
        "prepublishOnly": "pnpm build"
      },
      "_npmUser": {
        "name": "prazdevs",
        "email": "sachabouillez@gmail.com"
      },
      "repository": {
        "url": "git+https://github.com/prazdevs/deep-pick-omit.git",
        "type": "git"
      },
      "_npmVersion": "9.8.1",
      "description": "Deep-pick and deep-omit objects with typesafe paths.",
      "directories": {},
      "lint-staged": {
        "*": "eslint --fix"
      },
      "sideEffects": false,
      "_nodeVersion": "20.6.1",
      "_hasShrinkwrap": false,
      "packageManager": "pnpm@8.12.0",
      "devDependencies": {
        "vite": "^5.0.6",
        "bumpp": "^9.2.0",
        "eslint": "^8.55.0",
        "vitest": "^1.0.2",
        "unbuild": "^2.0.0",
        "typescript": "^5.3.3",
        "lint-staged": "^15.2.0",
        "simple-git-hooks": "^2.9.0",
        "@antfu/eslint-config": "^2.4.0"
      },
      "simple-git-hooks": {
        "pre-commit": "pnpm lint-staged"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/deep-pick-omit_1.1.0_1702809548503_0.7807592793531857",
        "host": "s3://npm-registry-packages"
      }
    },
    "1.2.0": {
      "name": "deep-pick-omit",
      "version": "1.2.0",
      "author": {
        "name": "PraZ"
      },
      "license": "MIT",
      "_id": "deep-pick-omit@1.2.0",
      "maintainers": [
        {
          "name": "prazdevs",
          "email": "sachabouillez@gmail.com"
        }
      ],
      "homepage": "https://github.com/prazdevs/deep-pick-omit#readme",
      "bugs": {
        "url": "https://github.com/prazdevs/deep-pick-omit/issues"
      },
      "dist": {
        "shasum": "cd14edb242b1eceaeb23527a4eed8b650923c93d",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/deep-pick-omit/-/deep-pick-omit-1.2.0.tgz",
        "fileCount": 8,
        "integrity": "sha512-2CGvfTM2c+IP/MhdRZMpaHhTc6zIlgz3tQXJ/VGAkc7mjMrjqSU28qiI63yEcy+fcYfd/K+NNJcGRzap4M4bqw==",
        "signatures": [
          {
            "sig": "MEUCIC5/68hXyJ70SHVCzBkJ5Aj1LwOj1NZzuYE60sDHbJuuAiEA3cU88ua6eUwTJxdCaFixDAtKfBUBiGnSERjcVfNef00=",
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
          }
        ],
        "unpackedSize": 12028
      },
      "main": "./dist/index.mjs",
      "type": "module",
      "types": "./dist/index.d.ts",
      "module": "./dist/index.mjs",
      "exports": {
        ".": {
          "types": {
            "import": "./dist/index.d.mts",
            "require": "./dist/index.d.cts"
          },
          "import": "./dist/index.mjs",
          "require": "./dist/index.cjs"
        }
      },
      "gitHead": "f71e364a33fd2eb1ce8c0e71b2788f4abe8cee67",
      "scripts": {
        "lint": "eslint .",
        "test": "vitest --typecheck",
        "build": "unbuild",
        "prepare": "simple-git-hooks",
        "release": "bumpp",
        "test:ui": "vitest --typecheck --ui",
        "typecheck": "tsc --noEmit",
        "test:coverage": "vitest run --coverage",
        "prepublishOnly": "pnpm build"
      },
      "_npmUser": {
        "name": "prazdevs",
        "email": "sachabouillez@gmail.com"
      },
      "repository": {
        "url": "git+https://github.com/prazdevs/deep-pick-omit.git",
        "type": "git"
      },
      "_npmVersion": "10.5.0",
      "description": "Deep-pick and deep-omit objects with typesafe paths.",
      "directories": {},
      "lint-staged": {
        "*": "eslint --fix"
      },
      "sideEffects": false,
      "_nodeVersion": "20.12.0",
      "_hasShrinkwrap": false,
      "packageManager": "pnpm@8.13.1",
      "devDependencies": {
        "vite": "^5.0.10",
        "bumpp": "^9.2.1",
        "eslint": "^8.56.0",
        "vitest": "^1.1.0",
        "unbuild": "^2.0.0",
        "@vitest/ui": "^1.1.0",
        "typescript": "^5.3.3",
        "lint-staged": "^15.2.0",
        "simple-git-hooks": "^2.9.0",
        "@vitest/coverage-v8": "^1.1.0",
        "@antfu/eslint-config": "^2.6.1"
      },
      "simple-git-hooks": {
        "pre-commit": "pnpm lint-staged"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/deep-pick-omit_1.2.0_1724622339903_0.4625234520315167",
        "host": "s3://npm-registry-packages"
      }
    },
    "1.2.1": {
      "name": "deep-pick-omit",
      "type": "module",
      "version": "1.2.1",
      "packageManager": "pnpm@9.12.0",
      "description": "Deep-pick and deep-omit objects with typesafe paths.",
      "author": {
        "name": "PraZ"
      },
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/prazdevs/deep-pick-omit.git"
      },
      "sideEffects": false,
      "exports": {
        ".": {
          "types": {
            "import": "./dist/index.d.mts",
            "require": "./dist/index.d.cts"
          },
          "import": "./dist/index.mjs",
          "require": "./dist/index.cjs"
        }
      },
      "main": "./dist/index.mjs",
      "module": "./dist/index.mjs",
      "types": "./dist/index.d.ts",
      "scripts": {
        "build": "unbuild",
        "lint": "eslint .",
        "prepublishOnly": "pnpm build",
        "release": "bumpp",
        "test": "vitest --typecheck",
        "test:coverage": "vitest run --coverage",
        "test:ui": "vitest --typecheck --ui",
        "typecheck": "tsc --noEmit",
        "prepare": "simple-git-hooks"
      },
      "devDependencies": {
        "@antfu/eslint-config": "^3.7.3",
        "@vitest/coverage-v8": "^2.1.2",
        "@vitest/ui": "^2.1.2",
        "bumpp": "^9.6.1",
        "eslint": "^9.11.1",
        "lint-staged": "^15.2.10",
        "simple-git-hooks": "^2.11.1",
        "typescript": "^5.6.2",
        "unbuild": "^2.0.0",
        "vite": "^5.4.8",
        "vitest": "^2.1.2"
      },
      "simple-git-hooks": {
        "pre-commit": "pnpm lint-staged"
      },
      "lint-staged": {
        "*": "eslint --fix"
      },
      "_id": "deep-pick-omit@1.2.1",
      "gitHead": "b91b63d3ae7a24ed4388cd680bda47ec4fea7883",
      "bugs": {
        "url": "https://github.com/prazdevs/deep-pick-omit/issues"
      },
      "homepage": "https://github.com/prazdevs/deep-pick-omit#readme",
      "_nodeVersion": "20.12.0",
      "_npmVersion": "10.5.0",
      "dist": {
        "integrity": "sha512-2J6Kc/m3irCeqVG42T+SaUMesaK7oGWaedGnQQK/+O0gYc+2SP5bKh/KKTE7d7SJ+GCA9UUE1GRzh6oDe0EnGw==",
        "shasum": "c035b27a4c86518b76f60ffa3004e6c61f317032",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/deep-pick-omit/-/deep-pick-omit-1.2.1.tgz",
        "fileCount": 8,
        "unpackedSize": 12046,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIBUebhXN7+nLoLmb8DmE+9xVD+4GT8naKG9UYJZMCMApAiEA97Yq4bzmTsXzpkdU/ajFYs7pmj3fbC+oWo28LxdLVQk="
          }
        ]
      },
      "_npmUser": {
        "name": "prazdevs",
        "email": "sachabouillez@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "prazdevs",
          "email": "sachabouillez@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/deep-pick-omit_1.2.1_1728074226084_0.3400358945687738"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "deep-pick-omit",
  "time": {
    "created": "2023-12-10T20:24:06.998Z",
    "modified": "2026-05-26T11:05:59.148Z",
    "1.0.0": "2023-12-10T20:24:07.177Z",
    "1.1.0": "2023-12-17T10:39:08.680Z",
    "1.2.0": "2024-08-25T21:45:40.068Z",
    "1.2.1": "2024-10-04T20:37:06.307Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/prazdevs/deep-pick-omit#readme"
}