Socket
Socket
Sign inDemoInstall

chess.js

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chess.js - npm Package Compare versions

Comparing version 0.13.2 to 0.13.3

4

chess.js

@@ -435,3 +435,3 @@ /*

/* 2nd criterion: move number field is a integer value > 0? */
if (isNaN(tokens[5]) || parseInt(tokens[5], 10) <= 0) {
if (isNaN(parseInt(tokens[5])) || parseInt(tokens[5], 10) <= 0) {
return { valid: false, error_number: 2, error: errors[2] }

@@ -441,3 +441,3 @@ }

/* 3rd criterion: half move counter is an integer >= 0? */
if (isNaN(tokens[4]) || parseInt(tokens[4], 10) < 0) {
if (isNaN(parseInt(tokens[4])) || parseInt(tokens[4], 10) < 0) {
return { valid: false, error_number: 3, error: errors[3] }

@@ -444,0 +444,0 @@ }

{
"name": "chess.js",
"version": "0.13.2",
"version": "0.13.3",
"license": "BSD-2-Clause",

@@ -8,2 +8,3 @@ "type": "module",

"homepage": "https://github.com/jhlywa/chess.js",
"author": "Jeff Hlywa <jhlywa@gmail.com>",
"keywords": [

@@ -10,0 +11,0 @@ "chess"

@@ -15,12 +15,16 @@ # chess.js

To install the stable version:
Run the following command to install the most recent version of chess.js from NPM:
```
# NPM
npm install chess.js
```
# Yarn
yarn add chess.js
TypeScript type definitions for chess.js are provided by the community-supported
DefinitelyTyped repository and can be installed via:
```
npm install -D @types/chess.js
```
## Example Code

@@ -31,3 +35,3 @@

```js
import { Chess } from 'chess.js';
import { Chess } from 'chess.js'

@@ -738,11 +742,4 @@ const chess = new Chess()

## MUSIC
Musical support provided by:
- [The Grateful Dead](https://www.youtube.com/watch?v=z-D9rdJWfWs)
- [Umphrey's McGee](https://www.youtube.com/watch?v=auEfZVcYp64)
## BUGS
- The en passant square and castling flags aren't adjusted when using the put/remove functions (workaround: use .load() instead)

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc