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 🙏

© 2026 – Pkg Stats / Ryan Hefner

nasync-js

v0.1.1

Published

Javascript flavour in which everything is awaited and async, implemented as a Starboard cell type

Downloads

18

Readme

nasync-js

What if Javascript we could write asynchronous Javascript code as if it was synchronous like you would in Python or Golang?

This repo contains a transpiler for a flavor of Javascript called n/async Javascript. Its main demo is through a Starboard in-browser Notebook plugin which introduces the nasync cell type.

Example

Input (n/async Javascript)

const websiteText = fetch("https://enable-cors.org/").text();

console.log("Website text length", websiteText.length);

// All functions become async
function identity(a) {
  return a;
}

const hello = new Promise(x => setTimeout(_ => x("Hello"), 1000))
console.log("Some print message :)")

const stillHello = identity(hello);

// The last statement is the cell return value, unless it ends with a semicolon.
stillHello + " world"

Transpiled code (vanilla JS)

(async () => {const websiteText = await (await (await fetch)("https://enable-cors.org/")).text();

  await (await console).log("Website text length", (await websiteText).length);

  // All functions become async
  async function identity(a) {
    return await a;
  }

  const hello = await new (await Promise)(await (async (x) => await (await setTimeout)(await (async (_) => await (await x)("Hello")), 1000)));
  await (await console).log("Some print message :)");

  const stillHello = await (await identity)(await hello);

  // The last statement is the cell return value, unless it ends with a semicolon.
  return { cellReturnValue: await ((await stillHello) + " world") };
})();

Output

Website text length 5716
Some print message :) 

// the cell return value
Promise<"Hello world"> 

Questions

Should I use this in production?

No. You could use it for playing around and quick experimentation in a notebook, but outside of that you should stick with writing await and async yourself. Sprinkling await everywhere in your code likely won't make it run any faster.

Any caveats?

Member access expressions are not awaited (as this leads to this issues).

// n/async javascript input
const x = myObject.a.b.c();

// Transpiled output
(async () => {const x = await (await myObject).a.b.c();
})();

// What you may expect
(async () => {const x = await (await (await (await (await myObject).a).b).c)();
})();

In practice this likely what you want, and if you do need to await member variables you can just write await yourself. I welcome a contribution which can demonstrate an edge case when this is needed (I couldn't come up with one).

So what is this good for?

Use it in Starboard Notebook, load external data and play with your data as if there's no such thing as asynchronicity.

License

MIT