mirror of
https://github.com/Redocly/redoc.git
synced 2025-01-31 10:04:08 +03:00
Get rid of facade/lang deps (fixes #129)
This commit is contained in:
parent
f3b7c13ae0
commit
c95755718f
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { isFunction, isString } from '@angular/core/src/facade/lang';
|
||||
import { isFunction, isString } from '../utils/helpers';
|
||||
import { BrowserDomAdapter as DOM } from '../utils/browser-adapter';
|
||||
|
||||
const defaults = {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
'use strict';
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
//import { isBlank } from '@angular/core/src/facade/lang';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
|
||||
function isBlank(obj) {
|
||||
|
|
|
@ -21,6 +21,22 @@ interface HeadersHandler {
|
|||
close: Function;
|
||||
}
|
||||
|
||||
export function stringify(obj:any) {
|
||||
return JSON.stringify(obj);
|
||||
}
|
||||
|
||||
export function isString(str:any) {
|
||||
return typeof str === 'string';
|
||||
}
|
||||
|
||||
export function isFunction(func: any) {
|
||||
return typeof func === 'function';
|
||||
}
|
||||
|
||||
export function isBlank(obj: any): boolean {
|
||||
return obj == null;
|
||||
}
|
||||
|
||||
export function renderMd(rawText:string, headersHandler?:HeadersHandler) {
|
||||
let _origRule;
|
||||
if (headersHandler) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { isString, stringify, isBlank } from '@angular/core/src/facade/lang';
|
||||
import { isString, stringify, isBlank } from './helpers';
|
||||
import JsonPointer from './JsonPointer';
|
||||
import { renderMd } from './helpers';
|
||||
import { JsonFormatter } from './JsonFormatterPipe';
|
||||
|
|
Loading…
Reference in New Issue
Block a user