@angular-wave/angular.ts 0.0.14 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,4 @@
1
- import {
2
- extend,
3
- forEach,
4
- isDefined,
5
- isFunction,
6
- isObject,
7
- } from "../../../core/utils";
1
+ import { forEach, isDefined, isFunction, isObject } from "../../../core/utils";
8
2
  import { UrlMatcher } from "./urlMatcher";
9
3
  import { DefType, Param } from "../params/param";
10
4
 
@@ -93,7 +87,7 @@ export class UrlMatcherFactory {
93
87
  pattern,
94
88
  urlConfig.paramTypes,
95
89
  this.paramFactory,
96
- extend(globalConfig, config),
90
+ Object.assign(globalConfig, config),
97
91
  );
98
92
  }
99
93
  /**
@@ -1,6 +1,6 @@
1
1
  import { UrlMatcher } from "./urlMatcher";
2
2
  import { isString, isDefined, isFunction } from "../common/predicates";
3
- import { identity, extend } from "../common/common";
3
+ import { identity } from "../common/common";
4
4
  import { is, or, pattern } from "../common/hof";
5
5
  import { StateObject } from "../state/stateObject";
6
6
  /**
@@ -95,7 +95,7 @@ export class UrlRuleFactory {
95
95
  return matched.length / optional.length;
96
96
  }
97
97
  const details = { urlMatcher, matchPriority, type: "URLMATCHER" };
98
- return extend(new BaseUrlRule(matchUrlParamters, _handler), details);
98
+ return Object.assign(new BaseUrlRule(matchUrlParamters, _handler), details);
99
99
  }
100
100
  /**
101
101
  * A UrlRule which matches a state by its url
@@ -130,7 +130,7 @@ export class UrlRuleFactory {
130
130
  }
131
131
  };
132
132
  const details = { state, type: "STATE" };
133
- return extend(this.fromUrlMatcher(state.url, handler), details);
133
+ return Object.assign(this.fromUrlMatcher(state.url, handler), details);
134
134
  }
135
135
  /**
136
136
  * A UrlRule which matches based on a regular expression
@@ -181,7 +181,10 @@ export class UrlRuleFactory {
181
181
  const _handler = isString(handler) ? redirectUrlTo : handler;
182
182
  const matchParamsFromRegexp = (url) => regexp.exec(url.path);
183
183
  const details = { regexp, type: "REGEXP" };
184
- return extend(new BaseUrlRule(matchParamsFromRegexp, _handler), details);
184
+ return Object.assign(
185
+ new BaseUrlRule(matchParamsFromRegexp, _handler),
186
+ details,
187
+ );
185
188
  }
186
189
  }
187
190
  UrlRuleFactory.isUrlRule = (obj) =>
@@ -1,4 +1,4 @@
1
- import { extend, isString } from "../../../core/utils";
1
+ import { isString } from "../../../core/utils";
2
2
  import { is, pattern } from "../common/hof";
3
3
  import { UrlRules } from "./urlRules";
4
4
  import { UrlConfig } from "./urlConfig";
@@ -243,7 +243,7 @@ export class UrlService {
243
243
  * Return the result as a [[MatchResult]].
244
244
  */
245
245
  match(url) {
246
- url = extend({ path: "", search: {}, hash: "" }, url);
246
+ url = Object.assign({ path: "", search: {}, hash: "" }, url);
247
247
  const rules = this.rules.rules();
248
248
  // Checks a single rule. Returns { rule: rule, match: match, weight: weight } if it matched, or undefined
249
249
  const checkRule = (rule) => {