UNPKG

igniteui-angular-core

Version:

Ignite UI Angular Core logic used in multiple UI components.

81 lines (80 loc) 2.99 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { __extends } from "tslib"; import { Base, markType } from "./type"; import { JsonWriter } from "./JsonWriter"; import { StringBuilder } from "./StringBuilder"; import { stringReplace } from "./string"; /** * @hidden */ var JsonDictionaryItem = /** @class */ /*@__PURE__*/ (function (_super) { __extends(JsonDictionaryItem, _super); function JsonDictionaryItem() { return _super !== null && _super.apply(this, arguments) || this; } JsonDictionaryItem.prototype.b = function () { var a = new JsonWriter(); this.d(a); return a.toString(); }; JsonDictionaryItem.prototype.d = function (a) { }; JsonDictionaryItem.prototype.a = function (a) { if (a == null) { return null; } return stringReplace(stringReplace(stringReplace(stringReplace(stringReplace(a, "\\", "\\\\"), "\t", "\\t"), "\"", "\\\""), "\r", "\\r"), "\n", "\\n"); }; JsonDictionaryItem.c = function (a) { if (a == null) { return null; } var b = -1; var c = new StringBuilder(0); for (var d = 0; d < a.length; d++) { if (a.charAt(d) == '\\' && b == -1) { b = d; } else { if (b == -1) { c.h(a.charAt(d)); } else { if (a.charAt(d) == 'n') { c.l("\n"); b = -1; } else if (a.charAt(d) == 'r') { c.l("\r"); b = -1; } else if (a.charAt(d) == 't') { c.l("\t"); b = -1; } else if (a.charAt(d) == '\"') { c.l("\""); b = -1; } else if (a.charAt(d) == '\\') { c.l("\\"); b = -1; } else { c.l("\\" + a.charAt(d)); b = -1; } } } } return c.toString(); }; JsonDictionaryItem.$t = markType(JsonDictionaryItem, 'JsonDictionaryItem'); return JsonDictionaryItem; }(Base)); export { JsonDictionaryItem };