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

jaskit

v1.0.4

Published

Ask questions from CLI and Write answers to a file

Downloads

9

Readme

JaSkIt

Java-Script-Interface for CLI

Node module as an object factory. Use it to ask in CLI and write the user's answers into a file. More or less, as npm init command.

Install

$ npm install jaskit

Usage

var color='red';//'blue', 'green', etc.,  

/*You also can use your own chalk color
 *combinations to give it more style
 *as 
 *var chalk=require('chalk');
 *var color=chalk.bgGreen;
 */


var jaskit= require('jaskit');
var cli= jaskit('promt', color);

//display some message before start questions    
jaskit.header('This is my question'); 
      jaskit.ask('This is other question');
      jaskit.ask('This is another question');
   jaskit.end();

Mix It!

Use it alone or with your favorite CLI, like commander.

program
  .command('write [name]') 
  .description('Ask some cuestions and write them on a file')
  .action(function(name){
    //body...
    jaskit.ask('This is my question');     
      jaskit.ask('This is other question');
      jaskit.ask('This is another question');
      jaskit.to('name.txt');
    jaskit.end();
    
  }); 

Change format!

Change the user response with a JavaScript object and regular expressions.

###Format object

before property -- Add something before the user's answer.

replace property -- Regular expression to match with the user'

put property -- the text or characthers to put in place.

after proprety -- Add something after the user's answer.

var formatFor1={before: "", replace:/fine/ 
                                 , put:"Ok", after:""};


cli.ask("Hi.. How'r you?");
      cli.header("JaSkIt.. Java-Script-Interface CLI");
      cli.ask("Can I ask you somethin?");
 cli.change(1, formatFor1); //params(questionID, formatObjct)  
      cli.ask("How about continue asking you..?");
      cli.to("file.JSON");   
      cli.end("Every little thing is gonna be alright!\n    y or n");

License

MIT © Lucas_C/llucbrell