# majo

> A minimal module to manipulate files.

Latest version **0.10.1** (published 2020-05-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install majo
pnpm add majo
yarn add majo
bun add majo
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.10.1 |
| Published | 2020-05-15 |
| First published | 2017-02-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 15.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 53 |
| Author | egoist |
| Maintainers | egoist, rem |

## Links

- npm: https://www.npmjs.com/package/majo
- Repository: https://github.com/egoist/majo
- Homepage: https://github.com/egoist/majo#readme
- Issues: https://github.com/egoist/majo/issues
- npm.io page: https://npm.io/package/majo

## Dependencies (3)

- [mkdirp](https://npm.io/package/mkdirp.md) ^1.0.4
- [rimraf](https://npm.io/package/rimraf.md) ^3.0.2
- [fast-glob](https://npm.io/package/fast-glob.md) ^3.1.0

## Recent versions

- 0.10.1 (latest) — 2020-05-15
- 0.10.0 — 2020-05-15
- 0.9.1 — 2019-11-14
- 0.9.0 — 2019-11-14
- 1.0.0 — 2019-11-14
- 0.8.0 — 2019-06-10
- 0.7.1 — 2019-01-06
- 0.7.0 — 2019-01-06
- 0.6.3 — 2018-11-05
- 0.6.2 — 2018-04-22
- 0.6.1 — 2018-04-21
- 0.6.0 — 2018-04-21
- 0.5.1 — 2018-04-14
- 0.5.0 — 2018-04-13
- 0.4.1 — 2017-07-28
- … 9 more at https://npm.io/package/majo/versions

## README

# majo

<a href="https://www.pixiv.net/member_illust.php?mode=medium&illust_id=62542828">
<img src="https://ooo.0o0.ooo/2017/04/27/59016709425c9.jpg" width="300" />
</a>

_Art by [でんでん COMIC1・こ 24b](https://www.pixiv.net/member.php?id=12192)_

[![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&circle-token=560404744e167900959a512d617a05ec5240616f)](https://circleci.com/gh/egoist/majo/tree/master) [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat)](https://github.com/egoist/donate)

## Introduction

You can use _majo_ to manipulate files like a pro, with a simple API whose core is only ≈ 150 SLOC.

## Install

```bash
yarn add majo
```

## Usage

```js
const { majo } = require('majo')

const stream = majo()

// Given that you have js/app.js js/index.js
stream
  .source('js/**')
  .use(ignoreSomeFiles)
  .dest('dist')
  .then(() => {
    // Now you got filtered files
  })

function ignoreSomeFiles(stream) {
  for (const filename in stream.files) {
    const content = stream.fileContents(filename)
    // Remove it if content has specific string
    if (/some-string/.test(content)) {
      delete stream.files[filename]
    }
  }
}
```

## Documentation

https://majo.egoist.sh

## Used By

- [SAO](https://github.com/egoist/sao): ⚔️ Futuristic scaffolding tool.

## Contributing

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

## Author

**majo** © [egoist](https://github.com/egoist), Released under the [MIT](./LICENSE) License.<br>
Authored and maintained by egoist with help from contributors ([list](https://github.com/egoist/majo/contributors)).

> [egoist.moe](https://egoist.moe) · GitHub [@egoist](https://github.com/egoist) · Twitter [@\_egoistlily](https://twitter.com/_egoistlily)

---
_Source: https://npm.io/package/majo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
