This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This small gist is based on https://github.com/nastyox/Rando.js | |
* The idea of this gist is to have a compatible node and browser script that can replace Math.random() | |
* using crypto libraries built-in in node and browser and without the extra baggage for automatic object | |
* array o string behaviours | |
* it fallbacks to Math.random() | |
**/ | |
const rando = () => { | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\acme\Controller; | |
use Drupal\Core\Controller\ControllerBase; | |
class DefaultController extends ControllerBase | |
{ | |
/** |