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

@rbxts/replace

v1.0.1

Published

Helping library implements simpler way working with roblox vectors & cframes

Readme

💞 Replace

Helping library implements simpler way working with roblox vectors & cframes

pronounced as re-place

⚙️ Credits

sumer_real

📦 Install

npm install @rbxts/replace

🍴 Cookbook

smooth cyclic rotation

const ROTATION_ANGLE_PER_SECOND = 30
const target = Workspace.WaitForChild("ObjectToRotate") as BasePart;

RunService.Heartbeat.Connect((delta) => {
	target.CFrame = replace(target.CFrame)
		.rotateY(ROTATION_ANGLE_PER_SECOND * delta)
		.toCFrame();
});

simple pet system

const pet = Workspace.WaitForChild("Pet") as BasePart;
const player = Players.LocalPlayer;

RunService.Heartbeat.Connect((delta) => {
	if (!player.Character) return;
	if (!player.Character.PrimaryPart) return;

	pet.CFrame = replace(player.Character.GetPivot())
		.backward(4)
		.inverseLerp(pet.CFrame, delta / 0.075)
		.toCFrame();
});

📚 Documentation

To start using this library, we need to study all types of operations, there are 4 of them

📐 absolute

These operations are independent of related cframe

  • position(x, y, z) updates position
  • angle(xDeg, yDeg, zDeg, xRad?, yRad?, zRad?) updates angle
  • lerp(target: CFrame, alpha) lerps replace to target by alpha
  • inverseLerp(from: CFrame, alpha) lerps target to replace by alpha

🧷 relative

operations of this type depend entirely on related cframe

  • move(x, y, z) moves position by value considering the angle
  • rotate(xDeg, yDeg, zDeg, xRad?, yRad?, zRad?) rotates angle considering current angle
  • forward(value) moves position forward
  • backward(value) moves position backward
  • left(value) moves position left
  • right(value) moves position right
  • up(value) moves position up
  • down(value) moves position down
  • rotateX(deg, rad?) rotates x by math.rad(deg) + rad
  • rotateY(deg, rad?) rotates y by math.rad(deg) + rad
  • rotateZ(deg, rad?) rotates z by math.rad(deg) + rad

⚖️ switch

allows you to change the logic of relativity

  • world() converts current position & angle to world space
  • relative(to: CFrame) Replace will assume that position and angle in to space
  • asRelative(to: CFrame) will convert position & angle from world to to space

✉️ finaliters

operations of this type allow you to convert replace back to roblox formats

the main purpose of this library is to simplify CFrame, not Vector3, so it is more difficult to work with them.

  • toCFrame() will convert to CFrame, recommended finaliter
  • toVector3() will convert to Vector3 be careful, it doesn't take into account the angle, only relative operations related to move are taken into account
  • toRotatedVector3() will convert to Vector3, but this operation takes into account angle, be careful don't use move related operations before this operation