{"id":13605552,"url":"https://github.com/gofunky/trumpet","last_synced_at":"2026-01-21T21:43:32.507Z","repository":{"id":38305569,"uuid":"171134594","full_name":"gofunky/trumpet","owner":"gofunky","description":"parse and transform streaming html using css selectors","archived":false,"fork":false,"pushed_at":"2026-01-19T18:27:12.000Z","size":737,"stargazers_count":14,"open_issues_count":26,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-20T00:48:10.522Z","etag":null,"topics":["html-stream","js","library","modifier","node","parser","selector","stream"],"latest_commit_sha":null,"homepage":"https://trumpet.gofunky.fun","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gofunky.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-02-17T14:56:13.000Z","updated_at":"2025-11-12T05:50:08.000Z","dependencies_parsed_at":"2023-02-08T12:15:47.577Z","dependency_job_id":"28c92b40-b1da-45ee-83df-61ca37690ac5","html_url":"https://github.com/gofunky/trumpet","commit_stats":{"total_commits":579,"total_committers":24,"mean_commits":24.125,"dds":0.3592400690846287,"last_synced_commit":"6c5aa30522faf42c969a09f514480e7fe92da7bc"},"previous_names":["gofunky/node-trumpet2"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/gofunky/trumpet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gofunky%2Ftrumpet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gofunky%2Ftrumpet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gofunky%2Ftrumpet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gofunky%2Ftrumpet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gofunky","download_url":"https://codeload.github.com/gofunky/trumpet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gofunky%2Ftrumpet/sbom","scorecard":{"id":433799,"data":{"date":"2025-08-11","repo":{"name":"github.com/gofunky/trumpet","commit":"6c5aa30522faf42c969a09f514480e7fe92da7bc"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/18 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/gofunky/trumpet/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/gofunky/trumpet/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/gofunky/trumpet/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pages.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/gofunky/trumpet/pages.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pages.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/gofunky/trumpet/pages.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/gofunky/trumpet/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/gofunky/trumpet/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/gofunky/trumpet/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/gofunky/trumpet/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/gofunky/trumpet/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/gofunky/trumpet/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:100: update your workflow using https://app.stepsecurity.io/secureworkflow/gofunky/trumpet/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:102: update your workflow using https://app.stepsecurity.io/secureworkflow/gofunky/trumpet/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:108: update your workflow using https://app.stepsecurity.io/secureworkflow/gofunky/trumpet/publish.yml/master?enable=pin","Info:   0 out of  13 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/pages.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"26 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-w5p7-h5w8-2hfq","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T04:05:38.984Z","repository_id":38305569,"created_at":"2025-08-19T04:05:38.984Z","updated_at":"2025-08-19T04:05:38.984Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28644149,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T21:29:11.980Z","status":"ssl_error","status_checked_at":"2026-01-21T21:24:31.872Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["html-stream","js","library","modifier","node","parser","selector","stream"],"created_at":"2024-08-01T19:01:00.165Z","updated_at":"2026-01-21T21:43:32.490Z","avatar_url":"https://github.com/gofunky.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# trumpet\n\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/gofunky/trumpet/build/master?style=for-the-badge)](https://github.com/gofunky/trumpet/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/gofunky/trumpet?style=for-the-badge)](https://codecov.io/gh/gofunky/trumpet)\n[![Renovate Status](https://img.shields.io/badge/renovate-enabled-green?style=for-the-badge\u0026logo=renovatebot\u0026color=1a1f6c)](https://app.renovatebot.com/dashboard#github/gofunky/trumpet)\n[![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/npm/@gofunky%2Ftrumpet?style=for-the-badge)](https://libraries.io/npm/@gofunky%2Ftrumpet)\n[![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/@gofunky/trumpet?style=for-the-badge)](https://snyk.io/test/github/gofunky/trumpet)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-purple.svg?style=for-the-badge)](https://standardjs.com)\n[![CodeFactor](https://www.codefactor.io/repository/github/gofunky/trumpet/badge?style=for-the-badge)](https://www.codefactor.io/repository/github/gofunky/trumpet)\n[![node-current](https://img.shields.io/node/v/@gofunky/trumpet?style=for-the-badge)](https://www.npmjs.com/package/@gofunky/trumpet)\n[![NPM version](https://img.shields.io/npm/v/@gofunky/trumpet?style=for-the-badge)](https://www.npmjs.com/package/@gofunky/trumpet)\n[![NPM Downloads](https://img.shields.io/npm/dm/@gofunky/trumpet?style=for-the-badge\u0026color=ff69b4)](https://www.npmjs.com/package/@gofunky/trumpet)\n[![GitHub License](https://img.shields.io/github/license/gofunky/trumpet.svg?style=for-the-badge)](https://github.com/gofunky/trumpet/blob/master/LICENSE)\n[![GitHub last commit](https://img.shields.io/github/last-commit/gofunky/trumpet.svg?style=for-the-badge\u0026color=9cf)](https://github.com/gofunky/trumpet/commits/master)\n\nthe maintained version of [trumpet](https://github.com/substack/node-trumpet)\n\n## Examples\n\n### Replace inner\n\n#### Input HTML\n\n```html\n\u003ctable\u003e\n  \u003ctbody\u003eblah blah blah\u003c/tbody\u003e\n  \u003ctr\u003e\u003ctd\u003ethere\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003eit\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003eis\u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e\n```\n\n#### Code\n\n```js\nconst trumpet = require('@gofunky/trumpet')\nconst tr = trumpet()\ntr.pipe(process.stdout)\n \nconst ws = tr.select('tbody').createWriteStream()\nws.end('\u003ctr\u003e\u003ctd\u003erawr\u003c/td\u003e\u003c/tr\u003e')\n\nconst fs = require('fs')\nfs.createReadStream(__dirname + '/html/table.html').pipe(tr)\n```\n\n#### Output\n\n```html\n\u003ctable\u003e\n  \u003ctbody\u003e\u003ctr\u003e\u003ctd\u003erawr\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\n  \u003ctr\u003e\u003ctd\u003ethere\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003eit\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003eis\u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e\n```\n\n### Read all\n\n#### Input HTML\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003ebeep\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv class=\"a\"\u003e¡¡¡\u003c/div\u003e\n    \u003cdiv class=\"b\"\u003e\n      \u003cspan\u003etacos\u003c/span\u003e\n      \u003cspan\u003e y \u003c/span\u003e\n      \u003cspan\u003eburritos\u003c/span\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"a\"\u003e!!!\u003c/div\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n#### Code\n\n```js\nconst trumpet = require('@gofunky/trumpet')\nconst tr = trumpet()\n\ntr.selectAll('.b span', (span) =\u003e {\n  span.createReadStream().pipe(process.stdout)\n})\n\nconst fs = require('fs')\nfs.createReadStream(__dirname + '/html/read_all.html').pipe(tr)\n```\n\n#### Output\n\n```html\ntacos y burritos\n```\n\n### Read, modify, and write\n\n#### Input HTML\n\n```html\n\u003chtml\u003e\n  \u003cbody\u003e\n    \u003cdiv class=\"x\"\u003e\n      \u003cspan\u003ehack\u003c/span\u003e\n      \u003cspan\u003e the \u003c/span\u003e\n      \u003cspan\u003eplanet\u003c/span\u003e\n    \u003c/div\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n#### Code\n\n```js\nconst trumpet = require('@gofunky/trumpet')\nconst through = require('through2')\n\nconst tr = trumpet()\n\n//select all element and apply transformation function to selections\ntr.selectAll('.x span', (element) =\u003e {\n \n    //define function to transform input\n    const upper = through((buf) =\u003e {\n      this.queue(String(buf).toUpperCase())\n    })\n    \n    //create a read/write stream for selected selement\n    const stream = element.createStream()\n    \n    //stream the element's inner html to transformation function\n    //then stream the transformed output back into the element stream\n    stream.pipe(upper).pipe(stream)\n\n//stream in html to trumpet and stream processed output to stdout\nconst fs = require('fs')\nfs.createReadStream(__dirname + '/html/uppercase.html').pipe(tr).pipe(process.stdout)\n```\n\n#### Output\n\n```html\n\u003chtml\u003e\n  \u003cbody\u003e\n    \u003cdiv class=\"x\"\u003e\n      \u003cspan\u003eHACK\u003c/span\u003e\n      \u003cspan\u003e THE \u003c/span\u003e\n      \u003cspan\u003ePLANET\u003c/span\u003e\n    \u003c/div\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Methods\n\n```js\nconst trumpet = require('@gofunky/trumpet')\n```\n\n### `const tr = trumpet(opts)`\n\nCreate a new trumpet stream. This stream is readable and writable.\nPipe an html stream into `tr` and get back a transformed html stream.\n\nParse errors are emitted by `tr` in an `'error'` event.\n\n### `const elem = tr.select(selector)`\n\nReturn a result object `elem` for the first element matching `selector`.\n\n### `tr.selectAll(selector, (elem) =\u003e {})`\n\nGet a result object `elem` for every element matching `selector`.\n\n### `elem.getAttribute(name, cb)`\n\nWhen the selector for `elem` matches, query the case-insensitive attribute\ncalled `name` with `cb(value)`.\n\nReturns `elem`.\n\n### `elem.getAttributes(name, cb)`\n\nGet all the elements in `cb(attributes)` as an object `attributes` with\nlower-case keys.\n\nReturns `elem`.\n\n### `elem.setAttribute(name, value)`\n\nWhen the selector for `elem` matches, replace the case-insensitive attribute\ncalled `name` with `value`.\n\nIf the attribute doesn't exist, it will be created in the output stream.\n\nReturns `elem`.\n\n### `elem.removeAttribute(name)`\n\nWhen the selector for `elem` matches, remove the attribute called `name` if it\nexists.\n\nReturns `elem`.\n\n### `elem.createReadStream(opts)`\n\nCreate a new readable stream with the inner html content under `elem`.\n\nTo use the outer html content instead of the inner, set `opts.outer` to `true`.\n\n### `elem.createWriteStream(opts)`\n\nCreate a new write stream to replace the inner html content under `elem`.\n\nTo use the outer html content instead of the inner, set `opts.outer` to `true`.\n\n### `elem.createStream(opts)`\n\nCreate a new readable writable stream that outputs the content under `elem` and\nreplaces the content with the data written to it.\n\nTo use the outer html content instead of the inner, set `opts.outer` to `true`.\n\n### `tr.createStream(sel, opts)`\n\nShort-hand for `tr.select(sel).createStream(opts)`.\n\n### `tr.createReadStream(sel, opts)`\n\nShort-hand for `tr.select(sel).createReadStream(opts)`.\n\n### `tr.createWriteStream(sel, opts)`\n\nShort-hand for `tr.select(sel).createWriteStream(opts)`.\n\n## Attributes\n\n### `elem.name`\n\nThe element name as a lower-case string. For example: `'div'`.\n\n## Selector syntax\n\nCurrently, these [css selectors](http://www.w3.org/TR/CSS2/selector.html) work:\n\n-   `*`\n-   `E`\n-   `E F`\n-   `E \u003e F`\n-   `E + F`\n-   `E.class`\n-   `E#id`\n-   `E[attr=value]`\n-   `E[attr~=search]`\n-   `E[attr|=prefix]`\n-   `E[attr^=prefix]`\n-   `E[attr$=suffix]`\n-   `E[attr*=search]`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgofunky%2Ftrumpet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgofunky%2Ftrumpet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgofunky%2Ftrumpet/lists"}