{"id":25376795,"url":"https://github.com/terrierscript/migawari","last_synced_at":"2025-04-09T10:33:42.645Z","repository":{"id":15182212,"uuid":"17910117","full_name":"terrierscript/migawari","owner":"terrierscript","description":"Create html from css query selector.","archived":false,"fork":false,"pushed_at":"2015-07-20T00:29:55.000Z","size":1721,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-20T14:35:02.280Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://suisho.github.io/migawari/","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/terrierscript.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":"2014-03-19T15:44:56.000Z","updated_at":"2021-06-29T06:40:22.000Z","dependencies_parsed_at":"2022-08-25T08:50:23.533Z","dependency_job_id":null,"html_url":"https://github.com/terrierscript/migawari","commit_stats":null,"previous_names":["suisho/migawari"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrierscript%2Fmigawari","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrierscript%2Fmigawari/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrierscript%2Fmigawari/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrierscript%2Fmigawari/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terrierscript","download_url":"https://codeload.github.com/terrierscript/migawari/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248020591,"owners_count":21034459,"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-02-15T04:39:32.084Z","updated_at":"2025-04-09T10:33:42.628Z","avatar_url":"https://github.com/terrierscript.png","language":"JavaScript","readme":"# Migawari ![travis](https://travis-ci.org/suisho/migawari.svg)\n\n\u003e Create html from css query selector.\n\n## Sample Usage\n\n```js\nvar migawari = require(\"migawari\")\nmigawari('a');\t//\u003ca\u003e\u003c/a\u003e\nmigawari('.c');\t//\u003cdiv class=\"c\"\u003e\u003c/div\u003e\nmigawari('#d');\t//\u003cdiv id=\"d\"\u003e\u003c/div\u003e\nmigawari('a[title=\"foo\"]');\t//\u003ca title=\"foo\"\u003e\u003c/a\u003e\nmigawari('a \u003e b');\t//\u003ca\u003e\u003cb\u003e\u003c/b\u003e\u003c/a\u003e\nmigawari('a , b');\t//\u003ca\u003e\u003c/a\u003e\u003cb\u003e\u003c/b\u003e\nmigawari('a + b');\t//\u003ca\u003e\u003c/a\u003e\u003cb\u003e\u003c/b\u003e\nmigawari('a \u003e b + .c');\t//\u003ca\u003e\u003cb\u003e\u003c/b\u003e\u003cdiv class=\"c\"\u003e\u003c/div\u003e\u003c/a\u003e\n\n// descendant and sibilings insert dummy\nmigawari('a ~ b');\t//\u003ca\u003e\u003c/a\u003e\u003cdiv\u003e\u003c/div\u003e\u003cb\u003e\u003c/b\u003e\nmigawari('a b');\t//\u003ca\u003e\u003cdiv\u003e\u003cb\u003e\u003c/b\u003e\u003c/div\u003e\u003c/a\u003e\n\n\n```\n# API\n\n## toString()\n\nOutput html.\n\n## dom\n\nReturn Dom object for [htmlparser2](https://github.com/fb55/htmlparser2)\nIf you want customize output. You can use this.\n\n# Options\n\n## option.dummy (default=div)\nChange dummy tag name.\n\nsample:\n\n```js\nmigawari(\"a b ~ p\",{dummy:\"span\"}).toString()\n// =\u003e \u003ca\u003e\u003cspan\u003e\u003cb\u003e\u003c/b\u003e\u003cspan\u003e\u003c/span\u003e\u003cp\u003e\u003c/p\u003e\u003c/span\u003e\u003c/a\u003e\n\nmigawari(\".c\", {dummy: \"span\"}).toString()\n// =\u003e '\u003cspan class=\"c\"\u003e\u003c/span\u003e'\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrierscript%2Fmigawari","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterrierscript%2Fmigawari","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrierscript%2Fmigawari/lists"}