Common utilities for the IronMan project components
Within this repository, you will be able to find the shared libraries for the multiple components making up the whole Project.
- Guidelines
- Shuffle to shuffle an array.
- Errors load an object of errors instances.
Please read our coding and workflow guidelines at scality/IronMan-Guidelines.
import { shuffle } from 'arsenal';
let array = [1, 2, 3, 4, 5];
shuffle(array);
console.log(array);
//[5, 3, 1, 2, 4]
import { errors } from 'arsenal';
console.log(errors.AccessDenied);
//{ [Error: AccessDenied]
// code: 403,
// description: 'Access Denied',
// AccessDenied: true }