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

promptsj

v0.1.1

Published

the worst package ever. Simple extended prompt i use for running javascript and shell at the same time. Use it if you want.

Downloads

7

Readme

the worst package ever. Simple extended prompt i use for running javascript and shell at the same time. Use it if you want.

Simple use case

npm install -g promptsj

in terminal execute: promptsj

You are presented with:
prompt =>


prompt =>
prompt =>a = 1
prompt =>console.log(a)
1
prompt =>b = function() { console.log('hello world') } 
prompt =>b()
hello world
prompt =>
prompt =>wget http://google.com
prompt =>curl http://google.com
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>

// Running node programs.
prompt =>cat example.js
console.log('hello world');

prompt =>
prompt =>node example.js
hello world


//running node bin programs for example benchget
prompt =>nab -c 20 -n 20 http://google.com
Running 20 requests with a concurrency of 20

Url to test: http://google.com

Group(1) took (215 ms) to Finish with (20) results!

All Tests finished in (216 ms)
There are 20 results

prompt =>

// New Feature

rompt =>
prompt =>//Now you can assign bash results to javascript, and interpolate javascript to bash
prompt =>//Currently only support for variables in global scop
prompt =>url = 'http://google.com'
prompt =>
prompt =>output = curl {url}
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   219  100   219    0     0   1561      0 --:--:-- --:--:-- --:--:--  1564

<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>

prompt =>
prompt =>console.log(output)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   219  100   219    0     0   1561      0 --:--:-- --:--:-- --:--:--  1564
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.

</BODY></HTML>

// New Feature

Now you the stderr and stdout or splittable on '|||'

prompt =>
prompt =>url = 'http://google.com'
prompt =>output = curl {url}
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   219  100   219    0     0   2258      0 --:--:-- --:--:-- --:--:--  2281

<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>

prompt =>
prompt =>split = output.split('|||')
prompt =>
prompt =>err = split[0]
prompt =>out = split[1]
prompt =>inspect(err)
'  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\n100   219  100   219    0     0   2258      0 --:--:-- --:--:-- --:--:--  2281\n'
prompt =>
prompt =>inspect(out)
'<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">\n<TITLE>301 Moved</TITLE></HEAD><BODY>\n<H1>301 Moved</H1>\nThe document has moved\n<A HREF="http://www.google.com/">here</A>.\n\n</BODY></HTML>\n\n'