{"id":13455198,"url":"https://github.com/ehmicky/wild-wild-path","last_synced_at":"2025-05-14T16:02:30.044Z","repository":{"id":40602311,"uuid":"473356570","full_name":"ehmicky/wild-wild-path","owner":"ehmicky","description":"🤠 Object property paths with wildcards and regexps 🌵","archived":false,"fork":false,"pushed_at":"2025-03-29T02:55:43.000Z","size":5444,"stargazers_count":725,"open_issues_count":0,"forks_count":15,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-12T01:53:33.040Z","etag":null,"topics":["algorithm","data-structures","filter","functional-programming","glob","globbing","globstar","javascript","json","library","map","nodejs","parsing","path","recursion","regex","regexp","regular-expression","typescript","wildcard"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ehmicky.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-23T20:58:57.000Z","updated_at":"2025-03-29T02:55:46.000Z","dependencies_parsed_at":"2023-02-19T11:31:39.541Z","dependency_job_id":"7c61cd04-87eb-4c61-9959-56ea5407efe6","html_url":"https://github.com/ehmicky/wild-wild-path","commit_stats":{"total_commits":602,"total_committers":3,"mean_commits":"200.66666666666666","dds":0.01661129568106312,"last_synced_commit":"e170b9472306ca9a0044521891f123f356075b4b"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehmicky%2Fwild-wild-path","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehmicky%2Fwild-wild-path/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehmicky%2Fwild-wild-path/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehmicky%2Fwild-wild-path/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ehmicky","download_url":"https://codeload.github.com/ehmicky/wild-wild-path/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248505873,"owners_count":21115354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","data-structures","filter","functional-programming","glob","globbing","globstar","javascript","json","library","map","nodejs","parsing","path","recursion","regex","regexp","regular-expression","typescript","wildcard"],"created_at":"2024-07-31T08:01:02.349Z","updated_at":"2025-04-12T01:53:51.780Z","avatar_url":"https://github.com/ehmicky.png","language":"JavaScript","readme":"\u003cimg alt=\"wild-wild-path logo\" src=\"https://raw.githubusercontent.com/ehmicky/design/main/wild-wild-path/wild-wild-path.svg?sanitize=true\" width=\"700\"/\u003e\n\n[![Node](https://img.shields.io/badge/-Node.js-808080?logo=node.js\u0026colorA=404040\u0026logoColor=66cc33)](https://www.npmjs.com/package/wild-wild-path)\n[![Browsers](https://img.shields.io/badge/-Browsers-808080?logo=firefox\u0026colorA=404040)](https://unpkg.com/wild-wild-path?module)\n[![TypeScript](https://img.shields.io/badge/-Typed-808080?logo=typescript\u0026colorA=404040\u0026logoColor=0096ff)](/src/main.d.ts)\n[![Codecov](https://img.shields.io/badge/-Tested%20100%25-808080?logo=codecov\u0026colorA=404040)](https://codecov.io/gh/ehmicky/wild-wild-path)\n[![Minified size](https://img.shields.io/bundlephobia/minzip/wild-wild-path?label\u0026colorA=404040\u0026colorB=808080\u0026logo=webpack)](https://bundlephobia.com/package/wild-wild-path)\n[![Mastodon](https://img.shields.io/badge/-Mastodon-808080.svg?logo=mastodon\u0026colorA=404040\u0026logoColor=9590F9)](https://fosstodon.org/@ehmicky)\n[![Medium](https://img.shields.io/badge/-Medium-808080.svg?logo=medium\u0026colorA=404040)](https://medium.com/@ehmicky)\n\n🤠 Object property paths with wildcards and regexps. 🌵\n\nGet/set object properties using:\n\n- ⛏️ [Dot-delimited paths](#%EF%B8%8F-deep-properties): `foo.bar.0.baz`\n- ⭐ [Wildcards](#-wildcards): `foo.*`, `**.bar`\n- 🗺️ [Regexps](#%EF%B8%8F-regexps): `foo./ba?/`\n- 🏜️ [Slices](#%EF%B8%8F-array-slices): `foo.0:2`\n- 🚂 [Unions](#-unions): `foo bar baz`\n\n# Install\n\n```bash\nnpm install wild-wild-path\n```\n\nThis package works in both Node.js \u003e=18.18.0 and\n[browsers](https://raw.githubusercontent.com/ehmicky/dev-tasks/main/src/browserslist).\n\nThis is an ES module. It must be loaded using\n[an `import` or `import()` statement](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c),\nnot `require()`. If TypeScript is used, it must be configured to\n[output ES modules](https://www.typescriptlang.org/docs/handbook/esm-node.html),\nnot CommonJS.\n\n# API\n\n## Methods\n\n### get(target, query, options?)\n\n`target`: [`Target`](#target)\\\n`query`: [`Query`](#queries)\\\n`options`: [`Options?`](#options)\\\n_Return value_: `any | undefined`\n\nReturn the first property matching the `query`.\n\n```js\nconst target = { settings: { colors: ['red', 'blue'] } }\n\nget(target, 'settings.colors.0') // 'red'\nget(target, ['settings', 'colors', 0]) // 'red'\n```\n\n### has(target, query, options?)\n\n`target`: [`Target`](#target)\\\n`query`: [`Query`](#queries)\\\n`options`: [`Options?`](#options)\\\n_Return value_: `boolean`\n\nReturn whether the `query` matches any property.\n\n```js\nconst target = { settings: { lastName: undefined, colors: ['red', 'blue'] } }\n\nhas(target, 'settings.firstName') // false\nhas(target, ['settings', 'firstName']) // false\nhas(target, 'settings.lastName') // true\n```\n\n### list(target, query, options?)\n\n`target`: [`Target`](#target)\\\n`query`: [`Query`](#queries)\\\n`options`: [`Options?`](#options)\\\n_Return value_: `any[]`\n\nReturn all properties matching the `query`, as an array.\n\n\u003c!-- eslint-disable require-unicode-regexp --\u003e\n\n```js\nconst target = {\n  userOne: { firstName: 'John', lastName: 'Doe', age: 72 },\n  userTwo: { firstName: 'Alice', colors: ['red', 'blue', 'yellow'] },\n}\n\nlist(target, 'userOne.firstName userTwo.colors.0') // ['John', 'red']\nlist(target, [\n  ['userOne', 'firstName'],\n  ['userTwo', 'colors', 0],\n]) // ['John', 'red']\n\nlist(target, 'userOne./Name/') // ['John', 'Doe']\nlist(target, ['userOne', /Name/]) // ['John', 'Doe']\n\nlist(target, 'userTwo.colors.*') // ['red', 'blue', 'yellow']\nlist(target, 'userTwo.colors.0:2') // ['red', 'blue']\nlist(target, '**.firstName') // ['John', 'Alice']\nlist(target, 'userOne.*', { entries: true })\n// [\n//   { value: 'John', path: ['userOne', 'firstName'], missing: false },\n//   { value: 'Doe', path: ['userOne', 'lastName'], missing: false },\n//   { value: 72, path: ['userOne', 'age'], missing: false },\n// ]\n```\n\n### iterate(target, query, options?)\n\n`target`: [`Target`](#target)\\\n`query`: [`Query`](#queries)\\\n`options`: [`Options?`](#options)\\\n_Return value_:\n[`Iterable\u003cany\u003e`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#examples_using_the_iteration_protocols)\n\nReturn all properties matching the `query`, as an\n[iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#examples_using_the_iteration_protocols).\nThis is slower than [`list()`](#listtarget-query-options) but uses less memory.\n\n\u003c!-- eslint-disable fp/no-loops --\u003e\n\n```js\nconst target = { settings: { colors: ['red', 'blue'] } }\n\nfor (const color of iterate(target, 'settings.colors.*')) {\n  console.log(color) // 'red', 'blue'\n}\n```\n\n### set(target, query, value, options?)\n\n`target`: [`Target`](#target)\\\n`query`: [`Query`](#queries)\\\n`value`: `any`\\\n`options`: [`Options?`](#options)\\\n_Return value_: `Target`\n\nSets all properties matching the `query`. The return value is a deep clone\nunless the [`mutate`](#mutate) option is `true`.\n\n```js\nconst target = { colors: ['red', 'blue'] }\n\nset(target, 'colors.0', 'yellow') // ['yellow', 'blue']\nset(target, ['colors', 0], 'yellow') // ['yellow', 'blue']\nset(target, 'colors.-1', 'yellow') // ['red', 'yellow']\nset(target, 'colors.-0', 'yellow') // ['red', 'blue', 'yellow']\nset(target, 'colors.*', 'yellow') // ['yellow', 'yellow']\nset({}, 'user.0.color', 'red') // { user: [{ color: 'red' }] }\nset({}, 'user.0.color', 'red', { missing: false }) // {}\n```\n\n### remove(target, query, options?)\n\n`target`: [`Target`](#target)\\\n`query`: [`Query`](#queries)\\\n`options`: [`Options?`](#options)\\\n_Return value_: `Target`\n\nDelete all properties matching the `query`. The return value is a deep clone\nunless the [`mutate`](#mutate) option is `true`.\n\n\u003c!-- eslint-disable require-unicode-regexp --\u003e\n\n```js\nconst target = { user: { firstName: 'John', lastName: 'Doe', age: 72 } }\n\nremove(target, 'user.lastName') // { user: { firstName: 'John', age: 72 } }\nremove(target, 'user./Name/') // { user: { age: 72 } }\nremove(target, ['user', /Name/]) // { user: { age: 72 } }\n```\n\n## Functional utilities\n\n[`wild-wild-utils`](https://github.com/ehmicky/wild-wild-utils) is a separate\nlibrary which provides with additional, higher-level methods:\n[`map()`](https://github.com/ehmicky/wild-wild-utils#maptarget-query-mapfunction-options),\n[`merge()`](https://github.com/ehmicky/wild-wild-utils#mergetarget-query-value-options),\n[`push()`](https://github.com/ehmicky/wild-wild-utils#pushtarget-query-values-options),\n[`unshift()`](https://github.com/ehmicky/wild-wild-utils#unshifttarget-query-values-options),\n[`find()`](https://github.com/ehmicky/wild-wild-utils#findtarget-query-testfunction-options),\n[`pick()`](https://github.com/ehmicky/wild-wild-utils#picktarget-query-options),\n[`include()`](https://github.com/ehmicky/wild-wild-utils#includetarget-query-testfunction-options),\n[`exclude()`](https://github.com/ehmicky/wild-wild-utils#excludetarget-query-testfunction-options),\n[`flatten()`](https://github.com/ehmicky/wild-wild-utils#flattentarget-options).\n\n## Target\n\nThe target value must be an object or an array.\n\n## Queries\n\nThere are two equivalent formats for queries: strings and arrays.\n\n- Query [strings](#query-strings) are friendlier to CLI usage, more expressive,\n  and easier to serialize.\n- Query [arrays](#query-arrays) are friendlier to programmatic usage, and\n  faster. Also, they do not require escaping, so they should be used when the\n  input is dynamic or user-provided to prevent injection attacks.\n\n### Query strings\n\n#### ⛏️ Deep properties\n\n```bash\n# Deep properties of objects or arrays.\n# Dots are used for array indices, not brackets.\n# Symbol properties are always ignored.\nuser.colors.0\n```\n\n#### 🚂 Unions\n\n```bash\n# Unions (\"or\") of queries are space-delimited.\n# The string must not be empty.\ncolors name age\n```\n\n#### ⭐ Wildcards\n\n```bash\n# Shallow wildcards target all properties/items of a single object/array\nuser.*\n\n# Deep wildcards target all properties/items of 0, 1 or many objects/arrays\nuser.**\n**.colors\n```\n\n#### 🗺️ Regexps\n\n```bash\n# Regexps match property names\nuser./name/\n\n# Flags can be used, e.g. to make it case-insensitive\nuser./name/i\n\n# ^ $ must be used to match from the beginning or until the end\nuser./^name$/i\n```\n\n#### 🌵 Arrays indices\n\n```bash\n# Array indices are integers\nuser.colors.0\n\n# Array indices can be negative.\n# -1 is the last item.\n# -0 is the item after it, which can be used to append.\nuser.colors.-1\n```\n\n#### 🏜️ Array slices\n\n```bash\n# Array slices. Goes from the start (included) to the end index (excluded).\nuser.colors.0:2\n\n# The start index defaults to 0, i.e. the beginning\nuser.colors.:2\n\n# The end index defaults to -0, i.e. the end\nuser.colors.0:\nuser.colors.:\n```\n\n#### 🪨 Escaping\n\n```bash\n# Dots, spaces and backslashes in property names must be escaped\nname\\\\ with\\\\ spaces\nname\\\\.with\\\\.dots\nname\\\\\\\\with\\\\\\\\backslashes\n\n# Ambiguous property names must be escaped with a backslash at the beginning.\n# This includes properties that:\n#  - Are integers but are not array elements\n#  - Have multiple slashes and start with one\nname.\\\\0\nname.\\\\/not_a_regexp/\n```\n\n#### 🏨 Root and empty strings\n\n```bash\n# A leading dot can optionally be used. It is ignored.\nuser.colors\n.user.colors\n\n# Root value\n.\n\n# Empty string properties\nuser..colors\n```\n\n### Query arrays\n\n#### ⛏️ Deep properties\n\n\u003c!-- prettier-ignore --\u003e\n```es6\n// Deep properties of objects or arrays.\n// Symbol properties are always ignored.\n['user', 'colors', 0]\n```\n\n#### 🚂 Unions\n\n\u003c!-- prettier-ignore --\u003e\n```es6\n// Unions (\"or\") of queries are arrays of arrays.\n// There must be at least one item.\n[['colors'], ['name'], ['age']]\n```\n\n#### ⭐ Wildcards\n\n\u003c!-- prettier-ignore --\u003e\n```es6\n// Shallow wildcards target all properties/items of a single object/array\n['user', { type: 'any' }]\n\n// Deep wildcards target all properties/items of 0, 1 or many objects/arrays\n['user', { type: 'anyDeep' }]\n[{ type: 'anyDeep' }, 'colors']\n```\n\n#### 🤠 Regexps\n\n\u003c!-- prettier-ignore --\u003e\n```es6\n// Regexps match property names\n['user', /name/]\n\n// Flags can be used, e.g. to make it case-insensitive\n['user', /name/i]\n\n// ^ $ must be used to match from the beginning or until the end\n['user', /^name$/i]\n```\n\n#### 🌵 Arrays indices\n\n\u003c!-- prettier-ignore --\u003e\n```es6\n// Array indices are integers, not strings\n['user', 'colors', 0]\n\n// Array indices can be negative.\n// -1 is the last item.\n// -0 is the item after it, which can be used to append.\n['user', 'colors', -1]\n```\n\n#### 🏜️ Array slices\n\n\u003c!-- prettier-ignore --\u003e\n```es6\n// Array slices. Goes from the start (included) to the end index (excluded).\n['user', 'colors', { type: 'slice', from: 0, to: 2 }]\n\n// The start index defaults to 0, i.e. the beginning\n['user', 'colors', { type: 'slice', to: 2 }]\n\n// The end index defaults to -0, i.e. the end\n['user', 'colors', { type: 'slice', from: 0 }]\n['user', 'colors', { type: 'slice' }]\n```\n\n#### 🪨 Escaping\n\n\u003c!-- prettier-ignore --\u003e\n```es6\n// Escaping is not necessary with query arrays\n['name with spaces']\n['name.with.dots']\n['name\\\\with\\\\backslashes']\n['name', '0']\n['name', '/not_a_regexp/']\n```\n\n#### 🏨 Root and empty strings\n\n\u003c!-- prettier-ignore --\u003e\n```es6\n// Root value\n[]\n\n// Empty string properties\n['user', '', 'colors']\n```\n\n### Paths\n\nA \"path\" is any [query](#queries) using only\n[property names](#%EF%B8%8F-deep-properties) and positive\n[array indices](#-arrays-indices). This excludes\n[negative indices](#-arrays-indices), [slices](#%EF%B8%8F-array-slices),\n[wildcards](#-wildcards), [regexps](#%EF%B8%8F-regexps) and [unions](#-unions).\n\nPaths are returned by the [`entries`](#entries) option.\n\n```bash\n# Path string\nuser.colors.0\n```\n\n\u003c!-- prettier-ignore --\u003e\n```es6\n// Path array\n['user', 'colors', 0]\n```\n\n### Conversions and comparisons\n\n[`wild-wild-parser`](https://github.com/ehmicky/wild-wild-parser) can be used to\nconvert between both formats, or to compare queries.\n\n### Undefined values\n\nObject properties with a defined key but an `undefined` value are not ignored.\nHowever, object properties without any defined key are ignored. The\n[`has()`](#hastarget-query-options) method, [`missing`](#missing) option and\n[`entries`](#entries) option can be used to distinguish those.\n\n```js\nconst target = { name: undefined }\n\nhas(target, 'name') // true\nhas(target, 'colors') // false\n\nget(target, 'name') // undefined\nget(target, 'colors') // undefined\nget(target, 'name', { entries: true, missing: true })\n// { value: undefined, path: ['name'], missing: false }\nget(target, 'colors', { entries: true, missing: true })\n// { value: undefined, path: ['colors'], missing: true }\n\nlist(target, '*') // [undefined]\nlist(target, '*', { entries: true })\n// [{ value: undefined, path: ['name'], missing: false }]\n```\n\n## Options\n\nOptions are optional plain objects.\n\n### mutate\n\n_Methods_: [`set()`](#settarget-query-value-options),\n[`remove()`](#removetarget-query-options)\\\n_Type_: `boolean`\\\n_Default_: `false`\n\nBy default, the [target](#target) is deeply cloned.\\\nWhen `true`, it is directly mutated instead, which is faster but has side\neffects.\n\n```js\nconst target = {}\nconsole.log(set(target, 'name', 'Alice')) // { name: 'Alice' }\nconsole.log(target) // {}\nconsole.log(set(target, 'name', 'Alice', { mutate: true })) // { name: 'Alice' }\nconsole.log(target) // { name: 'Alice' }\n```\n\n### entries\n\n_Methods_: [`get()`](#gettarget-query-options),\n[`list()`](#listtarget-query-options),\n[`iterate()`](#iteratetarget-query-options)\\\n_Type_: `boolean`\\\n_Default_: `false`\n\nBy default, properties' values are returned.\\\nWhen `true`, objects with the following shape are returned instead:\n\n- `value` `any`: property's value\n- `path` [`Path`](#paths): property's full path\n- `missing` `boolean`: whether the property is [missing](#missing) from the\n  [target](#target)\n\n```js\nconst target = { firstName: 'Alice', lastName: 'Smith' }\nlist(target, '*') // ['Alice', 'Smith']\nlist(target, '*', { entries: true })\n// [\n//   { value: 'Alice', path: ['firstName'], missing: false },\n//   { value: 'Smith', path: ['lastName'], missing: false },\n// ]\n```\n\n### missing\n\n_Methods_: all except [`has()`](#hastarget-query-options) and\n[`remove()`](#removetarget-query-options)\\\n_Type_: `boolean`\\\n_Default_: `false` with `list|iterate()`, `true` with `set()`\n\nWhen `false`, properties [not defined in the target](#undefined-values) are\nignored.\n\n```js\nconst target = {}\n\nset(target, 'name', 'Alice') // { name: 'Alice' }\nset(target, 'name', 'Alice', { missing: false }) // {}\n\nlist(target, 'name') // []\nlist(target, 'name', { missing: true, entries: true })\n// [{ value: undefined, path: ['name'], missing: true }]\n```\n\n### sort\n\n_Methods_: [`get()`](#gettarget-query-options),\n[`list()`](#listtarget-query-options),\n[`iterate()`](#iteratetarget-query-options)\\\n_Type_: `boolean`\\\n_Default_: `false`\n\nWhen returning sibling object properties, sort them by the lexigographic order\nof their names (not values).\n\n```js\nconst target = { lastName: 'Doe', firstName: 'John' }\nlist(target, '*') // ['Doe', 'John']\nlist(target, '*', { sort: true }) // ['John', 'Doe']\n```\n\n### childFirst\n\n_Methods_: [`get()`](#gettarget-query-options),\n[`list()`](#listtarget-query-options),\n[`iterate()`](#iteratetarget-query-options)\\\n_Type_: `boolean`\\\n_Default_: `false`\n\nWhen using [unions](#-unions) or [deep wildcards](#-wildcards), a query might\nmatch both a property and some of its children.\n\nThis option decides whether the returned properties should be sorted from\nchildren to parents, or the reverse.\n\n```js\nconst target = { user: { name: 'Alice' } }\nlist(target, 'user.**') // [{ name: 'Alice' }, 'Alice']\nlist(target, 'user.**', { childFirst: true }) // ['Alice', { name: 'Alice' }]\n```\n\n### leaves\n\n_Methods_: all except [`has()`](#hastarget-query-options)\\\n_Type_: `boolean`\\\n_Default_: `false`\n\nWhen using [unions](#-unions) or [deep wildcards](#-wildcards), a query might\nmatch both a property and some of its children.\n\nWhen `true`, only leaves are matched. In other words, a matching property is\nignored if one of its children also matches.\n\n```js\nconst target = { user: { name: 'Alice' } }\nlist(target, 'user.**') // [{ name: 'Alice' }, 'Alice']\nlist(target, 'user.**', { leaves: true }) // ['Alice']\n```\n\n### roots\n\n_Methods_: [`get()`](#gettarget-query-options),\n[`list()`](#listtarget-query-options),\n[`iterate()`](#iteratetarget-query-options)\\\n_Type_: `boolean`\\\n_Default_: `false`\n\nWhen using [unions](#-unions) or [deep wildcards](#-wildcards), a query might\nmatch both a property and some of its children.\n\nWhen `true`, only roots are matched. In other words, a matching property is\nignored if one of its parents also matches.\n\n```js\nconst target = { user: { name: 'Alice' } }\nlist(target, 'user.**') // [{ name: 'Alice' }, 'Alice']\nlist(target, 'user.**', { roots: true }) // [{ name: 'Alice' }]\n```\n\n### shallowArrays\n\n_Methods_: all\\\n_Type_: `boolean`\\\n_Default_: `false`\n\nIf `true`, [wildcards](#-wildcards) do not recurse on arrays. Array items can\nstill be matched by using [indices](#-arrays-indices) or\n[slices](#%EF%B8%8F-array-slices).\n\n```js\nconst target = [{ name: 'Alice' }, { name: 'Bob' }]\nlist(target, '**')\n// [\n//   [{ name: 'Alice' }, { name: 'Bob' }],\n//   { name: 'Alice' },\n//   'Alice',\n//   { name: 'Bob' },\n//   'Bob',\n// ]\nlist(target, '**', { shallowArrays: true })\n// [\n//   [{ name: 'Alice' }, { name: 'Bob' }],\n// ]\n```\n\n### classes\n\n_Methods_: all\\\n_Type_: `boolean`\\\n_Default_: `false`\n\nUnless `true`, [wildcards](#-wildcards) and [regexps](#%EF%B8%8F-regexps) ignore\nproperties of objects that are not plain objects (like class instances, errors\nor functions). Those can still be matched by using their\n[property name](#%EF%B8%8F-deep-properties).\n\n```js\nconst target = { user: new User({ name: 'Alice' }) }\nlist(target, 'user.*') // []\nlist(target, 'user.*', { classes: true }) // ['Alice']\n```\n\n### inherited\n\n_Methods_: all\\\n_Type_: `boolean`\\\n_Default_: `false`\n\nBy default, [wildcards](#-wildcards) and [regexps](#%EF%B8%8F-regexps) ignore\nproperties that are either\n[inherited](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain)\nor\n[not enumerable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties).\nThose can still be matched by using their\n[property name](#%EF%B8%8F-deep-properties).\n\nWhen `true`, inherited properties are not ignored, but not enumerable ones still\nare.\n\n# Related projects\n\n- [`wild-wild-utils`](https://github.com/ehmicky/wild-wild-utils): functional\n  utilities using `wild-wild-path`'s object property paths\n- [`wild-wild-parser`](https://github.com/ehmicky/wild-wild-parser): parser for\n  `wild-wild-path`'s object property paths\n\n# Support\n\nFor any question, _don't hesitate_ to [submit an issue on GitHub](../../issues).\n\nEveryone is welcome regardless of personal background. We enforce a\n[Code of conduct](CODE_OF_CONDUCT.md) in order to promote a positive and\ninclusive environment.\n\n# Contributing\n\nThis project was made with ❤️. The simplest way to give back is by starring and\nsharing it online.\n\nIf the documentation is unclear or has a typo, please click on the page's `Edit`\nbutton (pencil icon) and suggest a correction.\n\nIf you would like to help us fix a bug or add a new feature, please check our\n[guidelines](CONTRIBUTING.md). Pull requests are welcome!\n\n\u003c!-- Thanks go to our wonderful contributors: --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://fosstodon.org/@ehmicky\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/8136211?v=4?s=100\" width=\"100px;\" alt=\"ehmicky\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eehmicky\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/ehmicky/wild-wild-path/commits?author=ehmicky\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#design-ehmicky\" title=\"Design\"\u003e🎨\u003c/a\u003e \u003ca href=\"#ideas-ehmicky\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/ehmicky/wild-wild-path/commits?author=ehmicky\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://sylvainsimao.fr\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/4679377?v=4?s=100\" width=\"100px;\" alt=\"Sylvain\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSylvain\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-maoosi\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n","funding_links":[],"categories":["Packages","JavaScript","Functional Programming","包"],"sub_categories":["Miscellaneous","Runner","杂项"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehmicky%2Fwild-wild-path","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fehmicky%2Fwild-wild-path","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehmicky%2Fwild-wild-path/lists"}