Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ajaymathur/read-pkg-owner
https://github.com/ajaymathur/read-pkg-owner
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ajaymathur/read-pkg-owner
- Owner: ajaymathur
- License: mit
- Created: 2018-02-22T17:37:47.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-02-22T18:27:42.000Z (over 6 years ago)
- Last Synced: 2024-10-11T20:21:17.169Z (about 1 month ago)
- Language: JavaScript
- Size: 41 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# read-pkg-owner
> Get the owner of the package by reading package json
## Install
```sh
$ yarn add read-pkg-owner
```## Use as CLI
Execute following in the repository you want owner for:
```sh
$ read-pkg-owner
```### API
##### `cwd`
**type: string**
**default: process.cwd()**
This is the path to directory where the repository exists.
Example:
```sh
# to get owner for a repo test which is in dir Users/workspace/test
$ read-pkg-owner --cwd Users/workspace/test
```## Use in your node project
This package exports the function `getOwner` which will give you the result
```js
const readPkgOwner = require('read-pkg-owner');readPkgOwner().then(owner => {
// do stuff with owner name
});
```### API
#### `cwd`
**type: string**
**default: process.cwd()**
This is the path to directory where the repository exists.
Example:
```js
// to get owner for a repo test which is in dir Users/workspace/test
const readPkgOwner = require('read-pkg-owner');readPkgOwner('Users/workspace/test').then(owner => {
// do stuff with owner name
});
```