This file contains hidden or 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
(function(window, document, undefined) {'use strict'; | |
function minErr(module, ErrorConstructor) { | |
ErrorConstructor = ErrorConstructor || Error; | |
return function() { | |
var SKIP_INDEXES = 2; | |
var templateArgs = arguments, | |
code = templateArgs[0], | |
message = '[' + (module ? module + ':' : '') + code + '] ', |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="angularjs routes" stopProcessing="true"> | |
<match url=".*" /> | |
<conditions logicalGrouping="MatchAll"> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> |
This file contains hidden or 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
import {Subject} from 'rxjs'; | |
interface CountedSubscription { | |
unsubscribe: () => void | |
} | |
export type CountParams = { | |
newCount: number, | |
prevCount: number | |
}; |
This file contains hidden or 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
export class Subscription { | |
private unsub: () => void; | |
constructor(unsub: () => void) { | |
this.unsub = unsub; | |
} | |
public unsubscribe(): void { | |
if (this.unsub) { | |
this.unsub(); |
This file contains hidden or 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
function stringify(value) { | |
if (value !== undefined) { | |
return JSON.stringify(value, (_, v) => typeof v === 'bigint' ? v.toString() : v); | |
} | |
} |
This file contains hidden or 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
function stringify(value) { | |
if (value !== undefined) { | |
return JSON.stringify(value, (_, v) => typeof v === 'bigint' ? v.toString() : v); | |
} | |
} |
This file contains hidden or 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
function stringify(value) { | |
if (value !== undefined) { | |
return JSON.stringify(value, (_, v) => typeof v === 'bigint' ? v.toString() : v); | |
} | |
} | |
This file contains hidden or 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
function stringify(value) { | |
if (value !== undefined) { | |
return JSON.stringify(value, (_, v) => typeof v === 'bigint' ? v.toString() : v); | |
} | |
} | |
This file contains hidden or 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
// Works the same as JSON.stringify, | |
// but also handles BigInt type: | |
function stringify(value) { | |
if (value !== undefined) { | |
return JSON.stringify(value, (_, v) => typeof v === 'bigint' ? v.toString() : v); | |
} | |
} | |
This file contains hidden or 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
// Works the same as JSON.stringify, but also handles BigInt type, | |
// using 123n format, to make sure the result is reversible: | |
function stringify(value) { | |
if (value !== undefined) { | |
return JSON.stringify(value, (_, v) => typeof v === 'bigint' ? `${v}n` : v); | |
} | |
} | |
OlderNewer