Files
wishthis/node_modules/strip-bom-buf/index.d.ts
2025-07-08 14:47:27 +02:00

18 lines
382 B
TypeScript

/// <reference types="node"/>
/**
Strip UTF-8 [byte order mark](http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a buffer.
@example
```
import * as fs from 'fs';
import stripBomBuffer = require('strip-bom-buf');
stripBomBuffer(fs.readFileSync('unicorn.txt'));
//=> 'unicorn'
```
*/
declare function stripBomBuffer(buffer: Buffer): Buffer;
export = stripBomBuffer;