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

node-help

v2.0.11

Published

Offline documentation for the Node Repl

Downloads

23

Readme

node-help

Known Vulnerabilities Build Status

Offline documentation for your Node REPL.

Installing, Uninstalling and Updating node-help

To install node-help, run:

npm install -g node-help

To uninstall node-help, run:

npm uninstall -g node-help

To update node-help to the latest published version, run:

npm update -g node-help

API

  • ?: append to the end of a built-in Node object to get documentation on it
  • .docs: show a list of long-form markdown articles to read
  • .docs <topic>: render the article name in Markdown for the terminal

The offline documentation module for the Node.js REPL

Features

node-help is a custom Node.js REPL inspired by iPython that lets you append a question mark to any valid JavaScript token to get information about it.

  • Documentation for un-aliased built-in lookups, e.g. node-help > process.env?.
  • Basic Native JavaScript introspection support displaying objects' valueOf(), toString(), method and property values.
  • Colorized short-and-longform documentation
    • short-form docs are accessed with an appended ? and are rendered in colorized plain text
    • long-form docs are accessed via the .docs <topic_name> command and are rendered in colorized markdown in the terminal
  • Command history and global context are enabled.

Level of Support

At present documentation is available for Node v8, v9 and 10. Native JavaScript documentation is coming soon, but there is rudimentary introspection for Native JavaScript objects (See the 'additional information' section of the output for any given search query').

Usage

The .docs command

Using the .docs command, you can list the available longform docs like this:

available Node.js docs:
+ addons
+ assert
+ async_hooks
+ buffer
+ child_process
+ cli
+ cluster
+ console
+ crypto
+ debugger
+ deprecations
+ dgram
+ dns
+ documentation
+ domain
+ errors
+ esm
+ events
+ fs
...

The .docs <topic> command

By running .docs http2, for example, you can read long-form documentation on the http2 module from the Node.js website as colorized Markdown in your terminal. Like, wee!

# HTTP/2

    Stability: 1 - Experimental

    The http2 module provides an implementation of the HTTP/2 (https://tools.ietf.org/html/rfc7540) protocol. It
    can be accessed using:

        const http2 = require('http2');

        ## Core API

        The Core API provides a low-level interface designed specifically around
        support for HTTP/2 protocol features. It is specifically not designed for
        compatibility with the existing HTTP/1 (http.html) module API. However,
        the Compatibility API (#http2_compatibility_api) is.

        The http2 Core API is much more symmetric between client and server than the
        http API. For instance, most events, like error, connect and stream, can
        be emitted either by client-side code or server-side code.

        ### Server-side example

        The following illustrates a simple HTTP/2 server using the Core API.
        Since there are no browsers known that support
        unencrypted HTTP/2 (https://http2.github.io/faq/#does-http2-require-encryption), the use of
        http2.createSecureServer() (#http2_http2_createsecureserver_options_onrequesthandler) is necessary when communicating
        with browser clients.

            const http2 = require('http2');
                const fs = require('fs');

...

Use the ? to search the Node API (shorter-form)

node-help > process?

[ 2 Result(s) for Node.js. ]

 global | process 
Name: process
Node.js Object Type: global
Signature(s): process 

Description:
{Object}

The process object. See the process object section.

 ChildProcess | process 
Name: process
Node.js Object Type: ChildProcess
Signature(s): `process` {ChildProcess}  

Description:
All workers are created using child_process.fork(), the returned object
from this function is stored as .process. In a worker, the global process
is stored.
See: Child Process module
Note that workers will call process.exit(0) if the 'disconnect' event occurs
on process and .exitedAfterDisconnect is not true. This protects against
accidental disconnection.

[ Additional Information ]

toString: '[object process]'
valueOf: '[object process]'
Constructor: process
local properties (non-methods):

_events        arch           debugPort      execPath       pid            stderr         version        
_eventsCount   argv           domain         features       platform       stdin          versions       
_exiting       argv0          env            mainModule     ppid           stdout         
_maxListeners  config         execArgv       moduleLoadList release        title          

local methods:
_debugEnd                           binding                             initgroups                          
_debugPause                         chdir                               kill                                
_debugProcess                       cpuUsage                            memoryUsage                         
_fatalException                     cwd                                 nextTick                            
_getActiveHandles                   dlopen                              openStdin                           
_getActiveRequests                  emitWarning                         reallyExit                          
_kill                               exit                                setUncaughtExceptionCaptureCallback 
_linkedBinding                      getegid                             setegid                             
_rawDebug                           geteuid                             seteuid                             
_startProfilerIdleNotifier          getgid                              setgid                              
_stopProfilerIdleNotifier           getgroups                           setgroups                           
_tickCallback                       getuid                              setuid                              
abort                               hasUncaughtExceptionCaptureCallback umask                               
assert                              hrtime                              uptime                              

node-help >

Contributions

See Contributing. The search algorithm for node-help is not perfect so there will be bugs. Please feel free to raise issues on the github issues page.