This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Gets the value of the object by using the keys passed as string. | |
* Returns the value of the specified key, null if undefined. | |
*/ | |
if (!Object.prototype.getValue) { | |
Object.prototype.getValue = function (key) { | |
var self = this; | |
if (!(self instanceof Object) || Object.keys(self).length == 0 || !key || typeof key !== 'string') { | |
return self; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Projects each element of a sequence to an Array and flattens the resulting sequences into one sequence. | |
if (!Array.prototype.mapMany) { | |
Object.defineProperty(Array.prototype, 'mapMany', { | |
value: function (callback) { | |
if (this === null) { | |
throw new TypeError('Array.prototype.mapMany ' + | |
'called on null or undefined'); | |
} | |
if (typeof callback !== 'function') { | |
throw new TypeError(callback + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Projects each element of a sequence to an Array and flattens the resulting sequences into one sequence. | |
if (!Array.prototype.mapMany) { | |
Object.defineProperty(Array.prototype, 'mapMany', { | |
value: function (callback) { | |
if (this === null) { | |
throw new TypeError('Array.prototype.mapMany ' + | |
'called on null or undefined'); | |
} | |
if (typeof callback !== 'function') { | |
throw new TypeError(callback + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof(SDK) == "undefined") { | |
SDK = { | |
__namespace: true | |
}; | |
} | |
SDK.WEBAPI = { | |
_context: function () { | |
/// | |
/// Private function to the context object. | |
/// |