Null Pointer Micromanagement

    osk

    1.0.2 • Public • Published

    Build Status

    osk

    Exports a function that returns a function which oscillates between minimum and maximum values, with a specified step

     
    var osk = require('osk');
     
    var myOsc = osk({
        min: 0,
        max: 3,
        inc: 1,
        reverse: false // default
    });
     
    myOsc(); // 0
     
     
    var myOsc = osk({
        min: 0,
        max: 3,
        inc: 1,
        reverse: true // runs backwards
    });
     
    myOsc(); // 3
     
    var myOsc = osk({
        min: 0,
        max: 3,
        inc: 1,
        reverse: true, // runs backwards
        start: 2
     
    });
     
    myOsc(); // 2, but running backwards now
     
     

    Install

    npm i osk

    DownloadsWeekly Downloads

    1

    Version

    1.0.2

    License

    MIT

    Last publish

    Collaborators

    • dazld