Showing 4 of 4 total issues
File angular-model.js
has 315 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* AngularJS API Domain Model Service
*
* {@copyright 2015, Radify, Inc (http://radify.io/)}
* {@link https://github.com/radify/angular-model#readme}
Function $request
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $request(object, model, method, data, headers) {
var writeMethods = ['POST', 'PUT', 'PATCH'];
var defaultHeaders = {'Content-Type': 'application/json;charset=UTF-8'};
var isWrite = writeMethods.indexOf(method) > -1;
headers = extend({}, isWrite ? defaultHeaders : {}, headers);
Avoid deeply nested control flow statements. Open
Open
if (lisObject(item)) {
dst[prop].push(deepExtend({}, item));
} else if (isArray(item)) {
dst[prop].push(deepExtend([], item));
} else {
Function $request
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function $request(object, model, method, data, headers) {