{"id":18096351,"url":"https://github.com/bredele/domstack","last_synced_at":"2025-07-02T13:06:37.091Z","repository":{"id":11194473,"uuid":"13575896","full_name":"bredele/domstack","owner":"bredele","description":"Stack your dom nodes into a fragment","archived":false,"fork":false,"pushed_at":"2014-08-23T23:13:56.000Z","size":216,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-10T22:10:31.396Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bredele.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-14T23:23:10.000Z","updated_at":"2014-07-20T23:08:56.000Z","dependencies_parsed_at":"2022-08-31T07:11:06.874Z","dependency_job_id":null,"html_url":"https://github.com/bredele/domstack","commit_stats":null,"previous_names":["bredele/stack"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bredele/domstack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bredele%2Fdomstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bredele%2Fdomstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bredele%2Fdomstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bredele%2Fdomstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bredele","download_url":"https://codeload.github.com/bredele/domstack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bredele%2Fdomstack/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263145841,"owners_count":23420678,"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":"2024-10-31T19:13:56.708Z","updated_at":"2025-07-02T13:06:37.061Z","avatar_url":"https://github.com/bredele.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# domstack\n\n  Stack your dom nodes outside of the main DOM tree.\n\n## Installation\n\nwith [component](http://component.io):\n\n    $ component install bredele/domstack\n\nwith [nodejs](http://nodejs.org):\n\n    $ npm install domstack\n\n## API\n\n### Stack(parent)\n\n  Create a stack from a `root` dom element.\n\n```js\nvar Stack = require('domstack');\nvar stack = new Stack(document.body);\n```\n\n### add(name, dom)\n\n  Add a node element into the stack.\n\n```js\nstack.add('first', node);\n```\n\n  A stacked node is appended to a document fragment. Since a fragment is in memory and not part of the main DOM tree, computing one of its children does not cause reflow of repaint and results in better performance.\n\n### show(name)\n\n  Display a stacked node into the `root` dom element.\n\n```js\nstack.show('first');\n```\n\n  Only one stack child can be displayed at a time. However, you can asynchronously hide the current stack child as following:\n\n\n```js\nstack.show('first');\nstack.show('second', function(done) {\n\t// hide first\n\tsetTimeout(done, 3000);\n});\n\n```\n\n\n## License\n\n  MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbredele%2Fdomstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbredele%2Fdomstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbredele%2Fdomstack/lists"}