jspos
Version:
JavaScript ISO8583 ,JavaScript version of JPOS
53 lines (41 loc) • 1.68 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @author Sean sean.snow@live.com
* @date 2015/12/24
*/
var Padder = function () {
function Padder() {
_classCallCheck(this, Padder);
}
_createClass(Padder, [{
key: "pad",
/**
* Returns a padded string upto a maximum length. If the data is longer
* than maxLength, then the data is truncated.
*
* @param data
* The string to pad.
* @param maxLength
* The maximum length of the padded string.
* @return A padded string.
*/
value: function pad(data, maxLength) {}
/**
* Removes the padding from a padded string.
*
* @param paddedData
* The string to unpad.
* @return The unpadded string.
*/
}, {
key: "unpad",
value: function unpad(paddedData) {}
}]);
return Padder;
}();
exports.default = Padder;
;