{"id":13749466,"url":"https://github.com/yuchi/ti-htmlparser2","last_synced_at":"2025-04-22T23:32:55.744Z","repository":{"id":22687281,"uuid":"26031032","full_name":"yuchi/ti-htmlparser2","owner":"yuchi","description":"Forgiving HTML/XML parser for Titanium SDK","archived":false,"fork":false,"pushed_at":"2014-10-31T20:08:00.000Z","size":101,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-02T05:12:55.313Z","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":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuchi.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":"2014-10-31T19:52:40.000Z","updated_at":"2015-10-06T09:32:46.000Z","dependencies_parsed_at":"2022-08-31T20:11:13.524Z","dependency_job_id":null,"html_url":"https://github.com/yuchi/ti-htmlparser2","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuchi%2Fti-htmlparser2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuchi%2Fti-htmlparser2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuchi%2Fti-htmlparser2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuchi%2Fti-htmlparser2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuchi","download_url":"https://codeload.github.com/yuchi/ti-htmlparser2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250340579,"owners_count":21414587,"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-08-03T07:01:02.562Z","updated_at":"2025-04-22T23:32:55.504Z","avatar_url":"https://github.com/yuchi.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"ti-htmlparser2\n==============\n\n[![Dependencies](https://david-dm.org/yuchi/ti-htmlparser2/status.svg?style=flat-square)](https://david-dm.org/yuchi/ti-htmlparser2#info=dependencies)\n[![Dev Dependencies](https://david-dm.org/yuchi/ti-htmlparser2/dev-status.svg?style=flat-square)](https://david-dm.org/yuchi/ti-htmlparser2#info=devDependencies)\n\nForgiving HTML/XML parser for Titanium SDK\n\nThis is a [titaniumified][ti] version of [htmlparser2][hp2]. This is built using [`grunt-titaniumifier`][gti].\n\n[ti]: https://github.com/smclab/titaniumifier\n[gti]: https://github.com/smclab/grunt-titaniumifier\n\n\n### Installation\n\nA packaged *CommonJS* module can be found in the [Releases page][rls].\n\n[rls]: https://github.com/yuchi/ti-htmlparser2/releases\n\n\nUsage overview\n--------------\n\nFor the full documentation head over the [original repository][hp2].\n\n```js\nvar htmlparser = require(\"htmlparser2\");\nvar parser = new htmlparser.Parser({\n    onopentag: function(name, attribs){\n        if(name === \"script\" \u0026\u0026 attribs.type === \"text/javascript\"){\n            console.log(\"JS! Hooray!\");\n        }\n    },\n    ontext: function(text){\n        console.log(\"--\u003e\", text);\n    },\n    onclosetag: function(tagname){\n        if(tagname === \"script\"){\n            console.log(\"That's it?!\");\n        }\n    }\n});\nparser.write(\"Xyz \u003cscript type='text/javascript'\u003evar foo = '\u003c\u003cbar\u003e\u003e';\u003c/ script\u003e\");\nparser.end();\n```\n\nOutputs:\n\n```\n--\u003e Xyz\nJS! Hooray!\n--\u003e var foo = '\u003c\u003cbar\u003e\u003e';\nThat's it?!\n```\n\nCredits\n-------\n\nKudos to [@fb55][fb55] for building [htmlparser2][hp2] in the first place.\n\n[fb55]: https://github.com/fb55\n[hp2]: https://github.com/fb55/htmlparser2\n\nHumbly made by the spry ladies and gents at SMC.\n\n\nLicense\n-------\n\nThis library, *ti-htmlparser2*, is free software (\"Licensed Software\"); you can\nredistribute it and/or modify it under the terms of the [GNU Lesser General\nPublic License](http://www.gnu.org/licenses/lgpl-2.1.html) as published by the\nFree Software Foundation; either version 2.1 of the License, or (at your\noption) any later version.\n\nThis library is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; including but not limited to, the implied warranty of MERCHANTABILITY,\nNONINFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General\nPublic License for more details.\n\nYou should have received a copy of the [GNU Lesser General Public\nLicense](http://www.gnu.org/licenses/lgpl-2.1.html) along with this library; if\nnot, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth\nFloor, Boston, MA 02110-1301 USA\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuchi%2Fti-htmlparser2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuchi%2Fti-htmlparser2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuchi%2Fti-htmlparser2/lists"}