Showing 5 of 11 total issues
Function Record
has 241 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Record(rec) {
var CONTROL_FIELD_LIST = ['FMT', '001', '002', '003', '004', '005', '006', '007', '008', '009'];
if (rec !== undefined) {
File MarcRecord.js
has 315 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
{
leader: 'string',
fields: [
Function insertField
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.insertField = function(fieldDef, index) {
if (isArray(fieldDef)) {
if (fieldDef.length < 5) {
throw new Error('Data field array must contain at least 5 elements: [tag, i1, i2, subcode1, subvalue1]');
Function containsFieldWithValue
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.containsFieldWithValue = function() {
var args = Array.prototype.slice.call(arguments);
if (args.length < 2) {
throw new Error('At least 2 arguments are required');
}
Function isEqual
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Record.isEqual = function(record1, record2) {
return record1.leader === record2.leader && fieldsEqual(record1.fields, record2.fields);
function fieldsEqual(fields1, fields2) {