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

extra-filesystem

v0.6.2

Published

```sh npm install --save extra-filesystem # or yarn add extra-filesystem ```

Readme

extra-filesystem

Install

npm install --save extra-filesystem
# or
yarn add extra-filesystem

API

createTempDir

function createTempDir(): Promise<string>

createTempDirSync

function createTempDirSync(): string

createTempFile

function createTempFile(): Promise<string>

createTempFileSync

function createTempFileSync(): string

createTempName

function createTempName(): Promise<stirng>

createTempNameSync

function createTempNameSync(): string

emptyDir

function emptyDir(dirname: string): Promise<void>

emptyDirSync

function emptyDirSync(dirname: string): void

ensureDir

function ensureDir(dirname: string): Promise<void>

ensureDirSync

function ensureDirSync(dirname: string): void

ensureFile

function ensureFile(filename: string): Promise<void>

ensureFileSync

function ensureFileSync(filename: string): void

pathExists

function pathExists(path: string): Promise<boolean>

pathExistsSync

function pathExistsSync(path: string): boolean

readNDJSONFile

function readNDJSONFile<T>(
  filename: string
, encoding: BufferEncoding = 'utf-8'
): AsyncIterableIterator<T>

readNDJSONFileSync

function readNDJSONFileSync<T>(
  filename: string
, encoding: BufferEncoding = 'utf-8'
): IterableIterator<T>

readYAMLFile

function readYAMLFile<T>(
  filename: string
, encoding: BufferEncoding = 'utf-8'
): Promise<T>

readYAMLFileSync

function readYAMLFileSync<T>(
  filename: string
, encoding: BufferEncoding = 'utf-8'
): T

readJSONFile

function readJSONFile<T>(
  filename: string
, encoding: BufferEncoding = 'utf-8'
): Promise<T>

readJSONFileSync

function readJSONFileSync<T>(
  filename: string
, encoding: BufferEncoding = 'utf-8'
): T

writeJSONFile

function writeJSONFile(
  filename: string
, data: unknown
, options?: { spaces?: number }
): Promise<void>

writeJSONFileSync

function writeJSONFileSync(
  filename: string
, data: unknown
, options?: { spaces?: number }
): void

writeYAMLFile

function writeYAMLFile(filename: string, data: unknown): Promise<void>

writeYAMLFileSync

function writeYAMLFileSync(filename: string, data: unknown): void

move

function move(source: string, destination: string): Promise<void>

Move the file or directory from source to destination.

Unlike the mv command in Bash, it does not support moving a file or directory to a directory.

If a file or directory already exists at the destination, it will throw an error.

If the destination's parent directory does not exist, it will create the parent directory.

moveSync

function moveSync(source: string, destination: string): void

See move().

copy

function copy(source: string, destination: string): Promise<void>

Copy the file or directory from source to destination.

Unlike the cp command in Bash, it does not support copying a file or directory to a directory.

If a file or directory already exists at the destination, it will throw an error.

If the destination's parent directory does not exist, it will create the parent directory.

copySync

function copySync(source: string, destination: string): void

See copy().

remove

function remove(path: string): Promise<void>

removeSync

function removeSync(path: string): void

isDirectory

function isDirectory(path: string): Promise<boolean>

isFile

function isFile(path: string): Promise<boolean>

isWritable

function isWritable(path: string): Promise<boolean>

isReadable

function isReadable(path: string): Promise<boolean>

findAllFilenames

function findAllFilenames(
  dirname: string
, predicate: (dirname: string) => Awaitable<boolean> = _ => true
): AsyncIterableIterator<string>

findAllDirnames

function findAllDirnames(
  dirname: string
, predicate: (dirname: string) => Awaitable<boolean> = _ => true
): AsyncIterableIterator<string>

getLongExtension

function getLongExtension(filename: string): string

Get the longest possible extension.

getLongExtension('file.tar.gz') // '.tar.gz'

getShortBasename

function getShortBasename(filename: string): string

Get the shortest possible basename.

getShortBasename('file.tar.gz') // 'file'

readFileLineByLine

function readFileLineByLine(
  filename: string
, encoding: BufferEncoding = 'utf-8'
): AsyncIterable<string>

readFileLineByLineSync

function* readFileLineByLineSync(
  filename: string
, encoding: BufferEncoding = 'utf-8'
): IterableIterator<string>

writeIterableToFile

function writeIterableToFile(
  filename: string
, iterable: Iterable<string> | AsyncIterable<string>
): Promise<void>

isSubPathOf

function isSubPathOf(subject: string, object: string): boolean

checksumFile

function checksumFile(algorithm: string, filename: string): Promise<string>

findUpPackageFilename

function findUpPackageFilename(pathname: string): Promise<string | undefined>

findUpPackageFilenameSync

function findUpPackageFilenameSync(pathname: string): string | undefined

pathEquals

function pathEquals(a: string, b: string): boolean