ad

ascii-dance

Function to generate dances from a set of moves

Showing:

Popularity

Downloads/wk

2

GitHub Stars

0

Maintenance

Last Commit

7yrs ago

Contributors

1

Package

Dependencies

0

Size (min+gzip)

0.3KB

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

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

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100