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

@beabee/beabee-common

v0.21.1-alpha.2

Published

Shared code between Beabee projects for Node.js, Deno and the browser

Readme

beabee-common

beabee-common is a shared codebase utilized across Beabee projects, compatible with Node.js, Deno, and web browsers.

Installation

To install beabee-common, use the following command:

npm install @beabee/beabee-common --save

Usage

Node.js

In a Node.js environment, use beabee-common as follows:

import { parseDate } from "@beabee/beabee-common";

parseDate("2022"); // Returns: [ 2021-12-31T23:00:00.000Z, 'y' ]

Deno

Support for Deno is planned. Details on publishing to deno.land will be provided in the future.

Development

Requirements

Development of beabee-common requires the latest stable versions of both Deno and Node.js:

  • Deno (latest stable version)
  • Node.js (latest stable version)

Build Process

To build the project, run:

npm install
npm run build # Alternatively, use `deno task build`

Scripts

Scripts for NPM and Deno tasks are synchronized, ensuring consistency whether you use npm run ... or deno task .... They are defined in both package.json and deno.json. New scripts can be synchronized with via deno task sync or npm run sync.

Key scripts include:

build

Node.js builds are created using esbuild from Deno source. Deno projects can directly utilize TypeScript source from ./mod.ts.

This runs several sub-scripts:

  • build:types - Generates TypeScript types using the tsc compiler.
  • build:node:
    • build:node:cjs - Creates a CommonJS bundle with esbuild, script located at ./scripts/esbuild.cjs.ts.
    • build:node:esm - Generates an ESM bundle using esbuild, script found at ./scripts/esbuild.esm.ts.

Deno's support for NPM packages differs in syntax, e.g., date-fns is imported as import { format } from "npm:date-fns"; in Deno, and import { format } from "date-fns"; in Node.js. Aliases in deno.json enable consistent codebase usage across environments.

sync

Synchronizes dependencies and scripts across package.json and deno.json to establishing necessary aliases in Deno and to make the scripts callable from both. See ./scripts/sync.ts for details.

generate:index

Generates index.ts files. Located at ./scripts/generate-index.ts.

format

Formats code using Deno's standard formatter.

lint

Lints code using Deno's standard linter.

test

Testing is divided into several scripts:

  • test:types - Checks for type errors using tsc.
  • test:deno - Main tests using Deno's standard testing framework.
  • test:node:
    • test:node:esm - Tests ESM build importability in Node.js.
    • test:node:cjs - Tests CJS build importability in Node.js.

Manage Dependencies

You can use dependencies for both NPM and Deno. When incorporating Deno packages, they must be bundled for Node.js compatibility. For a practical example, refer to this pull request. For integrating NPM dependencies, consult the sync script which ensures synchronization between the dependency configurations for both environments.

Cross Platform Compatibility

This module is cross platform independent and can be used under Node.js, Deno and in the browser. Therefore, please do not use any runtime APIs from Node.js, Deno or the Web API unless it is available in all these runtimes.

License

beabee-common is licensed under the AGPL-3.0 license.