Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

helix-generator

surajm12ISC1.0.1

Generate string helix with ASCII.

readme

helix generator

generate a string of any two characters in combination.

installation

Install globally to use anywhere and get CLI a output a desired helix combination.

npm i -g helix-generator

Local installation can be done as follows.

npm i -S helix-generator

usage

Global usabe

helix-generator <helix arguments> -w <width> --cycles <number of cycles> 

Local Usage

import helixGenerator from 'helix-generator';

helixGenerator(<helix arguments>, <width default=8>, <number of cycles>);

example

CLI example

The following CLI input, with helix arguments 🍯 🐞 and two cycles as -c 2:

$ helix-generator 🍯 🐞 -c 2

will generate the following output:

 🍯          🐞
  🍯        🐞
   🍯      🐞
     🍯  🐞
       🍯
     🐞  🍯
   🐞      🍯
  🐞        🍯
 🐞          🍯
 🐞          🍯
  🐞        🍯
   🐞      🍯
     🐞  🍯
       🐞
     🍯  🐞
   🍯      🐞
  🍯        🐞
 🍯          🐞
 🍯          🐞
  🍯        🐞
   🍯      🐞
     🍯  🐞
       🍯
     🐞  🍯
   🐞      🍯
  🐞        🍯
 🐞          🍯
 🐞          🍯
  🐞        🍯
   🐞      🍯
     🐞  🍯
       🐞
     🍯  🐞
   🍯      🐞
  🍯        🐞
 🍯          🐞

Node example

Run the following commands to initialize npm and install helix-generator

npm init -y
npm i -S helix-generator

Then create an index.js file with the following line.

const generator = require('helix-generator');

console.log(generator(['🤡', '👿', '🤘🏽'], 4, 2));

This will yeild the following output.

🤡      👿      🤘🏽
  🤡        👿🤘🏽  
    🤡      🤘🏽👿  
        🤡🤘🏽    👿
      🤘🏽    🤡  👿
  🤘🏽          🤡  
🤘🏽          👿  🤡
🤘🏽        👿    🤡
  🤘🏽  👿      🤡  
  👿🤘🏽      🤡    
👿      🤘🏽🤡      
👿    🤡    🤘🏽    
  👿          🤘🏽  
🤡  👿          🤘🏽
🤡      👿      🤘🏽
  🤡        👿🤘🏽  
    🤡      🤘🏽👿  
        🤡🤘🏽    👿
      🤘🏽    🤡  👿
  🤘🏽          🤡  
🤘🏽          👿  🤡
🤘🏽        👿    🤡
  🤘🏽  👿      🤡  
  👿🤘🏽      🤡    
👿      🤘🏽🤡      
👿    🤡    🤘🏽    
  👿          🤘🏽  
🤡  👿          🤘🏽

incoming features

  • <input disabled="" type="checkbox"> output to file
  • <input disabled="" type="checkbox"> error messages
  • <input checked="" disabled="" type="checkbox"> implement as npm package
  • <input checked="" disabled="" type="checkbox"> dynamically changing template for 3+ symbols
  • <input checked="" disabled="" type="checkbox"> extendable number of symbols