Showing 97 of 165 total issues
Function waitMessageResponse
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function waitMessageResponse(self, id, timeout, resolve, reject) {
var _myWindow = self.findMyWindow();
var listener = function responseListener(event) {
Function Assertion
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Assertion (obj, flag, parent) {
this.obj = obj;
this.flags = {};
if (undefined != parent) {
Function waitMessageResponse
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function waitMessageResponse(self, id, timeout, resolve, reject) {
var _myWindow = self.findMyWindow();
var listener = function responseListener(event) {
Function create
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function create(options) {
// create echo src-less iframe to talk to
var iframeHtml;
options = options || {};
if (!options.id) {
Function objEquiv
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function objEquiv (a, b) {
if (isUndefinedOrNull(a) || isUndefinedOrNull(b))
return false;
// an identical "prototype" property.
if (a.prototype !== b.prototype) return false;
Function handleThenable
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function handleThenable(promise, value) {
var then = null,
resolved;
try {
Function keys
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Assertion.prototype.keys = function ($keys) {
var str
, ok = true;
$keys = isArray($keys)
Function 7
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],7:[function(require,module,exports){
(function (global){
"use strict";
/*global self*/
var RSVPPromise = require("./promise").Promise;
Function uint8ToBase64
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function uint8ToBase64 (uint8) {
var i,
extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes
output = "",
temp, length
Function all
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function all(promises) {
/*jshint validthis:true */
var Promise = this;
if (!isArray(promises)) {
Function slice
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Buffer.prototype.slice = function (start, end) {
var len = this.length
start = ~~start
end = end === undefined ? len : ~~end
Function reduce
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function reduce (arr, fun) {
if (Array.prototype.reduce) {
return Array.prototype.reduce.apply(
arr
, Array.prototype.slice.call(arguments, 1)
Function nextTick
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
process.nextTick = (function () {
var canSetImmediate = typeof window !== 'undefined'
&& window.setImmediate;
var canPost = typeof window !== 'undefined'
&& window.postMessage && window.addEventListener
Function removeAllListeners
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
EventEmitter.prototype.removeAllListeners = function(type) {
var key, listeners;
if (!this._events)
return this;
Function byteLength
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Buffer.byteLength = function (str, encoding) {
var ret
str = str.toString()
switch (encoding || 'utf8') {
case 'hex':
Function readUInt32
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function readUInt32 (buf, offset, littleEndian, noAssert) {
if (!noAssert) {
assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
assert(offset !== undefined && offset !== null, 'missing offset')
assert(offset + 3 < buf.length, 'Trying to read beyond buffer length')
Function b64ToByteArray
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function b64ToByteArray (b64) {
var i, j, l, tmp, placeHolders, arr
if (b64.length % 4 > 0) {
throw new Error('Invalid string. Length must be a multiple of 4')
Function read
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.read = function(buffer, offset, isLE, mLen, nBytes) {
var e, m,
eLen = nBytes * 8 - mLen - 1,
eMax = (1 << eLen) - 1,
eBias = eMax >> 1,
Function subscribe
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Channel.prototype.subscribe = function (handler) {
if (typeof handler !== 'function') {
throw new Error('handler function is required');
}
this.handlers.push(handler);
Function throwException
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Assertion.prototype.throwException = function (fn) {
expect(this.obj).to.be.a('function');
var thrown = false
, not = this.flags.not;