Showing 229 of 406 total issues
Function checkSetter
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
checkSetter : function(obj, config, args)
{
var name = config.name;
if (args.length == 0) {
Function __publish
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
__publish: function(left, top, zoom, animate) {
var self = this;
// Remember whether we had an animation, then we try to continue based on the current "drive" of the animation
Function load
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
load : function(uri, callback, context, nocache, timeout)
{
if (!context) {
context = global;
}
Function map
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var map = function(promisesOrValues, mapFunction, context)
{
if (jasy.Env.isSet("debug"))
{
core.Assert.isType(mapFunction, "Function", "Flow control map() requires second parameter to be an mapping function!");
Function scrollY
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Open
scrollY : function(element, align)
{
var parent = element.parentNode;
var doc = element.ownerDocument;
var body = doc.body;
- 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 decodeToArrayOfBytes
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var decodeToArrayOfBytes = function(arr) {
var result = [];
var current = 0;
var bitOffset = 0;
var charOffset = 0;
Function isValid
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
isValid : function(property, raise)
{
if (typeof property == "string")
{
var method = validators[property];
Function detect
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
detect : function(data)
{
return new core.event.Promise(function(resolve, reject) {
var url = "//maps.googleapis.com/maps/api/geocode/json?sensor=true&latlng=";
url += data.latitude + "," + data.longitude;
Function binb
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function binb(m, l)
{
var HASH = [1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225];
var W = new Array(64);
var a, b, c, d, e, f, g, h;
Function construct
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
construct : function(nativeEvent, eventType)
{
// We use the touchpoint for touch events
var isMouse = nativeEvent.type != null ? true : false;
- 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 isTypeOf
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
isTypeOf : function(value, type)
{
var result = false;
if (value == null)
Function getter
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var getter = function()
{
var context = this;
if (jasy.Env.isSet("debug")) {
Function doTouchStart
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
doTouchStart: function(touches, timeStamp) {
// Array-like check is enough here
if (touches.length == null) {
throw new Error("Invalid touch list: " + touches);
Function any
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
any : function(promisesOrValues)
{
if (jasy.Env.isSet("debug")) {
core.Assert.isType(promisesOrValues, "ArrayOrPromise");
}
Function __runNextSuite
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
__runNextSuite : function()
{
var previousSuite = this.__suites[this.__currentIndex];
var currentSuite = this.__suites[++this.__currentIndex];
Function checksum
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
checksum : (function()
{
var table =
[
0, 1996959894, 3993919788, 2567524794, 124634137, 1886057615, 3915621685, 2657392035, 249268274,
Function decompress64
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var decompress64 = function(encodedText) {
var marker = codePointAt(encodedText, 0);
if ((marker >> 4) !== MARKERINT) {
return encodedText;
}
Function construct
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
construct : function(nativeEvent, eventType)
{
// We use the touchpoint for touch events
var isMouse = nativeEvent.type != null ? true : false;
Function __onLoad
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
__onLoad : function() {
document.body.addEventListener('click', function(event) {
var element = event.target;
Function getImage
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getImage : function(id)
{
if (jasy.Env.isSet("debug")) {
core.Assert.isType(id, "String", "Invalid asset ID (no string): " + id + "!");
}