Noctiflorous Pansy Mulch

    fizzbuzzify

    2.1.0 • Public • Published

    fizzbuzzify

    Travis status

    Turn numbers into their corresponding fizzbuzz result

    Usage

    Install:

    npm install fizzbuzzify

    Use:

    // es6 style import:
    import { fizzbuzzify } from "fizzbuzzify";
     
    // or cjs/node/browserify-style:
    var fizzbuzzify = require("fizzbuzzify")
     
    // then:
    console.log(fizzbuzzify(15)) // "FizzBuzz"

    fizzbuzzify is a named export because I'm preferring that style these days, but also a default export for legacy compatibility.

    Hacking and contribution

    The code is written in es6 and transpiled into the __build folder as es5 by babel. This is done automatically before publishing to npm by the prepublish script config.

    If you're working on this package and you want to generate the transpiled output, run:

    npm run prepublish

    Alternatively to keep babel running in watch mode while you work, run

    npm run watch

    Compatibility

    This code should work fine in node and browsers.

    Running tests

    As usual, you can run npm test to run the tests. This will fire up Karma and attempt to start a Firefox instance.

    When running in a Continuous Integration environment, the Karma configuration will run once and exit. Otherwise it will start up in "watch" mode.

    Alternatively you can run npm run mocha to run the tests directly in Mocha (not using Karma) or npm run mocha-watch to keep mocha running the background and re-running the tests when the code changes.

    For the love of gosh, why?

    This package is part of a larger project that's half joke and half genuine demonstration of "cool things in software development". Go see fizzbuzz-cli for the full write-up.

    Keywords

    none

    Install

    npm i fizzbuzzify

    DownloadsWeekly Downloads

    6

    Version

    2.1.0

    License

    ISC

    Unpacked Size

    7.58 kB

    Total Files

    7

    Last publish

    Collaborators

    • n3dst4