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 🙏

© 2024 – Pkg Stats / Ryan Hefner

chlss

v1.0.0-beta.6

Published

Open-Source Chess Engine in TypeScript.

Downloads

14

Readme

chlss

GitHub package.json dynamic Run Tests npm npm

Simple chess library, well typed by TypeScript.

Versions

| # | DATE | TYPE | |--------------|:----------:|------| | 1.0.0-beta.1 | 07.08.2023 | beta | | 1.0.0-beta.2 | 21.08.2023 | beta | | 1.0.0-beta.3 | 21.08.2023 | beta | | 1.0.0-beta.4 | 23.08.2023 | beta | | 1.0.0-beta.5 | 23.08.2023 | beta |

Installation

npm i chlss

Tutorial

1. Initialize the board

import {BoardObj} from "chlss";

// Will create an empty board,
const board = new BoardObj();

// You can use constructor 
// parameter to specify initial FEN.

const boardWithFen = new BoardObj("<invalid-fen😅>");

2. Set FEN on board

const board = new BoardObj();

// Will load FEN position "FEN" to board.
board.fen("FEN");

3. Get the legal moves

import {IMove} from "./move";
const board = new BoardObj();

// Will return all legal moves in UCI.
const uci: string[] = board.legalMovesUci();

// Will return moves as chlss move.
const moves: IMove[] = board.legalMoves();

4. Push the move

const board = new BoardObj();

// Will push e4 move.
boardObj.pushUci("e2e4");

5. Get FEN representation of board.

const board = new BoardObj();

// Will return FEN representation of the board.
const fen = board.fen();

6. Is the game ended?

import {Termination} from "./termination";

const board = new BoardObj();

// Will return instance of Termination, 
// if the game is ended.
let t: Termination | undefined = board.getTermination();

7. Get colour to move

const board = new BoardObj();

// Will return colour to move.
const toMove: Colour = board.getColour();

Reporting an issues

chlss is well tested using thousands of random positions, but please report any issue you will see. Thank You 😎

Author

Kacper Faber