Showing 229 of 406 total issues
Function createView
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
createView : function(name, construct, varargs)
{
this.log("Creating view: " + name);
var db = this.__views;
Function scrollTo
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
scrollTo: function(left, top, animate, zoom) {
var self = this;
// Stop deceleration
Function tokenize
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
tokenize: function(text, nostrip)
{
if (jasy.Env.isSet("debug"))
{
core.Assert.isType(text, "String", "Template text must be type of string.");
Function sequence
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
sequence : function(tasks, context, arg1)
{
if (jasy.Env.isSet("debug"))
{
core.Assert.isType(tasks, "Array");
Function set
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
members.set = function(value)
{
var context=this, data, old;
// Wrap plain types to match property type
Function construct
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
construct: function()
{
this.__headElem = document.createElement("div");
this.__headElem.id = "head";
this.__headElem.innerHTML = "API Documentation";
Function get
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
get : function(property)
{
if (typeof property == "string")
{
var method = getters[property];
Function getValue
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
getValue : function(item)
{
if (jasy.Env.isSet("debug"))
{
core.Assert.isEqual(arguments.length, 1);
Function binb
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function binb(x, len)
{
/* append padding */
x[len >> 5] |= 0x80 << (24 - len % 32);
x[((len + 64 >> 9) << 4) + 15] = len;
Function VALUE
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
VALUE : (function(global, toString)
{
var engine;
if (jasy.Env.isSet("runtime", "browser"))
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function callback
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
callback: function(data, id) {
if (core.String.endsWith(id, ".mustache")) {
var templateName = id.substring(0, id.indexOf(".mustache"));
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
get : (function()
{
if (jasy.Env.isSet("runtime", "browser")) {
var items = location.search.substring(1).split("&");
} else {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function onreadystatechange
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
xhr.onreadystatechange = function()
{
if (xhr.readyState == 4)
{
try{
Function step
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
var step = function(virtual)
{
// Normalize virtual value
var render = virtual !== true;
Function encodeArrayOfBytes
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
var encodeArrayOfBytes = function(arr) {
// This works like a bit register. Take first 6 bits and push it to result. Take next 6 bits and so on.
// A special case is if the 6 bits represents 60, 61, 62 or 63. In this case one more bit is used to
// reduce 6 bit (= 64 different values) by two values.
var result = [];
Function reset
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
reset : function(property)
{
if (typeof property == "string")
{
var method = resetters[property];
Function load
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
load : function(uri, callback, context, nocache)
{
if (jasy.Env.isSet("debug"))
{
core.Assert.isType(uri, "String");
Function navigate
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
navigate : function(fragment, relation)
{
if (relation == "parent")
{
var destination = this.clone();
Function reset
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
members.reset = function()
{
var context, data, old, value;
context = this;
Function run
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
run : function()
{
if (this.__isRunning) {
return;
}