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

ic10

v5.2.1

Published

[![npm version](https://img.shields.io/npm/v/ic10.svg)](https://www.npmjs.com/package/ic10) [![npm downloads](https://img.shields.io/npm/dm/ic10.svg)](https://www.npmjs.com/package/ic10) [![npm bundle size](https://badgen.net/bundlephobia/min/ic10)](https

Readme

IC10 Emulator & Development Toolkit

npm version npm downloads npm bundle size GitHub stars GitHub forks GitHub issues GitHub license Build Status

Last Commit Translation status Stationeers Bun TypeScript

This project is an IC10 emulator (programming language for the game Stationeers) with a complete toolkit for development, testing, and code generation.

🚀 Features

  • Full IC10 Emulation - Execute IC10 code with support for all instructions
  • TypeScript Type Generation - Automatic generation of types for devices, instructions, and constants
  • Device System - Typed classes for all in-game devices
  • Development Tools - Automatic code generation, index files, and configurations
  • Testing - Comprehensive test system with VSCode support
  • Watch Mode - Automatic rebuild on source code changes

🏗️ Project Structure

src/
├── Core/                 # Base classes (Device, Housing, Network, Slot, Stack)
├── Defines/             # Generated constants and definitions
├── Devices/             # Auto-generated device classes
├── Ic10/                # IC10 emulator core
│   ├── Context/         # Execution contexts (Real, Sandbox)
│   ├── Instruction/     # IC10 instruction implementations
│   ├── Lines/           # Code line processing
│   └── SandBox.ts       # Execution sandbox
tests/                   # Tests
tools/                   # Generation scripts and utilities
samples/                 # IC10 code examples

🛠️ Installation & Setup

Prerequisites

  • Bun (required)
  • IDE with TypeScript support (VSCode recommended)

Installation

git clone <repository-url>
cd ic10
bun install

Development

# Run in development mode with file watching
bun run dev

# Run tests
bun test

# Full project rebuild
bun run upgrade

📋 package.json Scripts

Main Commands

  • dev - Development mode with file watching
  • build - Full project build
  • test - Run tests
  • upgrade - Full data update and regeneration

Code Generation

  • download - Download latest data from server
  • generate-device - Generate device classes
  • generate:index - Update index files
  • generate-intruction-index - Generate instruction index
  • generate-vscode - Update VSCode configuration

Code Quality

  • lint - Code checking with Biome
  • fix - Automatic problem fixing
  • format - Code formatting

🔧 Development Process

1. Project Initialization

bun run upgrade

This script performs:

  • Downloading current device, instruction, and constant data
  • Generating TypeScript types and classes
  • Creating index files
  • Updating VSCode configuration

2. Development Mode

bun run dev

The whatch.ts script monitors changes and automatically:

  • Regenerates index files when sources change
  • Updates devices when definitions change
  • Rebuilds instruction index when instruction classes change

3. Creating a New Instruction

  1. Create a class in src/Ic10/Instruction/
  2. Inherit from the base Instruction class
  3. Implement the tests() method for testing
  4. The system will automatically detect and add the instruction

4. Testing

# Run all tests
bun test

# Run specific test
bun test tests/ic10/main.test.ts

# Show executed tests
bun run show

🎯 Using the Emulator

comming soon

🔄 Code Generation System

Device Generation (generate-devices.ts)

  • Analyzes device data from API
  • Creates typed TypeScript classes
  • Groups devices by base types (Housing, Structure, Item)
  • Generates index files for export

Instruction Generation (generate-intruction-index.ts)

  • Automatically discovers instruction classes
  • Creates instruction map for quick access
  • Generates TypeScript types for instruction names

VSCode Update (generate-vscode.ts)

  • Collects instruction test information
  • Updates launch.json for debugging
  • Provides autocompletion for instruction names

📊 Change Monitoring

The whatch.ts system provides:

  • Debounce mechanism - Prevents multiple rebuilds
  • Selective regeneration - Only necessary parts on change
  • Template support - Different scripts for different file types
  • Unnecessary file ignoring - Prevents cyclic rebuilds

🧪 Testing

The project uses a comprehensive testing system:

  • Unit tests for individual components
  • Integration tests for the IC10 emulator
  • Instruction tests with automatic discovery
  • JUnit format report generation

🔧 Configuration

VSCode

  • Autocompletion for IC10 instructions
  • Debug configuration for tests
  • Biome integration for linting

Biome

  • Code formatting
  • TypeScript linting
  • Automatic problem fixing

Vite

  • Library building
  • TypeScript type generation
  • ESM and CommonJS support

🏛 Used Libraries

exact-ic10-math (by Aidan647)

  • Porting mathematical and bitwise functions from the Game (C#) to Typescript
  • Acknowledgments: Aidan647 for creating the exact math library that provides full calculation compatibility with Stationeers game

Other Key Libraries

  • crc-32 - Checksum calculation for device operations
  • uuid - Unique identifier generation for emulator entities
  • axios - HTTP client for data downloading
  • vite - Modern project build system
  • biome - Code formatting and linting

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Implement changes
  4. Add tests
  5. Ensure all tests pass
  6. Create a Pull Request

Code Standards

  • Use bun run fix before commit
  • Follow Biome code style
  • Add tests for new functionality
  • Update documentation when necessary

📝 Useful Commands

# Quick project check
bun run fix

# Formatting only
bun run format

# Formatting check
bun run format:check

# Run specific generation script
bun run generate-device