npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

grab-typings

v1.1.10

Published

grab definitelyTyped typings

Downloads

37

Readme

grab-typings

Build Status

grab definitelyTyped typings

Getting Started

just npm install -g grab-typings and then grab-typings or gt (for short) from a project directory (anywhere with a package.json).

Options

You can view this yourself with gt --help.

Passing no options will attempt to parse packages from package.json#dependencies and package.json#devDependencies and if entries are found, we'll try to get typings for those.

$ gt --help
Usage: grab-typings||gt -s [source] -i [glob] -d [dir] [package(s)]

Options:
  -s, --source  Specify a source  [string] [default: "https://github.com/borisyankov/DefinitelyTyped/raw/master"]

  -d, --dir     Specify typings directory to save to                                [string] [default: "typings"]

  -i, --inject  Inject references into files that match [glob]                           [string] [default: null]

  -h, --help    Show help                                                                               [boolean]

  --version     Show version number                                                                     [boolean]


Made with <3 by @bengreenier

Output

Here's some sample output (generated by running from this project directory):

$ gt
11/11
✓ node
✓ es6-promise
✓ mkdirp
✓ yargs
✓ request
✓ del
✓ optimist
✓ gulp
✓ gulp-mocha
✓ gulp-typescript
✓ mocha

API

Are you a developer?! Oh boy! You can use the grab-typings API.

Three easy steps!

  • npm install grab-typings
  • var GrabTypings = require('grab-typings')
  • new GrabTypings().run(['array','of','args']) which will return a promise

That's it.

Typescript

Oh you use typescript too? Cool. You'll want to follow these steps:

  • get the typings file from dist/def/grab-typings
    • oh hey, there's a tool for that npm install -g grab-typings
    • gt -s https://github.com/bengreenier/grab-typings/raw/master/dist/def grab-typings
  • npm install grab-typings
  • import {GrabTypings} from 'grab-typings'
  • new GrabTypings().run(['array','of','args']) which will return a promise

That's it. see lib/grab-typings.ts for an example.

License

MIT