static array(subject) {
		const LENGTH_PROPERTY = 'length';
		if (Array.isArray(subject)) {
			return subject;
		}
		if (typeof subject === 'object') {
			// is there a length property ?
			let bLength = LENGTH_PROPERTY in subject;
			// extracting keys minus "length" property
			let aKeys = Object
				.keys(subject)
				.filter(k => k !== LENGTH_PROPERTY);
			if (aKeys.some(k => isNaN(k))) {
				return false;
			}
			if ((bLength) && (subject[LENGTH_PROPERTY] !== aKeys.length)) {
				return false;
			}
			if (aKeys
				.map(k => parseInt(k))
				.sort((k1, k2) => k1 - k2)
				.every((k, i) => k === i)) {
				return bLength
					? Array.prototype.slice.call(subject, 0)
					: aKeys.map(k => subject[k]);
			}
		}
		return false;
	}
/**
	 * Turns an array-like-structure into an array (a real one)
	 */
Turns an array-like-structure into an array (a real one)
Turns an array - like - structure into an array ( a real one )
static array(subject) {
		const LENGTH_PROPERTY = 'length';
		if (Array.isArray(subject)) {
			return subject;
		}
		if (typeof subject === 'object') {
			let bLength = LENGTH_PROPERTY in subject;
			let aKeys = Object
				.keys(subject)
				.filter(k => k !== LENGTH_PROPERTY);
			if (aKeys.some(k => isNaN(k))) {
				return false;
			}
			if ((bLength) && (subject[LENGTH_PROPERTY] !== aKeys.length)) {
				return false;
			}
			if (aKeys
				.map(k => parseInt(k))
				.sort((k1, k2) => k1 - k2)
				.every((k, i) => k === i)) {
				return bLength
					? Array.prototype.slice.call(subject, 0)
					: aKeys.map(k => subject[k]);
			}
		}
		return false;
	}
static array ( subject ) { const LENGTH_PROPERTY = 'length' ; if ( Array . isArray ( subject ) ) { return subject ; } if ( typeof subject === 'object' ) { let bLength = LENGTH_PROPERTY in subject ; let aKeys = Object . keys ( subject ) . filter ( k => k !== LENGTH_PROPERTY ) ; if ( aKeys . some ( k => isNaN ( k ) ) ) { return false ; } if ( ( bLength ) && ( subject [ LENGTH_PROPERTY ] !== aKeys . length ) ) { return false ; } if ( aKeys . map ( k => parseInt ( k ) ) . sort ( ( k1 , k2 ) => k1 - k2 ) . every ( ( k , i ) => k === i ) ) { return bLength ? Array . prototype . slice . call ( subject , 0 ) : aKeys . map ( k => subject [ k ] ) ; } } return false ; }
Turns an array-like-structure into an array (a real one)
Turns an array - like - structure into an array ( a real one )
// is there a length property ? // extracting keys minus "length" property