Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note, device) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        @feedback = new apns.Feedback(conf)
        # Handle Apple Feedbacks
        @feedback.on 'feedback', (feedbackData) =>
            @logger?.debug("APNS feedback returned #{feedbackData.length} devices")
            feedbackData.forEach (item) =>
                tokenResolver 'apns', item.device.toString(), (subscriber) =>
                    subscriber?.get (info) =>
                        if info.updated < item.time
                            @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                            subscriber.delete()

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            device = new apns.Device(info.token)
            device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert

            badge = parseInt(info.badge)
            if payload.incrementBadge
                badge += 1

            note.badge = badge if not isNaN(badge)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.pushNotification note, device
            # On iOS we have to maintain the badge counter on the server
            if payload.incrementBadge
                subscriber.incr 'badge'
```

Response:
var PushServiceAPNS, apns,
  indexOf = [].indexOf;

apns = require('apn');

PushServiceAPNS = (function() {
  class PushServiceAPNS {
    validateToken(token) {
      if (PushServiceAPNS.prototype.tokenFormat.test(token)) {
        return token.toLowerCase();
      }
    }

    constructor(conf, logger, tokenResolver) {
      this.logger = logger;
      conf.errorCallback = (errCode, note, device) => {
        var ref;
        return (ref = this.logger) != null ? ref.error(`APNS Error ${errCode} for subscriber ${device != null ? device.subscriberId : void 0}`) : void 0;
      };
      this.driver = new apns.Connection(conf);
      this.payloadFilter = conf.payloadFilter;
      this.feedback = new apns.Feedback(conf);
      // Handle Apple Feedbacks
      this.feedback.on('feedback', (feedbackData) => {
        var ref;
        if ((ref = this.logger) != null) {
          ref.debug(`APNS feedback returned ${feedbackData.length} devices`);
        }
        return feedbackData.forEach((item) => {
          return tokenResolver('apns', item.device.toString(), (subscriber) => {
            return subscriber != null ? subscriber.get((info) => {
              var ref1;
              if (info.updated < item.time) {
                if ((ref1 = this.logger) != null) {
                  ref1.warn(`APNS Automatic unregistration for subscriber ${subscriber.id}`);
                }
                return subscriber.delete();
              }
            }) : void 0;
          });
        });
      });
    }

    push(subscriber, subOptions, payload) {
      return subscriber.get((info) => {
        var alert, badge, device, key, note, ref, val;
        note = new apns.Notification();
        device = new apns.Device(info.token);
        device.subscriberId = subscriber.id; // used for error logging
        if ((subOptions != null ? subOptions.ignore_message : void 0) !== true && (alert = payload.localizedMessage(info.lang))) {
          note.alert = alert;
        }
        badge = parseInt(info.badge);
        if (payload.incrementBadge) {
          badge += 1;
        }
        if (!isNaN(badge)) {
          note.badge = badge;
        }
        note.sound = payload.sound;
        if (this.payloadFilter != null) {
          ref = payload.data;
          for (key in ref) {
            val = ref[key];
            if (indexOf.call(this.payloadFilter, key) >= 0) {
              note.payload[key] = val;
            }
          }
        } else {
          note.payload = payload.data;
        }
        this.driver.pushNotification(note, device);
        // On iOS we have to maintain the badge counter on the server
        if (payload.incrementBadge) {
          return subscriber.incr('badge');
        }
      });
    }

  };

  PushServiceAPNS.prototype.tokenFormat = /^[0-9a-f]{64}$/i;

  return PushServiceAPNS;

}).call(this);


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var PushServiceAPNS, apns,
  indexOf = [].indexOf;

apns = require('apn');

PushServiceAPNS = (function() {
  class PushServiceAPNS {
    validateToken(token) {
      if (PushServiceAPNS.prototype.tokenFormat.test(token)) {
        return token.toLowerCase();
      }
    }

    constructor(conf, logger, tokenResolver) {
      this.logger = logger;
      conf.errorCallback = (errCode, note, device) => {
        var ref;
        return (ref = this.logger) != null ? ref.error(`APNS Error ${errCode} for subscriber ${device != null ? device.subscriberId : void 0}`) : void 0;
      };
      this.driver = new apns.Connection(conf);
      this.payloadFilter = conf.payloadFilter;
      this.feedback = new apns.Feedback(conf);
      // Handle Apple Feedbacks
      this.feedback.on('feedback', (feedbackData) => {
        var ref;
        if ((ref = this.logger) != null) {
          ref.debug(`APNS feedback returned ${feedbackData.length} devices`);
        }
        return feedbackData.forEach((item) => {
          return tokenResolver('apns', item.device.toString(), (subscriber) => {
            return subscriber != null ? subscriber.get((info) => {
              var ref1;
              if (info.updated < item.time) {
                if ((ref1 = this.logger) != null) {
                  ref1.warn(`APNS Automatic unregistration for subscriber ${subscriber.id}`);
                }
                return subscriber.delete();
              }
            }) : void 0;
          });
        });
      });
    }

    push(subscriber, subOptions, payload) {
      return subscriber.get((info) => {
        var alert, badge, device, key, note, ref, val;
        note = new apns.Notification();
        device = new apns.Device(info.token);
        device.subscriberId = subscriber.id; // used for error logging
        if ((subOptions != null ? subOptions.ignore_message : void 0) !== true && (alert = payload.localizedMessage(info.lang))) {
          note.alert = alert;
        }
        badge = parseInt(info.badge);
        if (payload.incrementBadge) {
          badge += 1;
        }
        if (!isNaN(badge)) {
          note.badge = badge;
        }
        note.sound = payload.sound;
        if (this.payloadFilter != null) {
          ref = payload.data;
          for (key in ref) {
            val = ref[key];
            if (indexOf.call(this.payloadFilter, key) >= 0) {
              note.payload[key] = val;
            }
          }
        } else {
          note.payload = payload.data;
        }
        this.driver.pushNotification(note, device);
        // On iOS we have to maintain the badge counter on the server
        if (payload.incrementBadge) {
          return subscriber.incr('badge');
        }
      });
    }

  };

  PushServiceAPNS.prototype.tokenFormat = /^[0-9a-f]{64}$/i;

  return PushServiceAPNS;

}).call(this);
```

Response:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note, device) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        @feedback = new apns.Feedback(conf)
        # Handle Apple Feedbacks
        @feedback.on 'feedback', (feedbackData) =>
            @logger?.debug("APNS feedback returned #{feedbackData.length} devices")
            feedbackData.forEach (item) =>
                tokenResolver 'apns', item.device.toString(), (subscriber) =>
                    subscriber?.get (info) =>
                        if info.updated < item.time
                            @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                            subscriber.delete()

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            device = new apns.Device(info.token)
            device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert

            badge = parseInt(info.badge)
            if payload.incrementBadge
                badge += 1

            note.badge = badge if not isNaN(badge)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.pushNotification note, device
            # On iOS we have to maintain the badge counter on the server
            if payload.incrementBadge
                subscriber.incr 'badge'


Prompt:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note, device) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        @feedback = new apns.Feedback(conf)
        # Handle Apple Feedbacks
        @feedback.on 'feedback', (feedbackData) =>
            @logger?.debug("APNS feedback returned #{feedbackData.length} devices")
            feedbackData.forEach (item) =>
                tokenResolver 'apns', item.device.toString(), (subscriber) =>
                    subscriber?.get (info) =>
                        if info.updated < item.time
                            @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                            subscriber.delete()

