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

@ferolyte/common

v0.2.3

Published

Shared utilities and content foundation for Ferolyte

Readme

@ferolyte/common

Shared utilities and content foundation for the Ferolyte framework.

This package provides TypeScript types, content validation, diagnostic reporting, object utilities, and small data structures used by @ferolyte/pack and @ferolyte/cli.

Installation

npm install @ferolyte/common

This package is usually installed as a transitive dependency of @ferolyte/pack or @ferolyte/cli. Install it directly when building custom tooling on top of Ferolyte.

Requirements: Node.js >= 18

Feature scope

Types

| Export | Path | Description | | ------------------- | ---------------------------------------------------- | ------------------------------------------------------ | | Identifier | @ferolyte/common/types/core/identifier | Typed namespace:id string for Minecraft content IDs | | RequireAtLeastOne | @ferolyte/common/types/object/require-at-least-one | Utility type requiring at least one key from an object | | OneOfRecord | @ferolyte/common/types/core/one-of-record | Discriminated union of single-key records | | IntRange | @ferolyte/common/types/number/int-range | Compile-time integer range type |

Content foundation

| Export | Path | Description | | ------------------ | ----------------------------------------------------- | ------------------------------------------------------------------------------ | | ContentBuilder | @ferolyte/common/content/interfaces/content-builder | Contract for Ferolyte content modules (metadata, cloneConfig(), build()) | | CONTENT_METADATA | @ferolyte/common/content/metadata | Tags for item, block, server-entity, client-entity content types |

Diagnostics

Structured validation error reporting with file links, field paths, and content-type labels.

| Export | Path | | ------------------------------------------------------------- | --------------------------------------------------------- | | ContentDiagnosticContext, ContentType, ContentSection | @ferolyte/common/content/diagnostics/content-diagnostic | | buildFieldPath, createFileLink, logContentError | @ferolyte/common/content/diagnostics/content-diagnostic | | withFieldPath, withComponentContext, withSectionContext | @ferolyte/common/content/diagnostics/content-diagnostic |

Validation

Type-guard validators that log via logContentError on failure:

  • validateBooleanValue, validateNonEmptyString, validateString
  • validatePositiveNumber, validateNonNegativeNumber, validateNumber
  • validateIntegerRange, validateNumberRange, validateAllowedValue
  • validateNonEmptyArray, validateNonEmptyStringArray
  • validateDamageSourceArray, validateVector3, validateCustomComponentIds

Import from @ferolyte/common/content/validation/content-validation.

Content tools

| Export | Path | Description | | ------- | -------------------------------------- | -------------------------------------------------- | | Float | @ferolyte/common/content/tools/float | Serializes floats for JSON round-trip during build |

Minecraft types

| Export | Path | Description | | ------------------- | ----------------------------------------------------- | ----------------------------------- | | MinecraftPackType | @ferolyte/common/content/types/minecraft-pack-types | 'BP' \| 'RP' pack type | | DamageSourceType | @ferolyte/common/content/types/damage-source | Union of 37 Minecraft damage causes |

Object utilities

| Export | Path | Description | | ---------------- | ----------------------------------------- | ----------------------------------- | | deepMerge | @ferolyte/common/object/deep-merge | Recursive merge; arrays concatenate | | cartesianMerge | @ferolyte/common/object/cartesian-merge | Cartesian product of option objects |

Data structures

| Export | Path | Description | | ------------------------------------------ | ---------------------------------------------------- | -------------------------- | | ArrayQueue, createArrayQueue | @ferolyte/common/data-structures/array-queue | Simple array-backed queue | | RingBufferQueue, createRingBufferQueue | @ferolyte/common/data-structures/ring-buffer-queue | Fixed-capacity ring buffer |

Shapes

| Export | Path | Description | | ------------------------ | ------------------------------------------------- | --------------------------------------------------------- | | createDiamondLocations | @ferolyte/common/shape/create-diamond-locations | Horizontal diamond of Vector3 positions around a center |

License

MIT — Copyright (c) 2024 Lexon2. See LICENSE for the full text.