{"id":16731533,"url":"https://github.com/skratchdot/domformat","last_synced_at":"2025-03-15T18:22:45.011Z","repository":{"id":1590644,"uuid":"2104548","full_name":"skratchdot/domFormat","owner":"skratchdot","description":"domFormat is a simple javascript library to get DOM nodes as formatted/pretty strings.","archived":false,"fork":false,"pushed_at":"2014-04-25T04:37:50.000Z","size":2116,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"gh-pages","last_synced_at":"2025-01-22T08:11:15.004Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://projects.skratchdot.com/domFormat/bookmarklet/","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/skratchdot.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2011-07-26T01:43:00.000Z","updated_at":"2014-04-25T04:38:37.000Z","dependencies_parsed_at":"2022-08-26T21:54:23.681Z","dependency_job_id":null,"html_url":"https://github.com/skratchdot/domFormat","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skratchdot%2FdomFormat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skratchdot%2FdomFormat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skratchdot%2FdomFormat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skratchdot%2FdomFormat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skratchdot","download_url":"https://codeload.github.com/skratchdot/domFormat/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243771127,"owners_count":20345406,"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-12T23:37:45.217Z","updated_at":"2025-03-15T18:22:44.982Z","avatar_url":"https://github.com/skratchdot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"domFormat\n===================\n\n\n### Description ###\n\ndomFormat is a simple javascript library to get DOM nodes as formatted/pretty\nstrings.  It provides a simple API with 2 functions:  \n\n```javascript\ndomFormat.init(settings);\ndomFormat.getString(node);\n```\n\nI created it as a way to help compare the generated source of 2 pages when\ndoing development.  Before creating this library, I had searched for another\nlibrary to do something similar, but everything I evaluated gave results\nthat were formatted slightly different than they way I wanted.  \n  \nThis code is designed to run in the browser, and uses the browser's native \nDOM parsing to create a \"prettified\" string.  \n\n\n### Links ###\n\n[Source Code / Download](https://github.com/skratchdot/domFormat/)  \n[Examples](http://projects.skratchdot.com/domFormat/examples/index-html5.html)  \n[Bookmarklet](http://projects.skratchdot.com/domFormat/bookmarklet/index.html)\n\n### Libraries Used / Included ###\n\n[CSS Beautify](https://github.com/senchalabs/cssbeautify)\n\n- Originally written by Ariya Hidayat\n\n- Copyright (C) 2011 Sencha Inc.  \n\n[JS Beautifier](https://github.com/einars/js-beautify)\n\n- Originally written by Einar Lielmanis\n\n\n### Browser Support ###\n\nMost modern browsers are supported with the caveat that IE support/output\nis somewhat strange.  \n  \nIE Quirks/Bugs:  \n\n* Tag names will be in all uppercase because IE doesn't support \n  node.prefix and node.localName when parsing DOM nodes\n\n* For the same reason above, namespaces will not be printed \n  correctly: \u0026lt;svg:svg /\u0026gt; will turn into \u0026lt;SVG /\u0026gt;\n\n* \u0026lt;style /\u0026gt; and \u0026lt;script /\u0026gt; tags lose their contents\n\n* Doctype nodes are treated as a comment (standards vs quirks mode)\n\n\n### Version History ###\n\n#### v1.4 - Released April 25, 2014\n\n* Changing links from skratchdot.github.io -\u003e projects.skratchdot.com\n\n#### v1.3 - Released October 5, 2013\n\n* Changing links from skratchdot.github.com -\u003e skratchdot.github.io\n\n#### v1.2 - Released November 17, 2012 ####\n\n* Updating [CSS Beautify](https://github.com/senchalabs/cssbeautify)\n\n* Updating [JS Beautifier](https://github.com/einars/js-beautify)\n\n* Updating [Bookmarklet](http://projects.skratchdot.com/domFormat/bookmarklet/index.html)\n\n#### v1.1 - Released November 6, 2012 ####\n\n* Fixing IE bug when rendering Node.DOCUMENT_TYPE_NODE\n\n* Reformatting source code.\n\n#### v1.0 - Released July 25, 2011 ####\n\n* Initial Release\n\n* Known Bugs:  \n\n  1. IE Quirks/Bugs listed in the Browser Support section above\n  2. Unsupported node types:  \n    *  Node.ENTITY_REFERENCE_NODE === 5\n    *  Node.ENTITY_NODE === 6\n    *  Node.PROCESSING_INSTRUCTION_NODE === 7\n    *  Node.NOTATION_NODE === 12\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskratchdot%2Fdomformat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskratchdot%2Fdomformat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskratchdot%2Fdomformat/lists"}