kripod / mental-poker

A purely functional mental poker library, based on the thesis of Choongmin Lee.
MIT License
71 stars 16 forks source link

NPM package #7

Closed WilliamWCYoung closed 6 years ago

WilliamWCYoung commented 6 years ago

Hi @kripod,

I would like to use this repository within Node. I was wondering if you have wrapped this in an NPM package? If not, do you know how - or any pointers in the right direction?

I notice you use import which is ES6, whereas Node currently uses require.

Thanks in advance, Will

WilliamWCYoung commented 6 years ago

After noticing it already is an NPM package (silly me), I tried:

# npm install mental-poker

And wrote a simple index.js:

const { createConfig } = require('mental-poker');
const config = createConfig(52);
console.log(config);

Outputting:

{ cardCount: 52 }

Very happy, time to get hacking! Many thanks for this project, Will