MFHD : { Type : /[uvxy]{1}/, BLvl : /.{1}/ }
};
- MARC.Record._ff_pos = {
+ // See: http://jsperf.com/repeating-strings/11 -- stringFill4()
+ MARC.Record._padString = function (result, n, x) {
+ n = n - result.length;
+ if (!x) x = ' ';
+
+ for (var pad = '';;) {
+ if (n & 1) pad += x;
+ if (n >>= 1) x += x;
+ else break;
+ }
+
+ if (pad) result += pad;
+ return result;
+ }
+
+ MARC.Record._ff_pos = {
AccM : {
_8 : {
SCO : {start: 24, len : 6, def : ' ' },
MARC.Record.prototype.videorecordingFormatName = function () {
var _7 = this.field('007').data;
+ _7 = MARC.Record._padString(_7, 23);
if (_7 && _7.match(/^v/)) {
var _v_e = _7.substr(
MARC.Record.prototype.videorecordingFormatCode = function () {
var _7 = this.field('007').data;
+ _7 = MARC.Record._padString(_7, 23);
if (_7 && _7.match(/^v/)) {
return _7.substr(
var _8 = this.field('008').data;
var _6 = this.field('006').data;
+ _8 = MARC.Record._padString(_8, 40);
+ _6 = MARC.Record._padString(_6, 18);
+
var rtype = this.recordType();
var val;
var _l = this.leader;
var _8 = this.field('008').data;
var _6 = this.field('006').data;
+
+ _8 = MARC.Record._padString(_8, 40);
+ _6 = MARC.Record._padString(_6, 18);
var rtype = this.recordType();