src/esc-pos-encoder.js
/**
     * Pulse
     *
     * @param  {number}          device  0 or 1 for on which pin the device is connected, default of 0
     * @param  {number}          on      Time the pulse is on in milliseconds, default of 100
     * @param  {number}          off     Time the pulse is off in milliseconds, default of 500
     * @return {object}                  Return the object, for easy chaining commands
     *
     */
Pulse
@param  {number}          device  0 or 1 for on which pin the device is connected, default of 0
@param  {number}          on      Time the pulse is on in milliseconds, default of 100
@param  {number}          off     Time the pulse is off in milliseconds, default of 500
@return {object}                  Return the object, for easy chaining commands
Pulse @param { number } device 0 or 1 for on which pin the device is connected default of 0 @param { number } on Time the pulse is on in milliseconds default of 100 @param { number } off Time the pulse is off in milliseconds default of 500 @return { object } Return the object for easy chaining commands
pulse(device, on, off) {
    if (this._embedded) {
      throw new Error('Pulse is not supported in table cells or boxes');
    }
    if (typeof device === 'undefined') {
      device = 0;
    }
    if (typeof on === 'undefined') {
      on = 100;
    }
    if (typeof off === 'undefined') {
      off = 500;
    }
    on = Math.min(500, Math.round(on / 2));
    off = Math.min(500, Math.round(off / 2));
    this._queue([
      0x1b, 0x70, device ? 1 : 0, on & 0xff, off & 0xff,
    ]);
    return this;
  }
pulse ( device , on , off ) { if ( this . _embedded ) { throw new Error ( 'Pulse is not supported in table cells or boxes' ) ; } if ( typeof device === 'undefined' ) { device = 0 ; } if ( typeof on === 'undefined' ) { on = 100 ; } if ( typeof off === 'undefined' ) { off = 500 ; } on = Math . min ( 500 , Math . round ( on / 2 ) ) ; off = Math . min ( 500 , Math . round ( off / 2 ) ) ; this . _queue ( [ 0x1b , 0x70 , device ? 1 : 0 , on & 0xff , off & 0xff , ] ) ; return this ; }
Pulse
 @param  {number}          device  0 or 1 for on which pin the device is connected, default of 0
 @param  {number}          on      Time the pulse is on in milliseconds, default of 100
 @param  {number}          off     Time the pulse is off in milliseconds, default of 500
 @return {object}                  Return the object, for easy chaining commands
Pulse @param { number } device 0 or 1 for on which pin the device is connected default of 0 @param { number } on Time the pulse is on in milliseconds default of 100 @param { number } off Time the pulse is off in milliseconds default of 500 @return { object } Return the object for easy chaining commands