{"id":24118425,"url":"https://github.com/fantasyui-com/graft-tree","last_synced_at":"2025-02-28T15:43:44.040Z","repository":{"id":57253027,"uuid":"139857792","full_name":"fantasyui-com/graft-tree","owner":"fantasyui-com","description":"Tree Data Structure with Multiple Branch Flavors","archived":false,"fork":false,"pushed_at":"2021-11-03T19:16:08.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-11T13:08:08.983Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fantasyui-com.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}},"created_at":"2018-07-05T14:02:09.000Z","updated_at":"2021-11-03T19:16:11.000Z","dependencies_parsed_at":"2022-08-31T22:11:28.238Z","dependency_job_id":null,"html_url":"https://github.com/fantasyui-com/graft-tree","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantasyui-com%2Fgraft-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantasyui-com%2Fgraft-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantasyui-com%2Fgraft-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantasyui-com%2Fgraft-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fantasyui-com","download_url":"https://codeload.github.com/fantasyui-com/graft-tree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241176614,"owners_count":19922732,"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":[],"created_at":"2025-01-11T08:19:33.223Z","updated_at":"2025-02-28T15:43:44.015Z","avatar_url":"https://github.com/fantasyui-com.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# graft-tree\nTree Data Structure with Multiple Branch Flavors\n\n```JavaScript\n\nconst Node = require('graft-tree');\n\nconst dungeon = new Node('Dungeon');\n\nconst lobby = dungeon.add('Lobby');\n\nlet roomNumber = 0;\n\nlet roomMaker = function(parent){\n  roomNumber = roomNumber +1;\n  const room = parent.add('Room #'+roomNumber);\n  room.on('object', (thing)=\u003e{\n    if(thing == 'Bob'){\n      if(Math.random() \u003e .5){\n      const newRoom = roomMaker(room);\n      console.log(room.location().join('/'), 'Bob made a new room ('+room.name +'-\u003e'+newRoom.name+')');\n      }else{\n        console.log(room.location().join('/'), 'Bob finished building');\n      }\n    }\n  });\n  return room;\n}\n\nroomMaker(lobby.add('Room #'+roomNumber)); // Create the first room\ndungeon.pipe('Bob');\ndungeon.pipe('Bob');\ndungeon.pipe('Bob');\ndungeon.pipe('Bob');\n\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffantasyui-com%2Fgraft-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffantasyui-com%2Fgraft-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffantasyui-com%2Fgraft-tree/lists"}