Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ampersand-chess-state

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ampersand-chess-state - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

lib/partial.js

5

ampersand-chess.js

@@ -5,6 +5,7 @@ var raf = require('raf');

var Engine = require('chess.js').Chess;
var partial = require('./lib/partial');
var runEngine = require('./lib/runEngine');
var runOnFen = runEngine(['fen']);
var runOnPgn = runEngine(['pgn']);
var runOnFen = partial(runEngine, ['fen']);
var runOnPgn = partial(runEngine, ['pgn']);

@@ -11,0 +12,0 @@ // Used for loading possibly invalid pgns without

@@ -1,5 +0,4 @@

var curry = require('curry');
var GUARD_KEY = '__engine_guard';
module.exports = curry(function runEngine (prop, method, guard) {
module.exports = function runEngine (prop, method, guard) {
return {

@@ -32,2 +31,2 @@ // guard means this property will be "frozen" once the game is finished

};
});
};
{
"name": "ampersand-chess-state",
"description": "An evented chess library for movement, validation and result detection built on Ampersand.js.",
"version": "0.0.1",
"version": "0.1.0",
"author": "Luke Karrys <luke@lukekarrys.com>",
"dependencies": {
"ampersand-state": "^4.4.4",
"chess.js": "^0.1.0",
"curry": "^1.2.0",
"chess.js": "git+ssh://git@github.com/jhlywa/chess.js.git#master",
"raf": "^2.0.4"

@@ -11,0 +10,0 @@ },

10

README.md

@@ -60,3 +60,3 @@ ampersand-chess-state

## `props`
### `props`

@@ -84,3 +84,3 @@ #### `fen` (string)

## `derived`
### `derived`

@@ -156,3 +156,3 @@ #### `future` (array)

## Methods
### Methods

@@ -186,7 +186,7 @@ All these methods change the position in someway and will trigger changes in `fen` and `pgn`. They take an `options` object as the last parameter which will be passed along when `set` is called on `fen` and/or `pgn`.

### Tests
## Tests
Run `npm test` for the command line tests (using phantomjs) or `npm start` to open a browser with the tests.
### LICENSE
## LICENSE
MIT

@@ -50,3 +50,3 @@ var test = require('tape');

t.equal(chess.pgn, '[SetUp "2n1r3/p1k2pp1/B1p3b1/P7/5bP1/2N1B3/1P2KP2/2R5 b - - 4 25"]\n[FEN "1"]\n');
t.equal(chess.pgn, '[SetUp "1"]\n[FEN "2n1r3/p1k2pp1/B1p3b1/P7/5bP1/2N1B3/1P2KP2/2R5 b - - 4 25"]\n');

@@ -444,3 +444,3 @@ t.end();

chess.fen = 'rnbqkbnr/p1pppp1p/1p6/6p1/8/2NPP3/PPPQ1PPP/R1B1KBNR w KQkq - 0 5';
t.equal(chess.pgn, '[SetUp "rnbqkbnr/p1pppp1p/1p6/6p1/8/2NPP3/PPPQ1PPP/R1B1KBNR w KQkq - 0 5"]\n[FEN "1"]\n');
t.equal(chess.pgn, '[SetUp "1"]\n[FEN "rnbqkbnr/p1pppp1p/1p6/6p1/8/2NPP3/PPPQ1PPP/R1B1KBNR w KQkq - 0 5"]\n');

@@ -447,0 +447,0 @@ t.end();

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