Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gswalden/listver
List installed versions of package dependencies
https://github.com/gswalden/listver
Last synced: about 1 month ago
JSON representation
List installed versions of package dependencies
- Host: GitHub
- URL: https://github.com/gswalden/listver
- Owner: gswalden
- License: isc
- Created: 2016-01-17T01:17:34.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-17T01:51:10.000Z (about 9 years ago)
- Last Synced: 2024-10-29T21:18:34.310Z (3 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![npm version](https://badge.fury.io/js/listver.svg)](https://badge.fury.io/js/listver)
[![Build status](https://travis-ci.org/gswalden/listver.svg?branch=master)](https://travis-ci.org/gswalden/listver)
[![Dependencies](https://david-dm.org/gswalden/listver.svg)](https://david-dm.org/gswalden/listver)### Install
```sh
npm install --save listver
```### Use
```js
var listver = require('listver');
var list = listver({
includeDev: false // include devDependencies when true
includeMain: false // include main/parent module when true
asArray: false // return as an array when true
});console.dir(list);
/* {
'list-deps': '0.2.2',
'load-module-pkg': '0.1.0',
lodash: '4.0.0'
} */
```### Motivation
We wanted a way to easily log which versions of our dependencies were being loaded on application startup, especially when dealing with packages outside the public npm registry. This small library will read the `package.json` of every direct dependency and return an object containing their versions.