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 118118 "url" : " https://github.com/niftylettuce/email-regex-safe"
119119 },
120120 "scripts" : {
121- "ava" : " cross-env NODE_ENV=test ava" ,
122121 "browserify" : " browserify src/index.js -o dist/email-regex-safe.js -s emailRegexSafe -g [ babelify --configFile ./.dist.babelrc ]" ,
123122 "build" : " npm run build:clean && npm run build:lib && npm run build:dist" ,
124123 "build:clean" : " rimraf lib dist" ,
131130 "lint:md" : " remark . -qfo" ,
132131 "lint:pkg" : " fixpack" ,
133132 "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" ,
135133 "prepare" : " husky install" ,
136134 "pretest" : " npm run build && npm run lint" ,
137- "test" : " npm run test-coverage "
135+ "test" : " cross-env NODE_ENV= test nyc ava "
138136 },
139137 "unpkg" : " dist/email-regex-safe.min.js"
140138}
Original file line number Diff line number Diff line change @@ -8,18 +8,21 @@ const ipv4 = ipRegex.v4().source;
88const ipv6 = ipRegex . v6 ( ) . source ;
99
1010module . 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+ ) ;
2326
2427 const host = '(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)' ;
2528 const domain =
You can’t perform that action at this time.
0 commit comments