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

warcraft-3-w3ts-utils

v0.1.36

Published

A library of utility functions for modding Warcraft 3 utilizing the W3TS template.

Readme

WC3-W3TS-utils

This library was created for learning purposes and for personal utility of having a centralized location for my utility functions. There is still work to be done for organization and arguments once I get around to it. Small collection of utility helpers for projects using W3TS (Warcraft III TypeScript, v3.x). Designed to be lightweight and easy to drop into your WC3 TypeScript projects to simplify common tasks (tables, math, cloning, timers, safe wrappers, etc.).

Features

  • Safe wrappers for native WC3 APIs
  • Common math and clamp helpers
  • Table/object deep clone and merge
  • Timer helpers and simple schedulers
  • Small, dependency-free TypeScript utilities

Installation

Copy the utils folder into your project or install via your package manager if published:

npm

npm install wc3-w3ts-utils

yarn

yarn add wc3-w3ts-utils

Or add the files directly to your W3TS project (recommended for custom Warcraft builds).

Usage

Import only what you need:

import { delayedTimer, unitsInRange, applyForce, useTempEffect } from "wc3-w3ts-utils";

function Rebuke() {
    //Blasts unit's near the archmage away, temporarily slowing them
    const t = Trigger.create();
    t.registerUnitEvent(this.hero, EVENT_UNIT_SPELL_EFFECT);
    triggerAction(t, ({ spellId, refId }) => {
        if (spellId !== WTS_Abilities.Rebuke) {
            return;
        }

        delayedTimer(0.5, () => {
            unitsInRange(this.hero.x, this.hero.y, 350, (unit) => {
                if (unit.isAlive() && unit.isEnemy(this.hero.owner)) {
                    //apply force
                    const forceAngle = getRelativeAngleToUnit(this.hero, unit);
                    applyForce(forceAngle, unit, 1800, { obeyPathing: true });
                    applyStun(1, { contextId: refId, effectId: "archmage-rebuke", unit: unit });
                    this.hero.damageTarget(unit.handle, 100, false, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_ROCK_HEAVY_BASH);
                }
            });
        });

        const effect = Effect.createAttachment("Units\\NightElf\\Wisp\\WispExplode.mdl", this.hero, "overhead");
        effect?.playWithTimeScale(ANIM_TYPE_BIRTH, 2);

        useTempEffect(effect);
    });
}

Contributing

  • Open an issue for bugs or enhancement requests.
  • Fork, create a feature branch, and submit a PR with tests/examples where applicable.
  • Keep changes small and well-documented.

License

MIT — see LICENSE file.

Notes

Built to be simple and compatible with W3TS v3.x and Warcraft III modding workflows. Adjust imports when integrating directly into your map project. This library was created for learning purposes and for personal utility of having a centralized location for my utility functions. There is still work to be done for organization and arguments once I get around to it.