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

@momsfriendlydevco/repl

v2.1.2

Published

MFDC REPL CLI

Downloads

9

Readme

MFDC-REPL

MFDC's own internal REPL command line interface.

This project provides the executable mrepl which has the following functionality over regular REPL:

  • Babel pre-compiler (babel plugin) - All code is automatically compiled via BabelJS before it is run - making things like arrow functions available on older Node releases
  • Lodash (lodash plugin) - lodash is provided as lodash, l and __
  • Moment (moment plugin) - moment is provided as moment
  • Mongoose project support (mongoose plugin) - If the files ./config/index.js, ./config/db.js and ./models/index.js are found they are loaded in that order (with ./models/index.js expected to return an object containing the available compiled schemas. Models are then provided in the db object. e.g. db.users.find() will return all users.
  • STDIN slurping (stdin plugin) - Any piped input into the program is provied as the input variable. Automatic decoding of the variable will be attempted by JSON.parse() otherwise it will be a raw string.
  • History saving - History saing is enabled by default

Installation

Simply run the following:

sudo npm install -g @momsfriendlydevco/repl

You should now be able to run the REPL interface with:

mrepl

Plugins

Plugins are provided in the plugins/ folder within the main script file.

Each plugin is a simple JavaScript file which is expected to expose a function taking a callback and the main app argument. Each plugin can decorate the properties of the program and return the callback when finished.

Some usefully exposed properties:

| Property path | Type | Default | Description | |----------------------|---------|-----------------|-----------------------------------------------------------------------| | app | Object | Complex | The main application object - an instance of a commander definition | | app.verbose | Number | 0 | Verbosity level | | app.plugin | Array | ['./plugins'] | Globs to search for plugins | | app.repl | Object | Complex | Repl options when creating the interface | | app.repl.globals | Object | {} | Any exported globals that should be available inside the REPL session | | app.repl.eval | Array | [] | Array of evaluation functions to run. Each Eval is run as a compose pipeline with the final output being returned to the REPL session | | inspect.depth | Number | 2 | How deeply to examine objects when printing results to the console | | inspect.colors | Boolean | true | Whether colors are enabled when printing results to the console |