All files / buffers/src/utf8/decodeUtf8 v14.ts

100% Statements 5/5
50% Branches 2/4
100% Functions 1/1
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 91x   1x 1x   1x 5x    
import v10 from './v10';
 
const hasBuffer = typeof Buffer !== 'undefined';
const utf8Slice = hasBuffer ? Buffer.prototype.utf8Slice : null;
 
export default utf8Slice
  ? (buf: Uint8Array, start: number, length: number): string => utf8Slice.call(buf, start, start + length)
  : v10;