{"id":15654544,"url":"https://github.com/jonschlinkert/glob-object","last_synced_at":"2025-05-01T02:50:44.602Z","repository":{"id":65990690,"uuid":"41362267","full_name":"jonschlinkert/glob-object","owner":"jonschlinkert","description":"Filter an object using glob patterns and dot notation.","archived":false,"fork":false,"pushed_at":"2020-03-19T08:25:58.000Z","size":15,"stargazers_count":26,"open_issues_count":5,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-26T05:34:10.455Z","etag":null,"topics":["dot-notation","glob","nested","object","property","value","wildcard"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonschlinkert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2015-08-25T12:34:03.000Z","updated_at":"2023-08-24T15:38:51.000Z","dependencies_parsed_at":"2023-02-28T11:15:38.417Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/glob-object","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"b08289a53a4b03431121935bdea8cf920167af9c"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fglob-object","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fglob-object/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fglob-object/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fglob-object/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/glob-object/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251815442,"owners_count":21648367,"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":["dot-notation","glob","nested","object","property","value","wildcard"],"created_at":"2024-10-03T12:52:22.690Z","updated_at":"2025-05-01T02:50:44.567Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","readme":"# glob-object [![NPM version](https://img.shields.io/npm/v/glob-object.svg?style=flat)](https://www.npmjs.com/package/glob-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/glob-object.svg?style=flat)](https://npmjs.org/package/glob-object) [![NPM total downloads](https://img.shields.io/npm/dt/glob-object.svg?style=flat)](https://npmjs.org/package/glob-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/glob-object.svg?style=flat\u0026label=Travis)](https://travis-ci.org/jonschlinkert/glob-object)\n\n\u003e Filter an object using glob patterns and dot notation.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save glob-object\n```\n\n## Usage\n\n```js\nvar globObject = require('glob-object');\n\nglobObject('a.*.f', {a: {b: {c: 'd'}, e: {f: 'g'}}});\n//=\u003e { a: { e: { f: 'g' } } }\n```\n\n## Examples\n\nGiven the following object:\n\n```js\nvar obj = {\n  a: {\n    b: {\n      c: 'd',\n      e: 'f',\n      g: 'h',\n      i: {j: 'k'},\n      l: {g: 'k'}\n    },\n    i: 'j'\n  }\n};\n```\n\n## match properties using wildcards\n\n```js\nglobObject('*', obj);\n//=\u003e obj (matches all keys)\n```\n\n## match properties using braces\n\n```js\nglobObject('a.*.{c,e}', obj);\n//=\u003e {a: {b: {c: 'd', e: 'f'}}}\n```\n\n## match a nested property using a wildcard\n\nA single star will match one level of the object:\n\n```js\nglobObject('a.*.g', obj);\n//=\u003e {a: {b: {g: 'h'}}}\n```\n\n## match deep properties using globstars\n\nA double star will match to any depth (note that the single star in the previous example did not match `a.b.l.g`):\n\n```js\nglobObject('a.**.g', obj);\n//=\u003e {a: {b: {g: 'h', l: {g: 'k'}}}}\n```\n\n## About\n\n### Related projects\n\n* [expand-object](https://www.npmjs.com/package/expand-object): Expand a string into a JavaScript object using a simple notation. Use the CLI or… [more](https://github.com/jonschlinkert/expand-object) | [homepage](https://github.com/jonschlinkert/expand-object \"Expand a string into a JavaScript object using a simple notation. Use the CLI or as a node.js lib.\")\n* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value \"Use property paths (`a.b.c`) to get a nested value from an object.\")\n* [has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://github.com/jonschlinkert/has-value) | [homepage](https://github.com/jonschlinkert/has-value \"Returns true if a value exists, false if empty. Works with deeply nested values using object paths.\")\n* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value \"Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.\")\n* [stringify-keys](https://www.npmjs.com/package/stringify-keys): Build an array of key paths from an object. | [homepage](https://github.com/doowb/stringify-keys \"Build an array of key paths from an object.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Building docs\n\n_(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.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n### Running tests\n\nRunning 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:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 19, 2017._","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fglob-object","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Fglob-object","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fglob-object/lists"}