{"id":13485169,"url":"https://github.com/egoist/majo","last_synced_at":"2025-04-24T04:14:09.328Z","repository":{"id":44978521,"uuid":"89489924","full_name":"egoist/majo","owner":"egoist","description":"A minimal module to manipulate files.","archived":false,"fork":false,"pushed_at":"2023-01-04T21:47:56.000Z","size":1902,"stargazers_count":53,"open_issues_count":26,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-24T04:13:48.850Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://majo.egoist.sh","language":"TypeScript","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/egoist.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":"2017-04-26T14:22:56.000Z","updated_at":"2025-02-11T15:49:19.000Z","dependencies_parsed_at":"2023-02-02T21:01:09.014Z","dependency_job_id":null,"html_url":"https://github.com/egoist/majo","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoist%2Fmajo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoist%2Fmajo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoist%2Fmajo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoist%2Fmajo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egoist","download_url":"https://codeload.github.com/egoist/majo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250560053,"owners_count":21450173,"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-07-31T17:01:48.778Z","updated_at":"2025-04-24T04:14:09.302Z","avatar_url":"https://github.com/egoist.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# majo\n\n\u003ca href=\"https://www.pixiv.net/member_illust.php?mode=medium\u0026illust_id=62542828\"\u003e\n\u003cimg src=\"https://ooo.0o0.ooo/2017/04/27/59016709425c9.jpg\" width=\"300\" /\u003e\n\u003c/a\u003e\n\n_Art by [でんでん COMIC1・こ 24b](https://www.pixiv.net/member.php?id=12192)_\n\n[![NPM version](https://img.shields.io/npm/v/majo.svg?style=flat)](https://npmjs.com/package/majo) [![NPM downloads](https://img.shields.io/npm/dm/majo.svg?style=flat)](https://npmjs.com/package/majo) [![CircleCI](https://circleci.com/gh/egoist/majo/tree/master.svg?style=shield\u0026circle-token=560404744e167900959a512d617a05ec5240616f)](https://circleci.com/gh/egoist/majo/tree/master) [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000\u0026style=flat)](https://github.com/egoist/donate)\n\n## Introduction\n\nYou can use _majo_ to manipulate files like a pro, with a simple API whose core is only ≈ 150 SLOC.\n\n## Install\n\n```bash\nyarn add majo\n```\n\n## Usage\n\n```js\nconst { majo } = require('majo')\n\nconst stream = majo()\n\n// Given that you have js/app.js js/index.js\nstream\n  .source('js/**')\n  .use(ignoreSomeFiles)\n  .dest('dist')\n  .then(() =\u003e {\n    // Now you got filtered files\n  })\n\nfunction ignoreSomeFiles(stream) {\n  for (const filename in stream.files) {\n    const content = stream.fileContents(filename)\n    // Remove it if content has specific string\n    if (/some-string/.test(content)) {\n      delete stream.files[filename]\n    }\n  }\n}\n```\n\n## Documentation\n\nhttps://majo.egoist.sh\n\n## Used By\n\n- [SAO](https://github.com/egoist/sao): ⚔️ Futuristic scaffolding tool.\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n## Author\n\n**majo** © [egoist](https://github.com/egoist), Released under the [MIT](./LICENSE) License.\u003cbr\u003e\nAuthored and maintained by egoist with help from contributors ([list](https://github.com/egoist/majo/contributors)).\n\n\u003e [egoist.moe](https://egoist.moe) · GitHub [@egoist](https://github.com/egoist) · Twitter [@\\_egoistlily](https://twitter.com/_egoistlily)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegoist%2Fmajo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegoist%2Fmajo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegoist%2Fmajo/lists"}