1
0
mirror of https://github.com/locomotivemtl/locomotive-boilerplate.git synced 2026-01-15 00:55:08 +08:00

Updated EditorConfig Recommendations

Applied 4-spaces for everything as per: https://locomotivemtl.teamwork.com/tasks/7113032
This commit is contained in:
Chauncey McAskill
2016-08-22 10:30:46 -04:00
parent 3953fbca7b
commit 79219e0659
48 changed files with 1595 additions and 1589 deletions

View File

@@ -1,37 +1,37 @@
var toString = Object.prototype.toString,
arrayLikePattern = /^\[object (?:Array|FileList)\]$/;
arrayLikePattern = /^\[object (?:Array|FileList)\]$/;
// thanks, http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/
export function isArray ( thing ) {
return toString.call( thing ) === '[object Array]';
return toString.call( thing ) === '[object Array]';
}
export function isArrayLike ( obj ) {
return arrayLikePattern.test( toString.call( obj ) );
return arrayLikePattern.test( toString.call( obj ) );
}
export function isEqual ( a, b ) {
if ( a === null && b === null ) {
return true;
}
if ( a === null && b === null ) {
return true;
}
if ( typeof a === 'object' || typeof b === 'object' ) {
return false;
}
if ( typeof a === 'object' || typeof b === 'object' ) {
return false;
}
return a === b;
return a === b;
}
// http://stackoverflow.com/questions/18082/validate-numbers-in-javascript-isnumeric
export function isNumeric ( thing ) {
return !isNaN( parseFloat( thing ) ) && isFinite( thing );
return !isNaN( parseFloat( thing ) ) && isFinite( thing );
}
export function isObject ( thing ) {
return ( thing && toString.call( thing ) === '[object Object]' );
return ( thing && toString.call( thing ) === '[object Object]' );
}
export function isFunction( thing ) {
var getType = {};
return thing && getType.toString.call(thing) === '[object Function]';
var getType = {};
return thing && getType.toString.call(thing) === '[object Function]';
}