ascii-dance

1.0.0 • Public • Published

ascii-dance

¯\_(ツ)_/¯ _/¯(ツ)¯\_ ¯\_(ツ)¯\_ _/¯(ツ)_/¯

Generate strings of any ascii people dancing in Node.js and the browser.

Based on kirby-dance by Nizar Khalife Iglesias.

Example

var dancer = require('ascii-dance'),
    shruggieDance = dancer([[
      "¯\\_(ツ)_/¯",
      "_/¯(ツ)¯\\_",
      "¯\\_(ツ)¯\\_",
      "_/¯(ツ)_/¯"
    ]]);
 
console.log(shruggieDance(4)); // "¯\_(ツ)_/¯ _/¯(ツ)¯\_ ¯\_(ツ)¯\_ _/¯(ツ)_/¯"
 
console.log(shruggieDance(-7)); // "_/¯(ツ)_/¯ ¯\_(ツ)¯\_ _/¯(ツ)¯\_ ¯\_(ツ)_/¯ _/¯(ツ)_/¯ ¯\_(ツ)¯\_ _/¯(ツ)¯\_"

API

dancer(moves)

Returns a functon that will generate dances, where moves is an array of one or more strings.

The returned dance is a function dance(n), which will return a string of n dance moves, where n is an integer. If n is negative, it reverses the dance (starting from the last move).

License

ISC

Readme

Keywords

Package Sidebar

Install

npm i ascii-dance

Weekly Downloads

4

Version

1.0.0

License

ISC

Last publish

Collaborators

  • davidmason