@nxtedition/lib 20.4.8 → 21.0.0
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.
- package/deepstream.js +3 -5
- package/package.json +1 -1
package/deepstream.js
CHANGED
|
@@ -4,10 +4,8 @@ import cached from './util/cached.js'
|
|
|
4
4
|
import * as rxjs from 'rxjs'
|
|
5
5
|
|
|
6
6
|
function provide(ds, domain, callback, options) {
|
|
7
|
-
if (domain
|
|
8
|
-
domain
|
|
9
|
-
} else {
|
|
10
|
-
domain = domain.replace('.', '\\.')
|
|
7
|
+
if (typeof domain !== 'string') {
|
|
8
|
+
throw new Error('domain must be a string')
|
|
11
9
|
}
|
|
12
10
|
|
|
13
11
|
if (!options || typeof options !== 'object') {
|
|
@@ -34,7 +32,7 @@ function provide(ds, domain, callback, options) {
|
|
|
34
32
|
|
|
35
33
|
let idExpr = '(?:([^{}]+|{.*}):)?'
|
|
36
34
|
if (options.id === true) {
|
|
37
|
-
idExpr = '([^{}]+):'
|
|
35
|
+
idExpr = '(?:[^{}]+):'
|
|
38
36
|
} else if (options.id === false) {
|
|
39
37
|
idExpr = '(?:([{].*[}]):)?'
|
|
40
38
|
}
|