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

picasso-fs

v10.0.0

Published

A simple file system abstraction layer with promise-based functions.

Readme


easy-fs

A lightweight and simple wrapper for Node.js native fs module.
Designed to make file system operations like reading, writing, copying, removing, and watching files or directories more convenient.

Installation

npm install easy-fs

Usage

const fs = require("easy-fs");

// Write a JSON file
fs.write("data/user.json", { name: "John" });

// Read the file or folder
const user = fs.read("/data/user.json");
const folder = fs.read("/data");
// Remove file or folder
fs.remove("/data");
fs.remove("/data/user.json");


---

API Reference

write(filePath, data)

Writes content to a file. Creates the directories automatically if they don't exist.

filePath (string): Path to the file.

data (string | object): Content to write. If an object is passed, it will be stringified as JSON.



---

read(filePath)

Reads the content of a file or lists the contents of a directory.

filePath (string): Path to the file or folder.

Returns:

File content as string or parsed JSON.

An array of file/folder names if the path is a directory.




---

remove(filePath)

Deletes a file or directory (recursively and forcefully).

filePath (string): Path to remove.



---

copy(src, dest)

Copies a file from source to destination.

src (string): Source file path.

dest (string): Destination file path.



---

move(src, dest)

Moves (renames) a file from source to destination.

src (string): Source path.

dest (string): Destination path.



---

file(filePath, content = '')

Creates a new file with optional content.

filePath (string): Path to create the file.

content (string): Optional string content (default is empty).



---

list(folderPath)

Lists all files and folders inside a directory.

folderPath (string): Path to the directory.

Returns: An array of names inside the directory.



---

exists(path)

Checks whether a file or folder exists.

path (string): Path to check.

Returns: true or false.



---

watch(path)

Watches a file or directory for changes or deletion.

path (string): File or folder to watch.

Returns: An object containing:

onupdate(callback): Triggered when the file/directory is updated.

For directories: { path, items }

For files: { path, content }


ondelete(callback): Triggered when the file/folder is deleted.

{ path }


close(): Stops the watcher.



Example

const fs = require("easy-fs");

const watcher = fs.watch("./myfolder/");

watcher.onupdate = (e) => {
  console.log("Updated:", e);
};

watcher.ondelete = (e) => {
  console.log("Deleted:", e);
};

// Stop watching after 10 seconds
setTimeout(() => {
  watcher.close();
}, 10000);


---

License

MIT

---