File tree Expand file tree Collapse file tree
plugin-network-instrumentation/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/**
2- * Check if a status code should be captured
3- * @param {number[] } codes - Array of HTTP status codes
4- * @param {number } statusCode - HTTP status code
5- * @returns {boolean } True if should be captured
6- */
2+ * Check if a status code should be captured
3+ * @param {number[] } codes - Array of HTTP status codes
4+ * @param {number } statusCode - HTTP status code
5+ * @returns {boolean } True if should be captured
6+ */
77module . exports = function ( codes , statusCode ) {
88 return codes . some ( code => {
99 if ( typeof code === 'number' ) {
Original file line number Diff line number Diff line change 11/**
2- * Truncate string to max length
3- * @param {string } str - String to truncate
4- * @param {number } maxLength - Maximum length
5- * @returns {string } Truncated string
6- */
2+ * Truncate string to max length
3+ * @param {string } str - String to truncate
4+ * @param {number } maxLength - Maximum length
5+ * @returns {string } Truncated string
6+ */
77module . exports = function ( str , maxLength ) {
88 if ( ! str || str . length <= maxLength ) return str
99 return str . substring ( 0 , maxLength )
Original file line number Diff line number Diff line change @@ -8,11 +8,10 @@ module.exports = function (headers) {
88
99 const obj = { }
1010 if ( typeof headers . entries === 'function' ) {
11- var iterator = headers . entries ( )
12- var entry = iterator . next ( )
11+ const iterator = headers . entries ( )
12+ let entry = iterator . next ( )
1313 while ( ! entry . done ) {
14- var key = entry . value [ 0 ]
15- var value = entry . value [ 1 ]
14+ const [ key , value ] = entry . value
1615 obj [ key ] = value
1716 entry = iterator . next ( )
1817 }
You can’t perform that action at this time.
0 commit comments