@magic-xpa/mscorelib 4.801.0-dev481.239 → 4.801.0-dev481.243

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('util'), require('moment'), require('text-encoding'), require('stacktrace-js'), require('rxjs')) :
3
- typeof define === 'function' && define.amd ? define('@magic-xpa/mscorelib', ['exports', 'util', 'moment', 'text-encoding', 'stacktrace-js', 'rxjs'], factory) :
4
- (global = global || self, factory((global['magic-xpa'] = global['magic-xpa'] || {}, global['magic-xpa'].mscorelib = {}), global.util, global.momentNs, global.textEncoding, global.StackTrace$1, global.rxjs));
5
- }(this, (function (exports, util, momentNs, textEncoding, StackTrace$1, rxjs) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('moment'), require('text-encoding'), require('stacktrace-js'), require('rxjs')) :
3
+ typeof define === 'function' && define.amd ? define('@magic-xpa/mscorelib', ['exports', 'moment', 'text-encoding', 'stacktrace-js', 'rxjs'], factory) :
4
+ (global = global || self, factory((global['magic-xpa'] = global['magic-xpa'] || {}, global['magic-xpa'].mscorelib = {}), global.momentNs, global.textEncoding, global.StackTrace$1, global.rxjs));
5
+ }(this, (function (exports, momentNs, textEncoding, StackTrace$1, rxjs) { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
@@ -296,13 +296,20 @@
296
296
  return value;
297
297
  }
298
298
 
299
+ function isNullOrUndefined(object) {
300
+ return object == undefined || object == null;
301
+ }
302
+ function isUndefined(object) {
303
+ return object == undefined;
304
+ }
305
+
299
306
  var Exception = /** @class */ (function () {
300
307
  function Exception(messageOrError) {
301
308
  this.name = "Exception";
302
309
  this.message = "";
303
310
  this.stack = "";
304
311
  this.errorLevel = 1;
305
- if (!util.isNullOrUndefined(messageOrError)) {
312
+ if (!isNullOrUndefined(messageOrError)) {
306
313
  if (messageOrError instanceof Error) {
307
314
  this.stack = messageOrError.stack;
308
315
  this.message = messageOrError.message;
@@ -343,7 +350,7 @@
343
350
  var _this = _super.call(this, message) || this;
344
351
  _this.InnerException = null;
345
352
  _this.name = 'ApplicationException';
346
- _this.InnerException = (util.isUndefined(innerException) ? null : innerException);
353
+ _this.InnerException = (isUndefined(innerException) ? null : innerException);
347
354
  _this.errorLevel = 2;
348
355
  return _this;
349
356
  }
@@ -946,7 +953,7 @@
946
953
  }
947
954
  };
948
955
  List.prototype.get_Item = function (index) {
949
- if (util.isUndefined(this[index]))
956
+ if (isUndefined(this[index]))
950
957
  this[index] = null;
951
958
  return this[index];
952
959
  };
@@ -996,7 +1003,7 @@
996
1003
  };
997
1004
  List.prototype.find = function (predicate) {
998
1005
  var foundItem = _super.prototype.find.call(this, predicate);
999
- if (util.isUndefined(foundItem))
1006
+ if (isUndefined(foundItem))
1000
1007
  foundItem = null;
1001
1008
  return foundItem;
1002
1009
  };
@@ -1218,7 +1225,7 @@
1218
1225
  for (var j = 0; j < trimChars.length; j++) {
1219
1226
  var trimChar = trimChars[j];
1220
1227
  var i = string.length - 1;
1221
- while (!util.isNullOrUndefined(string[i]) && string[i].endsWith(trimChar)) {
1228
+ while (!isNullOrUndefined(string[i]) && string[i].endsWith(trimChar)) {
1222
1229
  string = NString.Remove(string, string.length, 1);
1223
1230
  i--;
1224
1231
  }
@@ -1226,7 +1233,7 @@
1226
1233
  return string;
1227
1234
  };
1228
1235
  NString.Format = function (format, arg0, arg1, arg2, arg3, arg4, arg5) {
1229
- if (!util.isNullOrUndefined(arg0) && arg0.constructor === Array) {
1236
+ if (!isNullOrUndefined(arg0) && arg0.constructor === Array) {
1230
1237
  var s = format, i = arg0.length;
1231
1238
  while (i--) {
1232
1239
  s = s.replace(new RegExp('\\{' + i + '\\}', 'gm'), arg0[i]);
@@ -1634,6 +1641,8 @@
1634
1641
  exports.isAsciiLetter = isAsciiLetter;
1635
1642
  exports.isDigit = isDigit;
1636
1643
  exports.isLowerCase = isLowerCase;
1644
+ exports.isNullOrUndefined = isNullOrUndefined;
1645
+ exports.isUndefined = isUndefined;
1637
1646
  exports.isUpperCase = isUpperCase;
1638
1647
  exports.isWhitespace = isWhitespace;
1639
1648