name-battle

1.0.1 • Public • Published

name-battle

npm npm Build Status codecov Greenkeeper badge All Contributors

📛 Simulate battles in a parallel universe

The original concept for the sacred Name Battle was proposed by @vikram-ravindran during a magnificent state of pure lucidity during which he was capable of anything he so desired. He desired to unveil the Name Battle to the world, and so it was:

The purpose of this function is to simulate a battle in a parallel universe in which, when a person attacks another person (the target), they do so by absorbing letters in the target's name that match the attacker's name, and the percentage of letters left over gives the current life-force level of the target as a percentage (100% is full-health)

Installation

npm install name-battle

Usage

const nameBattle = require('name-battle')
 
nameBattle({ attacker: 'Vikram Ravindran', target: 'Michael Rose' })

API

Default Export

nameBattle(combatants)

Conducts a name battle between the specified combatants

Arguments

  1. combatants (Object): An object describing the participants in the Name Battle
  • combatants.attacker (String): The name of the attacker
  • combatants.target (String): The name of the target

Returns

(Number): The remaining Life Force of the target after they have been engaged in a Name Battle by the attacker

Contributors

Thanks goes to these wonderful people (emoji key):

Michael Rose
Michael Rose

🚇 ⚠️ 💻
Greenkeeper[bot]
Greenkeeper[bot]

🚇
allcontributors[bot]
allcontributors[bot]

📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Readme

Keywords

Package Sidebar

Install

npm i name-battle

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

6.39 kB

Total Files

4

Last publish

Collaborators

  • msrose