@chinese-board-games/luzhanqi-util
v3.0.6
Published
Common utility functions shared between the front-end & back-end for luzhanqi.
Downloads
23
Readme
luzhanqi-util
Common utility functions for the Luzhanqi project.
Installation
npm i @chinese-board-games/luzhanqi-util
Usage
ES6 import
import * as luzhanqiUtil from '@chinese-board-games/luzhanqi-util';
// ...
luzhanqiUtil.isValidRow(0);
CommonJS require
const luzhanqiUtil = require('@chinese-board-games/luzhanqi-util');
// ...
luzhanqiUtil.isValidRow(0);
AMD require
require(['luzhanqiUtil'], function (luzhanqiUtil) {
// ...
luzhanqiUtil.isValidRow(0);
});
Script tag
<!doctype html>
<html>
...
<script src="https://unpkg.com/@chinese-board-games/luzhanqi-util"></script>
<script>
// ...
// Global variable
luzhanqiUtil.isValidRow(0);
// Property in the window object
window.luzhanqiUtil.isValidRow(0);
// ...
</script>
</html>
Examples
Coming soon!
API
The JSDocs for this project are hosted here.
Local Build
- Make sure you have Node v10 or greater installed on your system
- Clone the repository:
git clone https://github.com/chinese-board-games/luzhanqi-util.git
- Install the dependencies:
npm install
- Run the tests:
npm test
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.