{"id":21405357,"url":"https://github.com/karimsa/ned","last_synced_at":"2025-03-16T16:51:04.136Z","repository":{"id":143809139,"uuid":"80763451","full_name":"karimsa/ned","owner":"karimsa","description":"Transform text with javascript.","archived":false,"fork":false,"pushed_at":"2017-02-03T20:40:00.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T21:04:00.612Z","etag":null,"topics":["editor","filter","map","ned","reduce","sed","sort","stream"],"latest_commit_sha":null,"homepage":null,"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/karimsa.png","metadata":{"files":{"readme":"README.hb","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2017-02-02T20:01:27.000Z","updated_at":"2017-02-27T18:56:56.000Z","dependencies_parsed_at":"2023-07-23T02:51:29.329Z","dependency_job_id":null,"html_url":"https://github.com/karimsa/ned","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karimsa%2Fned","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karimsa%2Fned/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karimsa%2Fned/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karimsa%2Fned/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karimsa","download_url":"https://codeload.github.com/karimsa/ned/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243902293,"owners_count":20366259,"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":["editor","filter","map","ned","reduce","sed","sort","stream"],"created_at":"2024-11-22T16:24:45.455Z","updated_at":"2025-03-16T16:51:04.115Z","avatar_url":"https://github.com/karimsa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ned - node editor\n\nuse javascript to manipulate stdin.\n\n*Because sed is great but sometimes you just want some js*.\n\n[![NPM](https://nodei.co/npm/nedjs.png?downloads=true\u0026stars=true)](https://nodei.co/npm/nedjs/)\n\n## Usage\n\nTo install, run `npm i -g nedjs`.\n\n```\n{{usage}}\n```\n\n## Examples\n\n### Say hi to everyone\n\n```\n$ cat test.txt\nBob\nJoe\nAnne\nWorld\n$ cat test.txt | ned 'name =\u003e \"Hello, \" + name'\nHello, Bob\nHello, Joe\nHello, Anne\nHello, World\n```\n\n### Replace a delimeter in stdin\n\n```\n$ echo '1,2,3' | ned -d , -j '\\n' 'a=\u003ea'\n1\n2\n3\n```\n\n### Get sum of numbers\n\n```\n$ echo '1,2,3' | ned -d , -r 0 '(a,b)=\u003ea+b'\n6\n```\n\n### Remove non-numbers\n\n```\n$ echo '1,2,3,a,b,c' | ned -fnd , -j ',' 'a=\u003ea'\n1,2,3\n```\n\n### Find the number of lines in a file\n\n```\n$ cat -n myfile.txt | ned -tr 0 '(a,b)=\u003eMath.max(a,b.split(/\\s/)[0])'\n166\n```\n\n**OR**:\n\n```\n$ cat -n myfile.txt | ned -tfn 'a=\u003ea' -j '\\n' | ned -r 0 '(a,b)=\u003eMath.max(a,b)'\n166\n```\n\n## License\n\nLicensed under [MIT license](LICENSE).\n\nCopyright \u0026copy; 2017 Karim Alibhai.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarimsa%2Fned","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarimsa%2Fned","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarimsa%2Fned/lists"}