1.0.5 • Published 6 years ago
placevalue-ascii v1.0.5
Placevalue Ascii
This is a JavaScript port of Mouse Reeve's Python Placevalue Ascii project. See the original project README for a short illustration of how Placevalue works.
How to install
$ npm install placevalue-ascii --save
How to use
const placevalue = require('placevalue-ascii');
// an example from Mouse Reeve's website:
const str = placevalue(
(x, y) => 5 * Math.sqrt(Math.abs(x*x - y*y)),
50,
200,
7,
);
console.log(str);
API
placevalue(
fn : (x int, y int): int,
height: int,
width: int,
placevalue: int,
offsetY: int,
offsetX: int
): string