Response:
push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            device = new apns.Device(info.token)
            device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert

            badge = parseInt(info.badge)
            if payload.incrementBadge
                badge += 1

            note.badge = badge if not isNaN(badge)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.pushNotification note, device
            # On iOS we have to maintain the badge counter on the server
            if payload.incrementBadge
                subscriber.incr 'badge'


Response:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note, device) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        @feedback = new apns.Feedback(conf)
        # Handle Apple Feedbacks
        @feedback.on 'feedback', (feedbackData) =>
            @logger?.debug("APNS feedback returned #{feedbackData.length} devices")
            feedbackData.forEach (item) =>
                tokenResolver 'apns', item.device.toString(), (subscriber) =>
                    subscriber?.get (info) ->
                        if info.updated < item.time
                            @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                            subscriber.delete()

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            device = new apns.Device(info.token)
            device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert

            badge = parseInt(info.badge)
            if payload.incrementBadge
                badge += 1

            note.badge = badge if not isNaN(badge)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.pushNotification note, device
            # On iOS we have to maintain the badge counter on the server
            if payload.incrementBadge
                subscriber.incr 'badge'


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note, device) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        @feedback = new apns.Feedback(conf)
        # Handle Apple Feedbacks
        @feedback.on 'feedback', (feedbackData) =>
            @logger?.debug("APNS feedback returned #{feedbackData.length} devices")
            feedbackData.forEach (item) =>
                tokenResolver 'apns', item.device.toString(), (subscriber) =>
                    subscriber?.get (info) ->
                        if info.updated < item.time
                            @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                            subscriber.delete()

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            device = new apns.Device(info.token)
            device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert

            badge = parseInt(info.badge)
            if payload.incrementBadge
                badge += 1

            note.badge = badge if not isNaN(badge)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.pushNotification note, device
            # On iOS we have to maintain the badge counter on the server
            if payload.incrementBadge
                subscriber.incr 'badge'
```

Response:
var PushServiceAPNS, apns,
  indexOf = [].indexOf;

apns = require('apn');

PushServiceAPNS = (function() {
  class PushServiceAPNS {
    validateToken(token) {
      if (PushServiceAPNS.prototype.tokenFormat.test(token)) {
        return token.toLowerCase();
      }
    }

    constructor(conf, logger, tokenResolver) {
      this.logger = logger;
      conf.errorCallback = (errCode, note, device) => {
        var ref;
        return (ref = this.logger) != null ? ref.error(`APNS Error ${errCode} for subscriber ${device != null ? device.subscriberId : void 0}`) : void 0;
      };
      this.driver = new apns.Connection(conf);
      this.payloadFilter = conf.payloadFilter;
      this.feedback = new apns.Feedback(conf);
      // Handle Apple Feedbacks
      this.feedback.on('feedback', (feedbackData) => {
        var ref;
        if ((ref = this.logger) != null) {
          ref.debug(`APNS feedback returned ${feedbackData.length} devices`);
        }
        return feedbackData.forEach((item) => {
          return tokenResolver('apns', item.device.toString(), (subscriber) => {
            return subscriber != null ? subscriber.get(function(info) {
              var ref1;
              if (info.updated < item.time) {
                if ((ref1 = this.logger) != null) {
                  ref1.warn(`APNS Automatic unregistration for subscriber ${subscriber.id}`);
                }
                return subscriber.delete();
              }
            }) : void 0;
          });
        });
      });
    }

    push(subscriber, subOptions, payload) {
      return subscriber.get((info) => {
        var alert, badge, device, key, note, ref, val;
        note = new apns.Notification();
        device = new apns.Device(info.token);
        device.subscriberId = subscriber.id; // used for error logging
        if ((subOptions != null ? subOptions.ignore_message : void 0) !== true && (alert = payload.localizedMessage(info.lang))) {
          note.alert = alert;
        }
        badge = parseInt(info.badge);
        if (payload.incrementBadge) {
          badge += 1;
        }
        if (!isNaN(badge)) {
          note.badge = badge;
        }
        note.sound = payload.sound;
        if (this.payloadFilter != null) {
          ref = payload.data;
          for (key in ref) {
            val = ref[key];
            if (indexOf.call(this.payloadFilter, key) >= 0) {
              note.payload[key] = val;
            }
          }
        } else {
          note.payload = payload.data;
        }
        this.driver.pushNotification(note, device);
        // On iOS we have to maintain the badge counter on the server
        if (payload.incrementBadge) {
          return subscriber.incr('badge');
        }
      });
    }

  };

  PushServiceAPNS.prototype.tokenFormat = /^[0-9a-f]{64}$/i;

  return PushServiceAPNS;

}).call(this);


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var PushServiceAPNS, apns,
  indexOf = [].indexOf;

apns = require('apn');

PushServiceAPNS = (function() {
  class PushServiceAPNS {
    validateToken(token) {
      if (PushServiceAPNS.prototype.tokenFormat.test(token)) {
        return token.toLowerCase();
      }
    }

    constructor(conf, logger, tokenResolver) {
      this.logger = logger;
      conf.errorCallback = (errCode, note, device) => {
        var ref;
        return (ref = this.logger) != null ? ref.error(`APNS Error ${errCode} for subscriber ${device != null ? device.subscriberId : void 0}`) : void 0;
      };
      this.driver = new apns.Connection(conf);
      this.payloadFilter = conf.payloadFilter;
      this.feedback = new apns.Feedback(conf);
      // Handle Apple Feedbacks
      this.feedback.on('feedback', (feedbackData) => {
        var ref;
        if ((ref = this.logger) != null) {
          ref.debug(`APNS feedback returned ${feedbackData.length} devices`);
        }
        return feedbackData.forEach((item) => {
          return tokenResolver('apns', item.device.toString(), (subscriber) => {
            return subscriber != null ? subscriber.get(function(info) {
              var ref1;
              if (info.updated < item.time) {
                if ((ref1 = this.logger) != null) {
                  ref1.warn(`APNS Automatic unregistration for subscriber ${subscriber.id}`);
                }
                return subscriber.delete();
              }
            }) : void 0;
          });
        });
      });
    }

    push(subscriber, subOptions, payload) {
      return subscriber.get((info) => {
        var alert, badge, device, key, note, ref, val;
        note = new apns.Notification();
        device = new apns.Device(info.token);
        device.subscriberId = subscriber.id; // used for error logging
        if ((subOptions != null ? subOptions.ignore_message : void 0) !== true && (alert = payload.localizedMessage(info.lang))) {
          note.alert = alert;
        }
        badge = parseInt(info.badge);
        if (payload.incrementBadge) {
          badge += 1;
        }
        if (!isNaN(badge)) {
          note.badge = badge;
        }
        note.sound = payload.sound;
        if (this.payloadFilter != null) {
          ref = payload.data;
          for (key in ref) {
            val = ref[key];
            if (indexOf.call(this.payloadFilter, key) >= 0) {
              note.payload[key] = val;
            }
          }
        } else {
          note.payload = payload.data;
        }
        this.driver.pushNotification(note, device);
        // On iOS we have to maintain the badge counter on the server
        if (payload.incrementBadge) {
          return subscriber.incr('badge');
        }
      });
    }

  };

  PushServiceAPNS.prototype.tokenFormat = /^[0-9a-f]{64}$/i;

  return PushServiceAPNS;

}).call(this);
```

