{"id":22201847,"url":"https://github.com/jimmycuadra/shellwords","last_synced_at":"2025-04-07T06:13:34.758Z","repository":{"id":1841015,"uuid":"2765485","full_name":"jimmycuadra/shellwords","owner":"jimmycuadra","description":"Manipulate strings according to the word parsing rules of the UNIX Bourne shell.","archived":false,"fork":false,"pushed_at":"2022-10-17T07:33:13.000Z","size":83,"stargazers_count":38,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-31T05:06:19.427Z","etag":null,"topics":["commonjs","commonjs-module","commonjs-modules","esm","esmodule","esmodules","javascript","nodejs","shell","shellwords","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/shellwords","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"SirVer/ultisnips","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jimmycuadra.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":"2011-11-13T07:33:06.000Z","updated_at":"2024-03-31T02:38:43.000Z","dependencies_parsed_at":"2022-09-06T22:21:27.906Z","dependency_job_id":null,"html_url":"https://github.com/jimmycuadra/shellwords","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmycuadra%2Fshellwords","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmycuadra%2Fshellwords/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmycuadra%2Fshellwords/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmycuadra%2Fshellwords/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jimmycuadra","download_url":"https://codeload.github.com/jimmycuadra/shellwords/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601449,"owners_count":20964864,"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":["commonjs","commonjs-module","commonjs-modules","esm","esmodule","esmodules","javascript","nodejs","shell","shellwords","typescript"],"created_at":"2024-12-02T16:11:09.485Z","updated_at":"2025-04-07T06:13:34.736Z","avatar_url":"https://github.com/jimmycuadra.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shellwords\n\nShellwords provides functions to manipulate strings according to the word parsing rules of the UNIX Bourne shell. It is based on [the Ruby module of the same name](https://docs.ruby-lang.org/en/3.1/Shellwords.html).\n\n## Installation\n\nWith npm:\n\n```\nnpm install shellwords\n```\n\nWith pnpm:\n\n```\npnpm add shellwords\n```\n\nWith Yarn:\n\n```\nyarn add shellwords\n```\n\n## API\n\nShellwords exports the following functions, shown here in the TypeScript declaration file format.\n\n``` typescript\n/**\n * Splits a string into an array of tokens in the same way the UNIX Bourne shell does.\n *\n * @param line A string to split.\n * @returns An array of the split tokens.\n */\nexport declare const split: (line?: string) =\u003e string[];\n\n/**\n * Escapes a string so that it can be safely used in a Bourne shell command line.\n *\n * @param str A string to escape.\n * @returns The escaped string.\n */\nexport declare const escape: (str?: string) =\u003e string;\n```\n\n## Example\n\n``` typescript\nimport { escape, split } from \"shellwords\";\n\nsplit(\"foo 'bar baz'\");\n// [\"foo\", \"bar baz\"]\n\nescape(\"What's up, yo?\");\n// 'What\\\\\\'s\\\\ up,\\\\ yo\\\\?'\n```\n\n## Legal\n\nshellwords is released under the MIT license. See `LICENSE`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimmycuadra%2Fshellwords","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimmycuadra%2Fshellwords","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimmycuadra%2Fshellwords/lists"}