Prvi commit
This commit is contained in:
6
EveryThing/wwwroot/vendor/libs/cldrjs/dist/.build/util/always_array.js
vendored
Normal file
6
EveryThing/wwwroot/vendor/libs/cldrjs/dist/.build/util/always_array.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
var alwaysArray = function( somethingOrArray ) {
|
||||
return arrayIsArray( somethingOrArray ) ? somethingOrArray : [ somethingOrArray ];
|
||||
};
|
||||
|
||||
12
EveryThing/wwwroot/vendor/libs/cldrjs/dist/.build/util/array/for_each.js
vendored
Normal file
12
EveryThing/wwwroot/vendor/libs/cldrjs/dist/.build/util/array/for_each.js
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
var arrayForEach = function( array, callback ) {
|
||||
var i, length;
|
||||
if ( array.forEach ) {
|
||||
return array.forEach( callback );
|
||||
}
|
||||
for ( i = 0, length = array.length; i < length; i++ ) {
|
||||
callback( array[ i ], i, array );
|
||||
}
|
||||
};
|
||||
|
||||
6
EveryThing/wwwroot/vendor/libs/cldrjs/dist/.build/util/array/is_array.js
vendored
Normal file
6
EveryThing/wwwroot/vendor/libs/cldrjs/dist/.build/util/array/is_array.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
var arrayIsArray = Array.isArray || function( obj ) {
|
||||
return Object.prototype.toString.call( obj ) === "[object Array]";
|
||||
};
|
||||
|
||||
15
EveryThing/wwwroot/vendor/libs/cldrjs/dist/.build/util/array/some.js
vendored
Normal file
15
EveryThing/wwwroot/vendor/libs/cldrjs/dist/.build/util/array/some.js
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
var arraySome = function( array, callback ) {
|
||||
var i, length;
|
||||
if ( array.some ) {
|
||||
return array.some( callback );
|
||||
}
|
||||
for ( i = 0, length = array.length; i < length; i++ ) {
|
||||
if ( callback( array[ i ], i, array ) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
9
EveryThing/wwwroot/vendor/libs/cldrjs/dist/.build/util/is_plain_object.js
vendored
Normal file
9
EveryThing/wwwroot/vendor/libs/cldrjs/dist/.build/util/is_plain_object.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
/**
|
||||
* Function inspired by jQuery Core, but reduced to our use case.
|
||||
*/
|
||||
var isPlainObject = function( obj ) {
|
||||
return obj !== null && "" + obj === "[object Object]";
|
||||
};
|
||||
|
||||
35
EveryThing/wwwroot/vendor/libs/cldrjs/dist/.build/util/json/merge.js
vendored
Normal file
35
EveryThing/wwwroot/vendor/libs/cldrjs/dist/.build/util/json/merge.js
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
var jsonMerge = (function() {
|
||||
|
||||
// Returns new deeply merged JSON.
|
||||
//
|
||||
// Eg.
|
||||
// merge( { a: { b: 1, c: 2 } }, { a: { b: 3, d: 4 } } )
|
||||
// -> { a: { b: 3, c: 2, d: 4 } }
|
||||
//
|
||||
// @arguments JSON's
|
||||
//
|
||||
var merge = function() {
|
||||
var destination = {},
|
||||
sources = [].slice.call( arguments, 0 );
|
||||
arrayForEach( sources, function( source ) {
|
||||
var prop;
|
||||
for ( prop in source ) {
|
||||
if ( prop in destination && typeof destination[ prop ] === "object" && !arrayIsArray( destination[ prop ] ) ) {
|
||||
|
||||
// Merge Objects
|
||||
destination[ prop ] = merge( destination[ prop ], source[ prop ] );
|
||||
|
||||
} else {
|
||||
|
||||
// Set new values
|
||||
destination[ prop ] = source[ prop ];
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
return destination;
|
||||
};
|
||||
|
||||
return merge;
|
||||
|
||||
}());
|
||||
17
EveryThing/wwwroot/vendor/libs/cldrjs/dist/.build/util/object/keys.js
vendored
Normal file
17
EveryThing/wwwroot/vendor/libs/cldrjs/dist/.build/util/object/keys.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
|
||||
var objectKeys = function( object ) {
|
||||
var i,
|
||||
result = [];
|
||||
|
||||
if ( Object.keys ) {
|
||||
return Object.keys( object );
|
||||
}
|
||||
|
||||
for ( i in object ) {
|
||||
result.push( i );
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user