0.2.0 • Published 5 years ago

babel-plugin-fizzbuzz v0.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

babel-plugin-fizzbuzz

Build Status tested with jest styled with prettier All Contributors

Babel Plugin for fizzbuzz

Why

https://gyazo.com/d2e1fb56701e997e3b592ae8a0f76c30

Do you need a TensorFlow for FizzBuzz? Funny 😂 What you need is Babel 😎

Install

npm:

$ npm install --save-dev babel-plugin-fizzbuzz

yarn:

$ yarn add --dev babel-plugin-fizzbuzz

Usage

.babelrc

{
  "plugins": ["babel-plugin-fizzbuzz"]
}

Examples

for (var i=0; i<100; i++) {
  console.log(i)
}

      ↓ ↓ ↓ ↓ ↓ ↓

for (var i = 0; i < 100; i++) {
  console.log(
    i % 15 === 0 ? 'FizzBuzz' : i % 3 === 0 ? 'Fizz' : i % 5 === 0 ? 'Buzz' : i
  )
}

Contributors

Thanks goes to these wonderful people (emoji key):

akameco💻 📖 ⚠️ 🚇

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

License

MIT © akameco