Response:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note, device) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        @feedback = new apns.Feedback(conf)
        # Handle Apple Feedbacks
        @feedback.on 'feedback', (feedbackData) =>
            @logger?.debug("APNS feedback returned #{feedbackData.length} devices")
            feedbackData.forEach (item) =>
                tokenResolver 'apns', item.device.toString(), (subscriber) =>
                    subscriber?.get (info) ->
                        if info.updated < item.time
                            @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                            subscriber.delete()

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            device = new apns.Device(info.token)
            device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert

            badge = parseInt(info.badge)
            if payload.incrementBadge
                badge += 1

            note.badge = badge if not isNaN(badge)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.pushNotification note, device
            # On iOS we have to maintain the badge counter on the server
            if payload.incrementBadge
                subscriber.incr 'badge'


Prompt:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note, device) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        @feedback = new apns.Feedback(conf)
        # Handle Apple Feedbacks
        @feedback.on 'feedback', (feedbackData) =>
            @logger?.debug("APNS feedback returned #{feedbackData.length} devices")
            feedbackData.forEach (item) =>
                tokenResolver 'apns', item.device.toString(), (subscriber) =>
                    subscriber?.get (info) ->
                        if info.updated < item.time
                            @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                            subscriber.delete()

Response:
push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            device = new apns.Device(info.token)
            device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert

            badge = parseInt(info.badge)
            if payload.incrementBadge
                badge += 1

            note.badge = badge if not isNaN(badge)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.pushNotification note, device
            # On iOS we have to maintain the badge counter on the server
            if payload.incrementBadge
                subscriber.incr 'badge'


Response:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note, device) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        @feedback = new apns.Feedback(conf)
        # Handle Apple Feedbacks
        @feedback.on 'feedback', (feedbackData) =>
            feedbackData.forEach (item) =>
                tokenResolver 'apns', item.device.toString(), (subscriber) =>
                    subscriber?.get (info) ->
                        if info.updated < item.time
                            @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                            subscriber.delete()

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            device = new apns.Device(info.token)
            device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert

            badge = parseInt(info.badge)
            if payload.incrementBadge
                badge += 1

            note.badge = badge if not isNaN(badge)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.pushNotification note, device
            # On iOS we have to maintain the badge counter on the server
            if payload.incrementBadge
                subscriber.incr 'badge'


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note, device) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        @feedback = new apns.Feedback(conf)
        # Handle Apple Feedbacks
        @feedback.on 'feedback', (feedbackData) =>
            feedbackData.forEach (item) =>
                tokenResolver 'apns', item.device.toString(), (subscriber) =>
                    subscriber?.get (info) ->
                        if info.updated < item.time
                            @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                            subscriber.delete()

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            device = new apns.Device(info.token)
            device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert

            badge = parseInt(info.badge)
            if payload.incrementBadge
                badge += 1

            note.badge = badge if not isNaN(badge)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.pushNotification note, device
            # On iOS we have to maintain the badge counter on the server
            if payload.incrementBadge
                subscriber.incr 'badge'
```

Response:
var PushServiceAPNS, apns,
  indexOf = [].indexOf;

apns = require('apn');

PushServiceAPNS = (function() {
  class PushServiceAPNS {
    validateToken(token) {
      if (PushServiceAPNS.prototype.tokenFormat.test(token)) {
        return token.toLowerCase();
      }
    }

    constructor(conf, logger, tokenResolver) {
      this.logger = logger;
      conf.errorCallback = (errCode, note, device) => {
        var ref;
        return (ref = this.logger) != null ? ref.error(`APNS Error ${errCode} for subscriber ${device != null ? device.subscriberId : void 0}`) : void 0;
      };
      this.driver = new apns.Connection(conf);
      this.payloadFilter = conf.payloadFilter;
      this.feedback = new apns.Feedback(conf);
      // Handle Apple Feedbacks
      this.feedback.on('feedback', (feedbackData) => {
        return feedbackData.forEach((item) => {
          return tokenResolver('apns', item.device.toString(), (subscriber) => {
            return subscriber != null ? subscriber.get(function(info) {
              var ref;
              if (info.updated < item.time) {
                if ((ref = this.logger) != null) {
                  ref.warn(`APNS Automatic unregistration for subscriber ${subscriber.id}`);
                }
                return subscriber.delete();
              }
            }) : void 0;
          });
        });
      });
    }

    push(subscriber, subOptions, payload) {
      return subscriber.get((info) => {
        var alert, badge, device, key, note, ref, val;
        note = new apns.Notification();
        device = new apns.Device(info.token);
        device.subscriberId = subscriber.id; // used for error logging
        if ((subOptions != null ? subOptions.ignore_message : void 0) !== true && (alert = payload.localizedMessage(info.lang))) {
          note.alert = alert;
        }
        badge = parseInt(info.badge);
        if (payload.incrementBadge) {
          badge += 1;
        }
        if (!isNaN(badge)) {
          note.badge = badge;
        }
        note.sound = payload.sound;
        if (this.payloadFilter != null) {
          ref = payload.data;
          for (key in ref) {
            val = ref[key];
            if (indexOf.call(this.payloadFilter, key) >= 0) {
              note.payload[key] = val;
            }
          }
        } else {
          note.payload = payload.data;
        }
        this.driver.pushNotification(note, device);
        // On iOS we have to maintain the badge counter on the server
        if (payload.incrementBadge) {
          return subscriber.incr('badge');
        }
      });
    }

  };

  PushServiceAPNS.prototype.tokenFormat = /^[0-9a-f]{64}$/i;

  return PushServiceAPNS;

}).call(this);


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var PushServiceAPNS, apns,
  indexOf = [].indexOf;

apns = require('apn');

PushServiceAPNS = (function() {
  class PushServiceAPNS {
    validateToken(token) {
      if (PushServiceAPNS.prototype.tokenFormat.test(token)) {
        return token.toLowerCase();
      }
    }

    constructor(conf, logger, tokenResolver) {
      this.logger = logger;
      conf.errorCallback = (errCode, note, device) => {
        var ref;
        return (ref = this.logger) != null ? ref.error(`APNS Error ${errCode} for subscriber ${device != null ? device.subscriberId : void 0}`) : void 0;
      };
      this.driver = new apns.Connection(conf);
      this.payloadFilter = conf.payloadFilter;
      this.feedback = new apns.Feedback(conf);
      // Handle Apple Feedbacks
      this.feedback.on('feedback', (feedbackData) => {
        return feedbackData.forEach((item) => {
          return tokenResolver('apns', item.device.toString(), (subscriber) => {
            return subscriber != null ? subscriber.get(function(info) {
              var ref;
              if (info.updated < item.time) {
                if ((ref = this.logger) != null) {
                  ref.warn(`APNS Automatic unregistration for subscriber ${subscriber.id}`);
                }
                return subscriber.delete();
              }
            }) : void 0;
          });
        });
      });
    }

    push(subscriber, subOptions, payload) {
      return subscriber.get((info) => {
        var alert, badge, device, key, note, ref, val;
        note = new apns.Notification();
        device = new apns.Device(info.token);
        device.subscriberId = subscriber.id; // used for error logging
        if ((subOptions != null ? subOptions.ignore_message : void 0) !== true && (alert = payload.localizedMessage(info.lang))) {
          note.alert = alert;
        }
        badge = parseInt(info.badge);
        if (payload.incrementBadge) {
          badge += 1;
        }
        if (!isNaN(badge)) {
          note.badge = badge;
        }
        note.sound = payload.sound;
        if (this.payloadFilter != null) {
          ref = payload.data;
          for (key in ref) {
            val = ref[key];
            if (indexOf.call(this.payloadFilter, key) >= 0) {
              note.payload[key] = val;
            }
          }
        } else {
          note.payload = payload.data;
        }
        this.driver.pushNotification(note, device);
        // On iOS we have to maintain the badge counter on the server
        if (payload.incrementBadge) {
          return subscriber.incr('badge');
        }
      });
    }

  };

  PushServiceAPNS.prototype.tokenFormat = /^[0-9a-f]{64}$/i;

  return PushServiceAPNS;

}).call(this);
```

Response:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note, device) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        @feedback = new apns.Feedback(conf)
        # Handle Apple Feedbacks
        @feedback.on 'feedback', (feedbackData) =>
            feedbackData.forEach (item) =>
                tokenResolver 'apns', item.device.toString(), (subscriber) =>
                    subscriber?.get (info) ->
                        if info.updated < item.time
                            @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                            subscriber.delete()

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            device = new apns.Device(info.token)
            device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert

            badge = parseInt(info.badge)
            if payload.incrementBadge
                badge += 1

            note.badge = badge if not isNaN(badge)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.pushNotification note, device
            # On iOS we have to maintain the badge counter on the server
            if payload.incrementBadge
                subscriber.incr 'badge'


Prompt:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note, device) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        @feedback = new apns.Feedback(conf)
        # Handle Apple Feedbacks
        @feedback.on 'feedback', (feedbackData) =>
            feedbackData.forEach (item) =>
                tokenResolver 'apns', item.device.toString(), (subscriber) =>
                    subscriber?.get (info) ->
                        if info.updated < item.time
                            @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                            subscriber.delete()

Response:
push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            device = new apns.Device(info.token)
            device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert

            badge = parseInt(info.badge)
            if payload.incrementBadge
                badge += 1

            note.badge = badge if not isNaN(badge)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.pushNotification note, device
            # On iOS we have to maintain the badge counter on the server
            if payload.incrementBadge
                subscriber.incr 'badge'


Response:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note, device) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        @feedback = new apns.Feedback(conf)
        # Handle Apple Feedbacks
        @feedback.on 'feedback', (feedbackData) =>
            feedbackData.forEach (item) =>
                tokenResolver 'apns', item.device.toString(), (subscriber) =>
                    subscriber?.get (info) ->
                        if info.updated < item.time
                            @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                            subscriber.delete()

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            device = new apns.Device(info.token)
            device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert
            note.badge = badge if not isNaN(badge = parseInt(info.badge) + 1)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.pushNotification note, device
            # On iOS we have to maintain the badge counter on the server
            subscriber.incr 'badge'

exports.PushServiceAPNS = PushServiceAPNS


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note, device) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        @feedback = new apns.Feedback(conf)
        # Handle Apple Feedbacks
        @feedback.on 'feedback', (feedbackData) =>
            feedbackData.forEach (item) =>
                tokenResolver 'apns', item.device.toString(), (subscriber) =>
                    subscriber?.get (info) ->
                        if info.updated < item.time
                            @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                            subscriber.delete()

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            device = new apns.Device(info.token)
            device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert
            note.badge = badge if not isNaN(badge = parseInt(info.badge) + 1)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.pushNotification note, device
            # On iOS we have to maintain the badge counter on the server
            subscriber.incr 'badge'

exports.PushServiceAPNS = PushServiceAPNS
```

Response:
var PushServiceAPNS, apns,
  indexOf = [].indexOf;

apns = require('apn');

PushServiceAPNS = (function() {
  class PushServiceAPNS {
    validateToken(token) {
      if (PushServiceAPNS.prototype.tokenFormat.test(token)) {
        return token.toLowerCase();
      }
    }

    constructor(conf, logger, tokenResolver) {
      this.logger = logger;
      conf.errorCallback = (errCode, note, device) => {
        var ref;
        return (ref = this.logger) != null ? ref.error(`APNS Error ${errCode} for subscriber ${device != null ? device.subscriberId : void 0}`) : void 0;
      };
      this.driver = new apns.Connection(conf);
      this.payloadFilter = conf.payloadFilter;
      this.feedback = new apns.Feedback(conf);
      // Handle Apple Feedbacks
      this.feedback.on('feedback', (feedbackData) => {
        return feedbackData.forEach((item) => {
          return tokenResolver('apns', item.device.toString(), (subscriber) => {
            return subscriber != null ? subscriber.get(function(info) {
              var ref;
              if (info.updated < item.time) {
                if ((ref = this.logger) != null) {
                  ref.warn(`APNS Automatic unregistration for subscriber ${subscriber.id}`);
                }
                return subscriber.delete();
              }
            }) : void 0;
          });
        });
      });
    }

    push(subscriber, subOptions, payload) {
      return subscriber.get((info) => {
        var alert, badge, device, key, note, ref, val;
        note = new apns.Notification();
        device = new apns.Device(info.token);
        device.subscriberId = subscriber.id; // used for error logging
        if ((subOptions != null ? subOptions.ignore_message : void 0) !== true && (alert = payload.localizedMessage(info.lang))) {
          note.alert = alert;
        }
        if (!isNaN(badge = parseInt(info.badge) + 1)) {
          note.badge = badge;
        }
        note.sound = payload.sound;
        if (this.payloadFilter != null) {
          ref = payload.data;
          for (key in ref) {
            val = ref[key];
            if (indexOf.call(this.payloadFilter, key) >= 0) {
              note.payload[key] = val;
            }
          }
        } else {
          note.payload = payload.data;
        }
        this.driver.pushNotification(note, device);
        // On iOS we have to maintain the badge counter on the server
        return subscriber.incr('badge');
      });
    }

  };

  PushServiceAPNS.prototype.tokenFormat = /^[0-9a-f]{64}$/i;

  return PushServiceAPNS;

}).call(this);

exports.PushServiceAPNS = PushServiceAPNS;


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var PushServiceAPNS, apns,
  indexOf = [].indexOf;

apns = require('apn');

PushServiceAPNS = (function() {
  class PushServiceAPNS {
    validateToken(token) {
      if (PushServiceAPNS.prototype.tokenFormat.test(token)) {
        return token.toLowerCase();
      }
    }

    constructor(conf, logger, tokenResolver) {
      this.logger = logger;
      conf.errorCallback = (errCode, note, device) => {
        var ref;
        return (ref = this.logger) != null ? ref.error(`APNS Error ${errCode} for subscriber ${device != null ? device.subscriberId : void 0}`) : void 0;
      };
      this.driver = new apns.Connection(conf);
      this.payloadFilter = conf.payloadFilter;
      this.feedback = new apns.Feedback(conf);
      // Handle Apple Feedbacks
      this.feedback.on('feedback', (feedbackData) => {
        return feedbackData.forEach((item) => {
          return tokenResolver('apns', item.device.toString(), (subscriber) => {
            return subscriber != null ? subscriber.get(function(info) {
              var ref;
              if (info.updated < item.time) {
                if ((ref = this.logger) != null) {
                  ref.warn(`APNS Automatic unregistration for subscriber ${subscriber.id}`);
                }
                return subscriber.delete();
              }
            }) : void 0;
          });
        });
      });
    }

    push(subscriber, subOptions, payload) {
      return subscriber.get((info) => {
        var alert, badge, device, key, note, ref, val;
        note = new apns.Notification();
        device = new apns.Device(info.token);
        device.subscriberId = subscriber.id; // used for error logging
        if ((subOptions != null ? subOptions.ignore_message : void 0) !== true && (alert = payload.localizedMessage(info.lang))) {
          note.alert = alert;
        }
        if (!isNaN(badge = parseInt(info.badge) + 1)) {
          note.badge = badge;
        }
        note.sound = payload.sound;
        if (this.payloadFilter != null) {
          ref = payload.data;
          for (key in ref) {
            val = ref[key];
            if (indexOf.call(this.payloadFilter, key) >= 0) {
              note.payload[key] = val;
            }
          }
        } else {
          note.payload = payload.data;
        }
        this.driver.pushNotification(note, device);
        // On iOS we have to maintain the badge counter on the server
        return subscriber.incr('badge');
      });
    }

  };

  PushServiceAPNS.prototype.tokenFormat = /^[0-9a-f]{64}$/i;

  return PushServiceAPNS;

}).call(this);

exports.PushServiceAPNS = PushServiceAPNS;
```

Response:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note, device) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        @feedback = new apns.Feedback(conf)
        # Handle Apple Feedbacks
        @feedback.on 'feedback', (feedbackData) =>
            feedbackData.forEach (item) =>
                tokenResolver 'apns', item.device.toString(), (subscriber) =>
                    subscriber?.get (info) ->
                        if info.updated < item.time
                            @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                            subscriber.delete()

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            device = new apns.Device(info.token)
            device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert
            note.badge = badge if not isNaN(badge = parseInt(info.badge) + 1)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.pushNotification note, device
            # On iOS we have to maintain the badge counter on the server
            subscriber.incr 'badge'

exports.PushServiceAPNS = PushServiceAPNS


Prompt:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note, device) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        @feedback = new apns.Feedback(conf)
        # Handle Apple Feedbacks
        @feedback.on 'feedback', (feedbackData) =>
            feedbackData.forEach (item) =>
                tokenResolver 'apns', item.device.toString(), (subscriber) =>
                    subscriber?.get (info) ->
                        if info.updated < item.time

Response:
@logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                            subscriber.delete()

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            device = new apns.Device(info.token)
            device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert
            note.badge = badge if not isNaN(badge = parseInt(info.badge) + 1)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.pushNotification note, device
            # On iOS we have to maintain the badge counter on the server
            subscriber.incr 'badge'

exports.PushServiceAPNS = PushServiceAPNS


Response:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note, device) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        @feedback = new apns.Feedback(conf)
        # Handle Apple Feedbacks
        @feedback.on 'feedback', (time, tokenBuffer) =>
            tokenResolver 'apns', tokenBuffer.toString(), (subscriber) =>
                subscriber?.get (info) ->
                    if info.updated < time
                        @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                        subscriber.delete()

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            device = new apns.Device(info.token)
            device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert
            note.badge = badge if not isNaN(badge = parseInt(info.badge) + 1)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.pushNotification note, device
            # On iOS we have to maintain the badge counter on the server
            subscriber.incr 'badge'

exports.PushServiceAPNS = PushServiceAPNS


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note, device) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        @feedback = new apns.Feedback(conf)
        # Handle Apple Feedbacks
        @feedback.on 'feedback', (time, tokenBuffer) =>
            tokenResolver 'apns', tokenBuffer.toString(), (subscriber) =>
                subscriber?.get (info) ->
                    if info.updated < time
                        @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                        subscriber.delete()

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            device = new apns.Device(info.token)
            device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert
            note.badge = badge if not isNaN(badge = parseInt(info.badge) + 1)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.pushNotification note, device
            # On iOS we have to maintain the badge counter on the server
            subscriber.incr 'badge'

exports.PushServiceAPNS = PushServiceAPNS
```

Response:
var PushServiceAPNS, apns,
  indexOf = [].indexOf;

apns = require('apn');

PushServiceAPNS = (function() {
  class PushServiceAPNS {
    validateToken(token) {
      if (PushServiceAPNS.prototype.tokenFormat.test(token)) {
        return token.toLowerCase();
      }
    }

    constructor(conf, logger, tokenResolver) {
      this.logger = logger;
      conf.errorCallback = (errCode, note, device) => {
        var ref;
        return (ref = this.logger) != null ? ref.error(`APNS Error ${errCode} for subscriber ${device != null ? device.subscriberId : void 0}`) : void 0;
      };
      this.driver = new apns.Connection(conf);
      this.payloadFilter = conf.payloadFilter;
      this.feedback = new apns.Feedback(conf);
      // Handle Apple Feedbacks
      this.feedback.on('feedback', (time, tokenBuffer) => {
        return tokenResolver('apns', tokenBuffer.toString(), (subscriber) => {
          return subscriber != null ? subscriber.get(function(info) {
            var ref;
            if (info.updated < time) {
              if ((ref = this.logger) != null) {
                ref.warn(`APNS Automatic unregistration for subscriber ${subscriber.id}`);
              }
              return subscriber.delete();
            }
          }) : void 0;
        });
      });
    }

    push(subscriber, subOptions, payload) {
      return subscriber.get((info) => {
        var alert, badge, device, key, note, ref, val;
        note = new apns.Notification();
        device = new apns.Device(info.token);
        device.subscriberId = subscriber.id; // used for error logging
        if ((subOptions != null ? subOptions.ignore_message : void 0) !== true && (alert = payload.localizedMessage(info.lang))) {
          note.alert = alert;
        }
        if (!isNaN(badge = parseInt(info.badge) + 1)) {
          note.badge = badge;
        }
        note.sound = payload.sound;
        if (this.payloadFilter != null) {
          ref = payload.data;
          for (key in ref) {
            val = ref[key];
            if (indexOf.call(this.payloadFilter, key) >= 0) {
              note.payload[key] = val;
            }
          }
        } else {
          note.payload = payload.data;
        }
        this.driver.pushNotification(note, device);
        // On iOS we have to maintain the badge counter on the server
        return subscriber.incr('badge');
      });
    }

  };

  PushServiceAPNS.prototype.tokenFormat = /^[0-9a-f]{64}$/i;

  return PushServiceAPNS;

}).call(this);

exports.PushServiceAPNS = PushServiceAPNS;


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var PushServiceAPNS, apns,
  indexOf = [].indexOf;

apns = require('apn');

PushServiceAPNS = (function() {
  class PushServiceAPNS {
    validateToken(token) {
      if (PushServiceAPNS.prototype.tokenFormat.test(token)) {
        return token.toLowerCase();
      }
    }

    constructor(conf, logger, tokenResolver) {
      this.logger = logger;
      conf.errorCallback = (errCode, note, device) => {
        var ref;
        return (ref = this.logger) != null ? ref.error(`APNS Error ${errCode} for subscriber ${device != null ? device.subscriberId : void 0}`) : void 0;
      };
      this.driver = new apns.Connection(conf);
      this.payloadFilter = conf.payloadFilter;
      this.feedback = new apns.Feedback(conf);
      // Handle Apple Feedbacks
      this.feedback.on('feedback', (time, tokenBuffer) => {
        return tokenResolver('apns', tokenBuffer.toString(), (subscriber) => {
          return subscriber != null ? subscriber.get(function(info) {
            var ref;
            if (info.updated < time) {
              if ((ref = this.logger) != null) {
                ref.warn(`APNS Automatic unregistration for subscriber ${subscriber.id}`);
              }
              return subscriber.delete();
            }
          }) : void 0;
        });
      });
    }

    push(subscriber, subOptions, payload) {
      return subscriber.get((info) => {
        var alert, badge, device, key, note, ref, val;
        note = new apns.Notification();
        device = new apns.Device(info.token);
        device.subscriberId = subscriber.id; // used for error logging
        if ((subOptions != null ? subOptions.ignore_message : void 0) !== true && (alert = payload.localizedMessage(info.lang))) {
          note.alert = alert;
        }
        if (!isNaN(badge = parseInt(info.badge) + 1)) {
          note.badge = badge;
        }
        note.sound = payload.sound;
        if (this.payloadFilter != null) {
          ref = payload.data;
          for (key in ref) {
            val = ref[key];
            if (indexOf.call(this.payloadFilter, key) >= 0) {
              note.payload[key] = val;
            }
          }
        } else {
          note.payload = payload.data;
        }
        this.driver.pushNotification(note, device);
        // On iOS we have to maintain the badge counter on the server
        return subscriber.incr('badge');
      });
    }

  };

  PushServiceAPNS.prototype.tokenFormat = /^[0-9a-f]{64}$/i;

  return PushServiceAPNS;

}).call(this);

exports.PushServiceAPNS = PushServiceAPNS;
```

