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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@bearz/path

v0.0.0

Published

path module import from @bearz/path for node, bun, deno, and browser.

Readme

@bearz/path

Overview

Path utilties for operating system file paths that is a re-package of the @std/path module with minor changes to enable it to work in node and bun.

@std/path which is based upon browsify's implementation of path.

logo

JSR npm version GitHub version

Documentation

Documentation is available on jsr.io

A list of other modules can be found at github.com/bearz-io/js

Usage

import { resolve, join, isAbsolute, basename, dirname } from "@bearz/path";

console.log(isAbsolute("./test"));

const dir = resolve("./test");
const file = join(dir, "text.txt");
console.log(dir);
console.log(isAbsolute(dir));
console.log(file);
console.log(dirname(file));
console.log(basename(file))

Functions

  • basename - Return the last portion of a path.
  • common - Determines the common path from a set of paths for the given OS.
  • dirname - Return the directory path of a path.
  • extname - Return the extension of the path with leading period (".").
  • format - Generate a path from a ParsedPath object.
  • fromFileUrl - Converts a file URL to a path string.
  • globToRegexp - Converts a glob string to a regular expression.
  • isAbsolute - Verifies whether provided path is absolute.
  • isGlob - Test whether the given string is a glob.
  • joinGlobs - Joins a sequence of globs, then normalizes the resulting glob.
  • join - Joins a sequence of paths, then normalizes the resulting path.
  • normalizeGlob - Normalizes a glob string.
  • normalize - Normalize the path, resolving '..' and '.' segments.
  • parse - Return an object containing the parsed components of the path.
  • relative - Return the relative path from from to to based on current working direct.
  • resolve - Resolves path segments into a path.
  • toFileUrl - Converts a path string to a file URL.
  • toNamespacedPath - Resolves path to a namespace path. This is a no-op on non-windows systems.

Notes

@bearz/path is repackaging @std/path to enable it for node/bun and avoid a depdendency on jsr when shipping @bearz modules to npm avoid issues with shimming between @std/path and node:path and include the extra methods such as toFileUrl and fromFileUrl.

License

MIT License