Arigato.JS is a Node.js library which provides many utility functions that can be used in various ways
- Random string, number and float generation
- String modification
- String hashing
- Array utility
It's recommended to use Node.js v8.0.0 or newer
$ npm i arigato.js # Using NPM
$ yarn add arigato.js # Using yarn
Chunking an Array into parts
const { array } = require( 'arigato.js' ); // Define arigato.js
const characters = [ 'a', 'b', 'c', 1, 2, 3 ]; // Define the array
const chunked = array.chunk( characters, 2 ); // Chunk up the array with 2 entries per chunk
console.log( chunked ); // [ [ 'a', 'b' ], [ 'c', 1 ], [ 2, 3 ] ]
Scrambling a string
const { random } = require( 'argiato.js' ); // Define arigato.js
const scrambled = random.scramble( 'scrambled'.split('') ); // Scramble the string
console.log( scrambled ); // cadsrelbm ( This may be diffrent for you )
If you have any ideas that you would like to see in arigato.js, you can request them here or here