In the last PRs (#601 #605) I observed that the contributors replaced util.isString(data) with typeof data === 'string' or util.isFunction(callback) with typeof callback === 'function', the reason for these changes are some performance optimizations, I guess these optimizations are quite insignificant, but they are still improving the performance of the code. From my point of view it's also a code style change, so my question is: Should we allow such changes in the code style? if it's "yes" then we should replace them everywhere where util.isType() is used.
cc TC members @chrisdickinson @bnoordhuis
In the last PRs (#601 #605) I observed that the contributors replaced
util.isString(data)withtypeof data === 'string'orutil.isFunction(callback)withtypeof callback === 'function', the reason for these changes are some performance optimizations, I guess these optimizations are quite insignificant, but they are still improving the performance of the code. From my point of view it's also a code style change, so my question is: Should we allow such changes in the code style? if it's "yes" then we should replace them everywhere whereutil.isType()is used.cc TC members @chrisdickinson @bnoordhuis