New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

get-package-json-from-github

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-package-json-from-github

Get package.json from github

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
1
Created
Source

get-package-json-from-github

Get package.json from github

Installation

Download node at nodejs.org and install it, if you haven't already.

npm install get-package-json-from-github --save

Usage

import getPackageJsonFromGithub from 'get-package-json-from-github';

getPackageJsonFromGithub('git+https://github.com/kesla/get-package-json-from-github.git')
  .then(packageJson => {
    console.log('packageJson', packageJson);
  });

// can also load a caching version

const cached = getPackageJsonFromGithub.cached();

cached('git+https://github.com/kesla/get-package-json-from-github.git')
  .then(packageJson => {
    console.log('packageJson', packageJson);
  });

Tests

npm install
npm test

Dependencies

  • async-cache-promise: async-cache - but with promises
  • gh-got: Convenience wrapper for got to interact with the GitHub API
  • immutable-object-methods: Update normal plain javascript object, immutable style. Simlar to how immutable.js, seamless-immutable etc does it but a lot smaller and simpler.
  • npm-package-arg: Parse the things that can be arguments to npm install

Dev Dependencies

License

MIT

Generated by package-json-to-readme

FAQs

Package last updated on 14 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts