'use strict';

(function () {

  function _obj() {}

  _obj.prototype = {

    setNext: function (next) {
      this.next = next;
    },

    identify: function (phone) {
      if (phone && phone.match(/[a-z]/i)) {
        return '';
      } else if (phone && (phone.substring(0, 4) == '0300' ||
        phone.substring(0, 4) == '0500' ||
        phone.substring(0, 4) == '0800' ||
        phone.substring(0, 4) == '0900' ||
        phone.substring(0, 4) == '9090' ||
        phone.substring(0, 1) == '+')) {
        return '';
      }
      return this.next.identify(phone);
    }

  };

  exports.blackListIdentifier = _obj;
}());