Response:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note, device) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        @feedback = new apns.Feedback(conf)
        # Handle Apple Feedbacks
        @feedback.on 'feedback', (time, tokenBuffer) =>
            tokenResolver 'apns', tokenBuffer.toString(), (subscriber) =>
                subscriber?.get (info) ->
                    if info.updated < time
                        @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                        subscriber.delete()

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            device = new apns.Device(info.token)
            device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert
            note.badge = badge if not isNaN(badge = parseInt(info.badge) + 1)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.pushNotification note, device
            # On iOS we have to maintain the badge counter on the server
            subscriber.incr 'badge'

exports.PushServiceAPNS = PushServiceAPNS


Prompt:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note, device) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        @feedback = new apns.Feedback(conf)
        # Handle Apple Feedbacks
        @feedback.on 'feedback', (time, tokenBuffer) =>
            tokenResolver 'apns', tokenBuffer.toString(), (subscriber) =>
                subscriber?.get (info) ->
                    if info.updated < time
                        @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")

Response:
subscriber.delete()

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            device = new apns.Device(info.token)
            device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert
            note.badge = badge if not isNaN(badge = parseInt(info.badge) + 1)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.pushNotification note, device
            # On iOS we have to maintain the badge counter on the server
            subscriber.incr 'badge'

exports.PushServiceAPNS = PushServiceAPNS


