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

@moishy/cfop

v0.4.0

Published

A solver for the CFOP speedsolving method (cross, F2L, OLL, PLL), producing human-executable solutions ranked by turning ergonomics.

Readme

@moishy/cfop

A solver for the CFOP method — cross, F2L, OLL, PLL — producing human-executable solutions ranked by turning ergonomics.

deno add jsr:@moishy/cfop    # Deno
npm  install @moishy/cfop    # Node
import { cfop } from "@moishy/cfop";

const res = await cfop.solve("R U2 F' L D B2 R' U F2 D' L2 B R2 U' F D2 B' L U2 R'");
res.solutionString;
for (const seg of res.segments) console.log(seg.unitId, seg.strategyId, seg.cost);

What it does

Seven core steps: cross, f2l1–f2l4, oll, pll. The package is configuration only — every step is assembled in @moishy/steps, because none of them is CFOP's alone.

The four F2L steps are interchangeable. No step names a slot. The goal of step N is "the cross is intact and at least N slots are solved", and its lookup offers all four slots' cases at once, so runPhase's existing "try every alg, keep the cheapest that reaches the goal" is the pair race. Which pair each step takes is decided by cost, per scramble.

Two consequences worth knowing:

  • An already-solved slot costs nothing. That is what will let an X-cross replace only the cross step — an X-cross is a normal F2L with one pair pre-solved, not a separate process.
  • The last slot is an ordinary Step, so a last-slot variant is a Replacement over [f2l4, f2l4] and Winter/Summer Variation a checkpoint Extra over [f2l4, oll].

Rotations are used. CFOP's F2L data contains them and they are executed as written; the frame an alg leaves is the state the next step continues from. Slots are tracked by cubie so a rotation never changes which pair a step means, and slotAt maps back to the physical position for display.

Not here yet

  • X-cross, as a compete Replacement over [cross, cross].
  • Last-slot variants (ZBLS, OLS) and Winter/Summer Variation. The data is authored for the FR slot, while CFOP's last slot is whichever one the first three steps did not take.
  • Two-look OLL. APB's ocllPll and collEpll are not reusable: OCLL and COLL both assume the last-layer edges are already oriented, which APB guarantees with a core EO step and CFOP does not. A real two-look OLL is edge orientation then OCLL, which needs the edge-orienting cases as their own set.

Pre-1.0: solves are verified end to end across 20 scrambles, but the API is not frozen.