Skip to content

Create random PNG file name

Dejan Toteff edited this page Jul 27, 2017 · 5 revisions

const R = require("rambdax")

const fileName = R.compose( R.join(""), R.append(".png"), R.flatten, R.map(x => R.take(2)(R.shuffle(R.split("", "qwertyuiopasdfghjk")))) )(R.range(0,5))

Note that R.shuffle is part of Rambdax

Clone this wiki locally