npm install --save cube-scrambler
import cubeScrambler from 'cube-scrambler';
cubeScrambler.scramble();
// ["U", "D2", "L'", ...]
Huge thanks to @jnrbsn who has written the core code for this module. Find the original repository here: jnrbsn/rubiks-cube-scrambler.
(I am just the guy who packaged it into a module!)
Code licensed under MIT.
Copyright Siddharth Kannan 2015.