{"id":20393508,"url":"https://github.com/chantouchsek/object-traversed","last_synced_at":"2025-08-03T03:36:11.679Z","repository":{"id":48623497,"uuid":"326937067","full_name":"chantouchsek/object-traversed","owner":"chantouchsek","description":"Parse , check and traverse javascript objects via string path","archived":false,"fork":false,"pushed_at":"2024-06-16T17:01:43.000Z","size":58,"stargazers_count":3,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T06:43:30.734Z","etag":null,"topics":["graph","npm","object-traverse","object-traversed","traverse","traversed"],"latest_commit_sha":null,"homepage":"","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/chantouchsek.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":"2021-01-05T08:38:07.000Z","updated_at":"2021-08-23T07:02:59.000Z","dependencies_parsed_at":"2024-10-22T21:03:48.228Z","dependency_job_id":null,"html_url":"https://github.com/chantouchsek/object-traversed","commit_stats":{"total_commits":10,"total_committers":3,"mean_commits":"3.3333333333333335","dds":"0.19999999999999996","last_synced_commit":"7c467ebc40a0febb93ed10f869311dcf5c394182"},"previous_names":["chantouch/object-traversed"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chantouchsek%2Fobject-traversed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chantouchsek%2Fobject-traversed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chantouchsek%2Fobject-traversed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chantouchsek%2Fobject-traversed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chantouchsek","download_url":"https://codeload.github.com/chantouchsek/object-traversed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248446650,"owners_count":21105130,"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":["graph","npm","object-traverse","object-traversed","traverse","traversed"],"created_at":"2024-11-15T03:49:08.736Z","updated_at":"2025-04-12T12:05:49.751Z","avatar_url":"https://github.com/chantouchsek.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#Object Traversed\n==============\n[![Build Status](https://travis-ci.org/chantouch/object-traversed.svg?branch=main)](https://travis-ci.org/chantouch/object-traversed)\n[![view on npm](http://img.shields.io/npm/v/object-traversed.svg)](https://www.npmjs.org/package/object-traversed)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)\n[![npm](https://img.shields.io/npm/dt/object-traversed.svg?style=flat-square)](https://npmjs.com/package/object-traversed)\n[![npm](https://img.shields.io/npm/dm/object-traversed.svg?style=flat-square)](https://npmjs.com/package/object-traversed)\n\nA very simple, lightweight utility on traversing object graphs using a string.\n\n## How to use\n\n```npm\nnpm install --save object-traversed\n```\n\n```yarn\nyarn add  object-traversed\n```\n\nIf using via normal javascript include, then it is exported as window.objectTraverse.\n\n## API\n\n```javascript\nvar traversed = require('object-traversed');\n\nvar graph = {  \n   field : {\n      deep : {\n         x : 1,\n         y: 2\n      }\n   },\n   field2: [],\n   deepFunc : { someFunc: function(arg) {} }\n   \n};\n//get a value\ntraversed(graph).get('field.deep');\n//get with a default\ntraversed(graph).get('field.deep','default return val if not found'); \n\n//check if something is defined\ntraversed(graph).has('field.deep.missing');\n\n//sets a value\ntraversed(graph).set('field.deep.z',5);\n   \n//helpers\ntraversed(graph).isArray('field2');\ntraversed(graph).isString('field2');\ntraversed(graph).isObject('field2');\ntraversed(graph).isNumber('field2');\n          \n//exec\ntraversed(graph).exec('deepFunc.someFunc','arg');         \n\n//delete\ntraversed(graph).delete('field.deep.x');\n\n//push - add vall to the array, will create if it doesn't exists\ntraversed(graph).push('a.b.c',val);\n\n//create create the given path if it doesn't exists, will skip none object types\ntraversed(graph).create('a.b.c');\ntraversed(graph).get('a.b.c'); //{ a : { b : { c: {} } }\n```\n\n## 🔑 License\n\nMIT © [ChantouchSek](https://github.com/chantouch)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchantouchsek%2Fobject-traversed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchantouchsek%2Fobject-traversed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchantouchsek%2Fobject-traversed/lists"}