File tree Expand file tree Collapse file tree 2 files changed +16
-15
lines changed Expand file tree Collapse file tree 2 files changed +16
-15
lines changed Original file line number Diff line number Diff line change 118
118
"url" : " https://github.com/niftylettuce/email-regex-safe"
119
119
},
120
120
"scripts" : {
121
- "ava" : " cross-env NODE_ENV=test ava" ,
122
121
"browserify" : " browserify src/index.js -o dist/email-regex-safe.js -s emailRegexSafe -g [ babelify --configFile ./.dist.babelrc ]" ,
123
122
"build" : " npm run build:clean && npm run build:lib && npm run build:dist" ,
124
123
"build:clean" : " rimraf lib dist" ,
131
130
"lint:md" : " remark . -qfo" ,
132
131
"lint:pkg" : " fixpack" ,
133
132
"minify" : " cross-env NODE_ENV=production browserify src/index.js -o dist/email-regex-safe.min.js -s emailRegexSafe -g [ babelify --configFile ./.dist.babelrc ] -p tinyify" ,
134
- "nyc" : " cross-env NODE_ENV=test nyc ava" ,
135
133
"prepare" : " husky install" ,
136
134
"pretest" : " npm run build && npm run lint" ,
137
- "test" : " npm run test-coverage "
135
+ "test" : " cross-env NODE_ENV= test nyc ava "
138
136
},
139
137
"unpkg" : " dist/email-regex-safe.min.js"
140
138
}
Original file line number Diff line number Diff line change @@ -8,18 +8,21 @@ const ipv4 = ipRegex.v4().source;
8
8
const ipv6 = ipRegex . v6 ( ) . source ;
9
9
10
10
module . exports = ( options ) => {
11
- options = {
12
- exact : false ,
13
- strict : false ,
14
- gmail : true ,
15
- utf8 : true ,
16
- localhost : true ,
17
- ipv4 : true ,
18
- ipv6 : false ,
19
- tlds,
20
- returnString : false ,
21
- ...options
22
- } ;
11
+ // eslint-disable-next-line prefer-object-spread
12
+ options = Object . assign (
13
+ {
14
+ exact : false ,
15
+ strict : false ,
16
+ gmail : true ,
17
+ utf8 : true ,
18
+ localhost : true ,
19
+ ipv4 : true ,
20
+ ipv6 : false ,
21
+ tlds,
22
+ returnString : false
23
+ } ,
24
+ options
25
+ ) ;
23
26
24
27
const host = '(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)' ;
25
28
const domain =
You can’t perform that action at this time.
0 commit comments