# npm-relative-version

> get relative version of the modules from npm.

Latest version **1.0.2** (published 2016-01-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install npm-relative-version
pnpm add npm-relative-version
yarn add npm-relative-version
bun add npm-relative-version
```

## 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.2 |
| Published | 2016-01-25 |
| First published | 2015-09-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | azu |
| Maintainers | azu |
| Keywords | npm |

## Links

- npm: https://www.npmjs.com/package/npm-relative-version
- Repository: https://github.com/azu/npm-relative-version
- Issues: https://github.com/azu/npm-relative-version/issues
- npm.io page: https://npm.io/package/npm-relative-version

## Dependencies (2)

- [npm](https://npm.io/package/npm.md) ^3.5.3
- [semver](https://npm.io/package/semver.md) ^5.0.1

## Recent versions

- 1.0.2 (latest) — 2016-01-25
- 1.0.1 — 2015-09-09

## README

# npm-relative-version

Get relative version of the modules from npm.

## Installation

    npm install npm-relative-version

## Usage

### getRelativeVersion(pkg, options = { isLtr=true, type="patch" }) : Promise<string>

Get a relative version string of `pkg`.

```js
var getRelativeVersion = require("npm-relative-version").getRelativeVersion;
// pkg.version is 1.0.1
var pkg = require("./package.json");
getRelativeVersion(pkg).then(version => {
    // get -"patch" version
    console.log(version);// 1.0.0
});
```

### getVersionsAsync(pkg): string[]

Get versions array of `pkg`

## Tests

    npm test

## 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

## License

MIT

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