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.
$ npm install placevalue-ascii --save
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);
placevalue(
fn : (x int, y int): int,
height: int,
width: int,
placevalue: int,
offsetY: int,
offsetX: int
): string