File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,14 @@ declare function instanceOf(
1616 constructor : mixed ,
1717) : boolean % checks ( value instanceof constructor ) ;
1818
19- export default ( process && process . env . NODE_ENV !== 'production'
19+ // See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production
20+ // See: https://webpack.js.org/guides/production/
21+ export default ( process . env . NODE_ENV === 'production'
2022 ? // eslint-disable-next-line no-shadow
23+ function instanceOf ( value : any , constructor : any ) {
24+ return value instanceof constructor ;
25+ }
26+ : // eslint-disable-next-line no-shadow
2127 function instanceOf ( value : any , constructor : any ) {
2228 if ( value instanceof constructor ) {
2329 return true ;
@@ -43,8 +49,4 @@ spurious results.`,
4349 }
4450 }
4551 return false ;
46- }
47- : // eslint-disable-next-line no-shadow
48- function instanceOf ( value : any , constructor : any ) {
49- return value instanceof constructor ;
5052 } ) ;
You can’t perform that action at this time.
0 commit comments