diff --git a/lib/services/options.service.ts b/lib/services/options.service.ts index a42d342f..66ead611 100644 --- a/lib/services/options.service.ts +++ b/lib/services/options.service.ts @@ -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 = { diff --git a/lib/utils/JsonFormatterPipe.ts b/lib/utils/JsonFormatterPipe.ts index 4c3006af..3be316e6 100644 --- a/lib/utils/JsonFormatterPipe.ts +++ b/lib/utils/JsonFormatterPipe.ts @@ -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) { diff --git a/lib/utils/helpers.ts b/lib/utils/helpers.ts index c2d169e5..991526bf 100644 --- a/lib/utils/helpers.ts +++ b/lib/utils/helpers.ts @@ -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) { diff --git a/lib/utils/pipes.ts b/lib/utils/pipes.ts index a318fce4..a28a4728 100644 --- a/lib/utils/pipes.ts +++ b/lib/utils/pipes.ts @@ -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';