# shameimaru

> Shameimaru Aya likes to traverse node_modules and capture the tree

Latest version **1.0.6** (published 2019-12-30) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2019-12-30 |
| First published | 2018-06-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 8.0.0 |
| Dependencies | 4 |
| Unpacked size | 14 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 26 |
| Author | XadillaX |
| Maintainers | xadillax |
| Keywords | dependency tree, shameimaru |

## Links

- npm: https://www.npmjs.com/package/shameimaru
- Repository: https://github.com/node-modules/shameimaru
- Issues: https://github.com/node-modules/shameimaru
- npm.io page: https://npm.io/package/shameimaru

## Dependencies (4)

- [mz](https://npm.io/package/mz.md) ^2.7.0
- [uuid](https://npm.io/package/uuid.md) ^3.2.1
- [algorithmjs](https://npm.io/package/algorithmjs.md) ^1.0.0
- [npm-package-arg](https://npm.io/package/npm-package-arg.md) ^6.1.0

## Recent versions

- 1.0.6 (latest) — 2019-12-30
- 1.0.5 — 2019-12-30
- 1.0.4 — 2019-12-30
- 1.0.3 — 2019-12-30
- 1.0.2 — 2019-01-21
- 1.0.1 — 2018-06-19
- 1.0.0 — 2018-06-15

## README

# Shameimaru.js

[![Shameimaru](http://img.shields.io/npm/v/shameimaru.svg)](https://www.npmjs.org/package/shameimaru)
[![Shameimaru](http://img.shields.io/npm/dm/shameimaru.svg)](https://www.npmjs.org/package/shameimaru)
[![Build Status](https://travis-ci.org/node-modules/shameimaru.svg?branch=master)](https://travis-ci.org/node-modules/shameimaru)
[![Coverage Status](https://img.shields.io/coveralls/node-modules/shameimaru/master.svg)](https://coveralls.io/r/node-modules/shameimaru?branch=master)
[![License](https://img.shields.io/npm/l/shameimaru.svg?style=flat)](https://www.npmjs.org/package/shameimaru)
[![Dependency Status](https://david-dm.org/node-modules/shameimaru.svg)](https://david-dm.org/node-modules/shameimaru)

Shameimaru Aya likes to traverse node_modules and capture the tree.

![Shameimaru](shameimaru.jpg)

## Installation

```shell
$ npm install --save shameimaru
```

## Usage

```js
const Shameimaru = require("shameimaru");

const shameimaru = new Shameimaru("<YOUR_PROJ_ROOT>");
```

> `<YOUR_PROJ_ROOT>` is the root path which contains **node_modules** of your project.

After create the `Shameimaru` instance, you can do `traverse()` through it.

```js
const ret = await shameimaru.traverse();
```

Then you'll get a may-flatten graph-form tree. e.g.

```json
{
  "@crand/mt19937": {
    "ref": "5c2f5c96-9c29-4f3f-8cc1-ec6ab1f4025b",
    "name": "@crand/mt19937",
    "version": "2.0.0",
    "from": "@crand/mt19937@2.0.0",
    "resolved": "http://registry.npm.taobao.org/@crand/mt19937/download/@crand/mt19937-2.0.0.tgz",
    "exists": true,
    "rawSpec": "*"
  },
  "any-promise": {
    "ref": "78325895-5945-4180-97dd-a01c705b254e",
    "name": "any-promise",
    "version": "0.2.0",
    "from": "any-promise@0.2.0",
    "resolved": "http://registry.npm.taobao.org/any-promise/download/any-promise-0.2.0.tgz",
    "exists": true,
    "rawSpec": "0.2.0"
  },
  "mz": {
    "ref": "63bb611b-232d-4f7a-ba53-3322670ed170",
    "name": "mz",
    "version": "2.7.0",
    "from": "mz@2.7.0",
    "resolved": "http://registry.npm.taobao.org/mz/download/mz-2.7.0.tgz",
    "exists": true,
    "rawSpec": "^2.7.0",
    "dependencies": {
      "any-promise": {
        "ref": "41f0b04f-0904-432f-aa33-13e5cbb8fcdc",
        "name": "any-promise",
        "version": "1.3.0",
        "from": "any-promise@1.3.0",
        "resolved": "http://registry.npm.taobao.org/any-promise/download/any-promise-1.3.0.tgz",
        "exists": true,
        "rawSpec": "^1.0.0"
      }
    },
    ...
  },
  ...
}
```

Each element in the result may contains keys as below:

+ `ref`: a random referrence sign in this tree, it's unique; e.g. `63bb611b-232d-4f7a-ba53-3322670ed170`
+ `name`: the name of this package (dependency); e.g. `toshihiko`
+ `version`: the name of this package (dependency); e.g. `2.7.0`
+ `from`: same as `_from` in installed **package.json**; e.g. `mz@^2.0.0`
+ `resolved`: same as `_resolved` in installed **package.json**; `http://registry.npm.taobao.org/mz/download/mz-2.7.0.tgz`
+ `exists`: whether it's really exist in current tree folder; e.g. `true`
+ `ancestor`: if it matches a exactly the same package at any upper directory, it indicates that element's `ref`; e.g. `63bb611b-232d-4f7a-ba53-3322670ed170`
+ `rawSpec`: the raw spec of this package in its parent's **package.json**; e.g. `^2.0.0`
+ `adjustHere`: this package is not need by its parent, but some package need it flatten here; e.g. `true`
+ `missing`: if we can't find this package at any right path, then it will be `true`; e.g. `true`

## Contribute

You're welcome to fork and make pull requests!

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