refactor(RegExpWrapper): remove the facade (#10512)
This commit is contained in:

committed by
Alex Rickabaugh

parent
b4613ab2d2
commit
83e2d3d1cb
@ -8,7 +8,7 @@
|
||||
|
||||
import {BaseException} from '@angular/core';
|
||||
|
||||
import {RegExpWrapper, StringWrapper, evalExpression, isBlank, isPresent, isString} from '../facade/lang';
|
||||
import {StringWrapper, evalExpression, isBlank, isPresent, isString} from '../facade/lang';
|
||||
|
||||
import {EmitterVisitorContext, OutputEmitter} from './abstract_emitter';
|
||||
import {AbstractJsEmitterVisitor} from './abstract_js_emitter';
|
||||
|
@ -9,11 +9,11 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
|
||||
import {BaseException} from '../facade/exceptions';
|
||||
import {Math, RegExpWrapper, isBlank, isPresent} from '../facade/lang';
|
||||
import {Math, isBlank, isPresent} from '../facade/lang';
|
||||
|
||||
|
||||
// asset:<package-name>/<realm>/<path-to-module>
|
||||
var _ASSET_URL_RE = /asset:([^\/]+)\/([^\/]+)\/(.+)/g;
|
||||
var _ASSET_URL_RE = /asset:([^\/]+)\/([^\/]+)\/(.+)/;
|
||||
|
||||
/**
|
||||
* Interface that defines how import statements should be generated.
|
||||
@ -26,8 +26,8 @@ export abstract class ImportGenerator {
|
||||
|
||||
export class AssetUrl {
|
||||
static parse(url: string, allowNonMatching: boolean = true): AssetUrl {
|
||||
var match = RegExpWrapper.firstMatch(_ASSET_URL_RE, url);
|
||||
if (isPresent(match)) {
|
||||
const match = url.match(_ASSET_URL_RE);
|
||||
if (match !== null) {
|
||||
return new AssetUrl(match[1], match[2], match[3]);
|
||||
}
|
||||
if (allowNonMatching) {
|
||||
|
Reference in New Issue
Block a user