Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including tmp-stats with all npm packages installed. Try it out:

var tmpStats = require("tmp-stats")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

tmp-stats v0.1.0

writes data/stream/whatever to a tmp file, gets the stats, then deletes the tmp file


a lil helper to get the stats object on arbitrary streams/datas/blobs/pokemons.

getStat(data, enc, cb(err, stat, tmpFilePath))

writes to a tmp file, gets the stat object, and then wipes the file.


gives you a random file path in os.tmpdir to write to


Add tests for error cases (wat are they even?)

Should randomPath prefix/"namespace" somehow?

Sort out the tmpDeleted business.


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free