Response:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{note?.device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        # Handle Apple Feedbacks
        conf.feedback = (time, tokenBuffer) =>
            tokenResolver 'apns', tokenBuffer.toString(), (subscriber) =>
                subscriber?.get (info) ->
                    if info.updated < time
                        @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                        subscriber.delete()
        @feedback = new apns.Feedback(conf)

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            note.device = new apns.Device(info.token)
            note.device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert
            note.badge = badge if not isNaN(badge = parseInt(info.badge) + 1)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.sendNotification note
            # On iOS we have to maintain the badge counter on the server
            subscriber.incr 'badge'

exports.PushServiceAPNS = PushServiceAPNS


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{note?.device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        # Handle Apple Feedbacks
        conf.feedback = (time, tokenBuffer) =>
            tokenResolver 'apns', tokenBuffer.toString(), (subscriber) =>
                subscriber?.get (info) ->
                    if info.updated < time
                        @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                        subscriber.delete()
        @feedback = new apns.Feedback(conf)

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            note.device = new apns.Device(info.token)
            note.device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert
            note.badge = badge if not isNaN(badge = parseInt(info.badge) + 1)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.sendNotification note
            # On iOS we have to maintain the badge counter on the server
            subscriber.incr 'badge'

exports.PushServiceAPNS = PushServiceAPNS
```

Response:
var PushServiceAPNS, apns,
  indexOf = [].indexOf;

apns = require('apn');

PushServiceAPNS = (function() {
  class PushServiceAPNS {
    validateToken(token) {
      if (PushServiceAPNS.prototype.tokenFormat.test(token)) {
        return token.toLowerCase();
      }
    }

    constructor(conf, logger, tokenResolver) {
      this.logger = logger;
      conf.errorCallback = (errCode, note) => {
        var ref, ref1;
        return (ref = this.logger) != null ? ref.error(`APNS Error ${errCode} for subscriber ${note != null ? (ref1 = note.device) != null ? ref1.subscriberId : void 0 : void 0}`) : void 0;
      };
      this.driver = new apns.Connection(conf);
      this.payloadFilter = conf.payloadFilter;
      // Handle Apple Feedbacks
      conf.feedback = (time, tokenBuffer) => {
        return tokenResolver('apns', tokenBuffer.toString(), (subscriber) => {
          return subscriber != null ? subscriber.get(function(info) {
            var ref;
            if (info.updated < time) {
              if ((ref = this.logger) != null) {
                ref.warn(`APNS Automatic unregistration for subscriber ${subscriber.id}`);
              }
              return subscriber.delete();
            }
          }) : void 0;
        });
      };
      this.feedback = new apns.Feedback(conf);
    }

    push(subscriber, subOptions, payload) {
      return subscriber.get((info) => {
        var alert, badge, key, note, ref, val;
        note = new apns.Notification();
        note.device = new apns.Device(info.token);
        note.device.subscriberId = subscriber.id; // used for error logging
        if ((subOptions != null ? subOptions.ignore_message : void 0) !== true && (alert = payload.localizedMessage(info.lang))) {
          note.alert = alert;
        }
        if (!isNaN(badge = parseInt(info.badge) + 1)) {
          note.badge = badge;
        }
        note.sound = payload.sound;
        if (this.payloadFilter != null) {
          ref = payload.data;
          for (key in ref) {
            val = ref[key];
            if (indexOf.call(this.payloadFilter, key) >= 0) {
              note.payload[key] = val;
            }
          }
        } else {
          note.payload = payload.data;
        }
        this.driver.sendNotification(note);
        // On iOS we have to maintain the badge counter on the server
        return subscriber.incr('badge');
      });
    }

  };

  PushServiceAPNS.prototype.tokenFormat = /^[0-9a-f]{64}$/i;

  return PushServiceAPNS;

}).call(this);

exports.PushServiceAPNS = PushServiceAPNS;


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var PushServiceAPNS, apns,
  indexOf = [].indexOf;

apns = require('apn');

PushServiceAPNS = (function() {
  class PushServiceAPNS {
    validateToken(token) {
      if (PushServiceAPNS.prototype.tokenFormat.test(token)) {
        return token.toLowerCase();
      }
    }

    constructor(conf, logger, tokenResolver) {
      this.logger = logger;
      conf.errorCallback = (errCode, note) => {
        var ref, ref1;
        return (ref = this.logger) != null ? ref.error(`APNS Error ${errCode} for subscriber ${note != null ? (ref1 = note.device) != null ? ref1.subscriberId : void 0 : void 0}`) : void 0;
      };
      this.driver = new apns.Connection(conf);
      this.payloadFilter = conf.payloadFilter;
      // Handle Apple Feedbacks
      conf.feedback = (time, tokenBuffer) => {
        return tokenResolver('apns', tokenBuffer.toString(), (subscriber) => {
          return subscriber != null ? subscriber.get(function(info) {
            var ref;
            if (info.updated < time) {
              if ((ref = this.logger) != null) {
                ref.warn(`APNS Automatic unregistration for subscriber ${subscriber.id}`);
              }
              return subscriber.delete();
            }
          }) : void 0;
        });
      };
      this.feedback = new apns.Feedback(conf);
    }

    push(subscriber, subOptions, payload) {
      return subscriber.get((info) => {
        var alert, badge, key, note, ref, val;
        note = new apns.Notification();
        note.device = new apns.Device(info.token);
        note.device.subscriberId = subscriber.id; // used for error logging
        if ((subOptions != null ? subOptions.ignore_message : void 0) !== true && (alert = payload.localizedMessage(info.lang))) {
          note.alert = alert;
        }
        if (!isNaN(badge = parseInt(info.badge) + 1)) {
          note.badge = badge;
        }
        note.sound = payload.sound;
        if (this.payloadFilter != null) {
          ref = payload.data;
          for (key in ref) {
            val = ref[key];
            if (indexOf.call(this.payloadFilter, key) >= 0) {
              note.payload[key] = val;
            }
          }
        } else {
          note.payload = payload.data;
        }
        this.driver.sendNotification(note);
        // On iOS we have to maintain the badge counter on the server
        return subscriber.incr('badge');
      });
    }

  };

  PushServiceAPNS.prototype.tokenFormat = /^[0-9a-f]{64}$/i;

  return PushServiceAPNS;

}).call(this);

exports.PushServiceAPNS = PushServiceAPNS;
```

Response:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{note?.device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        # Handle Apple Feedbacks
        conf.feedback = (time, tokenBuffer) =>
            tokenResolver 'apns', tokenBuffer.toString(), (subscriber) =>
                subscriber?.get (info) ->
                    if info.updated < time
                        @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                        subscriber.delete()
        @feedback = new apns.Feedback(conf)

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            note.device = new apns.Device(info.token)
            note.device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert
            note.badge = badge if not isNaN(badge = parseInt(info.badge) + 1)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.sendNotification note
            # On iOS we have to maintain the badge counter on the server
            subscriber.incr 'badge'

exports.PushServiceAPNS = PushServiceAPNS


Prompt:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{note?.device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        # Handle Apple Feedbacks
        conf.feedback = (time, tokenBuffer) =>
            tokenResolver 'apns', tokenBuffer.toString(), (subscriber) =>
                subscriber?.get (info) ->
                    if info.updated < time
                        @logger?.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                        subscriber.delete()

Response:
@feedback = new apns.Feedback(conf)

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            note.device = new apns.Device(info.token)
            note.device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert
            note.badge = badge if not isNaN(badge = parseInt(info.badge) + 1)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.sendNotification note
            # On iOS we have to maintain the badge counter on the server
            subscriber.incr 'badge'

exports.PushServiceAPNS = PushServiceAPNS


Response:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{note?.device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        # Handle Apple Feedbacks
        conf.feedback = (time, tokenBuffer) ->
            tokenResolver 'apns', tokenBuffer.toString(), (subscriber) =>
                subscriber?.get (info) ->
                    if info.updated < time
                        @logger.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                        subscriber.delete()
        @feedback = new apns.Feedback(conf)

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            note.device = new apns.Device(info.token)
            note.device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert
            note.badge = badge if not isNaN(badge = parseInt(info.badge) + 1)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.sendNotification note
            # On iOS we have to maintain the badge counter on the server
            subscriber.incr 'badge'

exports.PushServiceAPNS = PushServiceAPNS


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{note?.device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        # Handle Apple Feedbacks
        conf.feedback = (time, tokenBuffer) ->
            tokenResolver 'apns', tokenBuffer.toString(), (subscriber) =>
                subscriber?.get (info) ->
                    if info.updated < time
                        @logger.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                        subscriber.delete()
        @feedback = new apns.Feedback(conf)

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            note.device = new apns.Device(info.token)
            note.device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert
            note.badge = badge if not isNaN(badge = parseInt(info.badge) + 1)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.sendNotification note
            # On iOS we have to maintain the badge counter on the server
            subscriber.incr 'badge'

exports.PushServiceAPNS = PushServiceAPNS
```

Response:
var PushServiceAPNS, apns,
  indexOf = [].indexOf;

apns = require('apn');

PushServiceAPNS = (function() {
  class PushServiceAPNS {
    validateToken(token) {
      if (PushServiceAPNS.prototype.tokenFormat.test(token)) {
        return token.toLowerCase();
      }
    }

    constructor(conf, logger, tokenResolver) {
      this.logger = logger;
      conf.errorCallback = (errCode, note) => {
        var ref, ref1;
        return (ref = this.logger) != null ? ref.error(`APNS Error ${errCode} for subscriber ${note != null ? (ref1 = note.device) != null ? ref1.subscriberId : void 0 : void 0}`) : void 0;
      };
      this.driver = new apns.Connection(conf);
      this.payloadFilter = conf.payloadFilter;
      // Handle Apple Feedbacks
      conf.feedback = function(time, tokenBuffer) {
        return tokenResolver('apns', tokenBuffer.toString(), (subscriber) => {
          return subscriber != null ? subscriber.get(function(info) {
            if (info.updated < time) {
              this.logger.warn(`APNS Automatic unregistration for subscriber ${subscriber.id}`);
              return subscriber.delete();
            }
          }) : void 0;
        });
      };
      this.feedback = new apns.Feedback(conf);
    }

    push(subscriber, subOptions, payload) {
      return subscriber.get((info) => {
        var alert, badge, key, note, ref, val;
        note = new apns.Notification();
        note.device = new apns.Device(info.token);
        note.device.subscriberId = subscriber.id; // used for error logging
        if ((subOptions != null ? subOptions.ignore_message : void 0) !== true && (alert = payload.localizedMessage(info.lang))) {
          note.alert = alert;
        }
        if (!isNaN(badge = parseInt(info.badge) + 1)) {
          note.badge = badge;
        }
        note.sound = payload.sound;
        if (this.payloadFilter != null) {
          ref = payload.data;
          for (key in ref) {
            val = ref[key];
            if (indexOf.call(this.payloadFilter, key) >= 0) {
              note.payload[key] = val;
            }
          }
        } else {
          note.payload = payload.data;
        }
        this.driver.sendNotification(note);
        // On iOS we have to maintain the badge counter on the server
        return subscriber.incr('badge');
      });
    }

  };

  PushServiceAPNS.prototype.tokenFormat = /^[0-9a-f]{64}$/i;

  return PushServiceAPNS;

}).call(this);

exports.PushServiceAPNS = PushServiceAPNS;


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var PushServiceAPNS, apns,
  indexOf = [].indexOf;

apns = require('apn');

PushServiceAPNS = (function() {
  class PushServiceAPNS {
    validateToken(token) {
      if (PushServiceAPNS.prototype.tokenFormat.test(token)) {
        return token.toLowerCase();
      }
    }

    constructor(conf, logger, tokenResolver) {
      this.logger = logger;
      conf.errorCallback = (errCode, note) => {
        var ref, ref1;
        return (ref = this.logger) != null ? ref.error(`APNS Error ${errCode} for subscriber ${note != null ? (ref1 = note.device) != null ? ref1.subscriberId : void 0 : void 0}`) : void 0;
      };
      this.driver = new apns.Connection(conf);
      this.payloadFilter = conf.payloadFilter;
      // Handle Apple Feedbacks
      conf.feedback = function(time, tokenBuffer) {
        return tokenResolver('apns', tokenBuffer.toString(), (subscriber) => {
          return subscriber != null ? subscriber.get(function(info) {
            if (info.updated < time) {
              this.logger.warn(`APNS Automatic unregistration for subscriber ${subscriber.id}`);
              return subscriber.delete();
            }
          }) : void 0;
        });
      };
      this.feedback = new apns.Feedback(conf);
    }

    push(subscriber, subOptions, payload) {
      return subscriber.get((info) => {
        var alert, badge, key, note, ref, val;
        note = new apns.Notification();
        note.device = new apns.Device(info.token);
        note.device.subscriberId = subscriber.id; // used for error logging
        if ((subOptions != null ? subOptions.ignore_message : void 0) !== true && (alert = payload.localizedMessage(info.lang))) {
          note.alert = alert;
        }
        if (!isNaN(badge = parseInt(info.badge) + 1)) {
          note.badge = badge;
        }
        note.sound = payload.sound;
        if (this.payloadFilter != null) {
          ref = payload.data;
          for (key in ref) {
            val = ref[key];
            if (indexOf.call(this.payloadFilter, key) >= 0) {
              note.payload[key] = val;
            }
          }
        } else {
          note.payload = payload.data;
        }
        this.driver.sendNotification(note);
        // On iOS we have to maintain the badge counter on the server
        return subscriber.incr('badge');
      });
    }

  };

  PushServiceAPNS.prototype.tokenFormat = /^[0-9a-f]{64}$/i;

  return PushServiceAPNS;

}).call(this);

exports.PushServiceAPNS = PushServiceAPNS;
```

Response:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{note?.device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        # Handle Apple Feedbacks
        conf.feedback = (time, tokenBuffer) ->
            tokenResolver 'apns', tokenBuffer.toString(), (subscriber) =>
                subscriber?.get (info) ->
                    if info.updated < time
                        @logger.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                        subscriber.delete()
        @feedback = new apns.Feedback(conf)

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            note.device = new apns.Device(info.token)
            note.device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert
            note.badge = badge if not isNaN(badge = parseInt(info.badge) + 1)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.sendNotification note
            # On iOS we have to maintain the badge counter on the server
            subscriber.incr 'badge'

exports.PushServiceAPNS = PushServiceAPNS


Prompt:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{note?.device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        # Handle Apple Feedbacks
        conf.feedback = (time, tokenBuffer) ->
            tokenResolver 'apns', tokenBuffer.toString(), (subscriber) =>
                subscriber?.get (info) ->
                    if info.updated < time
                        @logger.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                        subscriber.delete()

Response:
@feedback = new apns.Feedback(conf)

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            note.device = new apns.Device(info.token)
            note.device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert
            note.badge = badge if not isNaN(badge = parseInt(info.badge) + 1)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.sendNotification note
            # On iOS we have to maintain the badge counter on the server
            subscriber.incr 'badge'

exports.PushServiceAPNS = PushServiceAPNS


Response:
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{note?.device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        # Handle Apple Feedbacks
        conf.feedback = (time, apnsSubscriber) ->
            tokenResolver 'apns', apnsSubscriber.hexToken(), (subscriber) =>
                subscriber?.get (info) ->
                    if info.updated < time
                        @logger.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                        subscriber.delete()
        @feedback = new apns.Feedback(conf)

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            note.device = new apns.Device(info.token)
            note.device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert
            note.badge = badge if not isNaN(badge = parseInt(info.badge) + 1)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.sendNotification note
            # On iOS we have to maintain the badge counter on the server
            subscriber.incr 'badge'

exports.PushServiceAPNS = PushServiceAPNS


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
apns = require 'apn'

class PushServiceAPNS
    tokenFormat: /^[0-9a-f]{64}$/i
    validateToken: (token) ->
        if PushServiceAPNS::tokenFormat.test(token)
            return token.toLowerCase()

    constructor: (conf, @logger, tokenResolver) ->
        conf.errorCallback = (errCode, note) =>
            @logger?.error("APNS Error #{errCode} for subscriber #{note?.device?.subscriberId}")
        @driver = new apns.Connection(conf)

        @payloadFilter = conf.payloadFilter

        # Handle Apple Feedbacks
        conf.feedback = (time, apnsSubscriber) ->
            tokenResolver 'apns', apnsSubscriber.hexToken(), (subscriber) =>
                subscriber?.get (info) ->
                    if info.updated < time
                        @logger.warn("APNS Automatic unregistration for subscriber #{subscriber.id}")
                        subscriber.delete()
        @feedback = new apns.Feedback(conf)

    push: (subscriber, subOptions, payload) ->
        subscriber.get (info) =>
            note = new apns.Notification()
            note.device = new apns.Device(info.token)
            note.device.subscriberId = subscriber.id # used for error logging
            if subOptions?.ignore_message isnt true and alert = payload.localizedMessage(info.lang)
                note.alert = alert
            note.badge = badge if not isNaN(badge = parseInt(info.badge) + 1)
            note.sound = payload.sound
            if @payloadFilter?
                for key, val of payload.data
                    note.payload[key] = val if key in @payloadFilter
            else
                note.payload = payload.data
            @driver.sendNotification note
            # On iOS we have to maintain the badge counter on the server
            subscriber.incr 'badge'

exports.PushServiceAPNS = PushServiceAPNS
```

Response:
var PushServiceAPNS, apns,
  indexOf = [].indexOf;

apns = require('apn');

PushServiceAPNS = (function() {
  class PushServiceAPNS {
    validateToken(token) {
      if (PushServiceAPNS.prototype.tokenFormat.test(token)) {
        return token.toLowerCase();
      }
    }

    constructor(conf, logger, tokenResolver) {
      this.logger = logger;
      conf.errorCallback = (errCode, note) => {
        var ref, ref1;
        return (ref = this.logger) != null ? ref.error(`APNS Error ${errCode} for subscriber ${note != null ? (ref1 = note.device) != null ? ref1.subscriberId : void 0 : void 0}`) : void 0;
      };
      this.driver = new apns.Connection(conf);
      this.payloadFilter = conf.payloadFilter;
      // Handle Apple Feedbacks
      conf.feedback = function(time, apnsSubscriber) {
        return tokenResolver('apns', apnsSubscriber.hexToken(), (subscriber) => {
          return subscriber != null ? subscriber.get(function(info) {
            if (info.updated < time) {
              this.logger.warn(`APNS Automatic unregistration for subscriber ${subscriber.id}`);
              return subscriber.delete();
            }
          }) : void 0;
        });
      };
      this.feedback = new apns.Feedback(conf);
    }

    push(subscriber, subOptions, payload) {
      return subscriber.get((info) => {
        var alert, badge, key, note, ref, val;
        note = new apns.Notification();
        note.device = new apns.Device(info.token);
        note.device.subscriberId = subscriber.id; // used for error logging
        if ((subOptions != null ? subOptions.ignore_message : void 0) !== true && (alert = payload.localizedMessage(info.lang))) {
          note.alert = alert;
        }
        if (!isNaN(badge = parseInt(info.badge) + 1)) {
          note.badge = badge;
        }
        note.sound = payload.sound;
        if (this.payloadFilter != null) {
          ref = payload.data;
          for (key in ref) {
            val = ref[key];
            if (indexOf.call(this.payloadFilter, key) >= 0) {
              note.payload[key] = val;
            }
          }
        } else {
          note.payload = payload.data;
        }
        this.driver.sendNotification(note);
        // On iOS we have to maintain the badge counter on the server
        return subscriber.incr('badge');
      });
    }

  };

  PushServiceAPNS.prototype.tokenFormat = /^[0-9a-f]{64}$/i;

  return PushServiceAPNS;

}).call(this);

exports.PushServiceAPNS = PushServiceAPNS;