Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

faro

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

faro

Faro out-shuffle a string

  • 0.2.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

README

Faro

Perform faro out-shuffle for a string or an array. More information about faro: https://en.wikipedia.org/wiki/Faro_shuffle

Installation

npm i -S faro

Usage:

const faro = require('faro');

const { shuffle, unshuffle } = faro;

console.log(shuffle('foobar'));     // Shows fboaor
console.log(unshuffle('fboaor'));   // Shows foobar

Unshuffle undoes what shuffle does. The other way around would work too.

You can do the same, but for arrays:

const faro = require('faro');

const { shuffleArray, unshuffleArray } = faro;

console.log(shuffleArray(['f','o','o','b','a','r']));
console.log(unshuffleArray(['f','b','o','a','o','r']));

The following functions are available:

shuffle
shuffleArray
unshuffle
unshuffleArray
weave
weaveArray
unweave
unweaveArray

weave and shuffle are aliases, as are unweave and unshuffle.

FAQs

Package last updated on 25 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc