strip-bom-buf/index.d.ts
raw| 1 | /// <reference types="node"/> |
| 2 | |
| 3 | /** |
| 4 | Strip UTF-8 [byte order mark](http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a buffer. |
| 5 | |
| 6 | @example |
| 7 | ``` |
| 8 | import * as fs from 'fs'; |
| 9 | import stripBomBuffer = require('strip-bom-buf'); |
| 10 | |
| 11 | stripBomBuffer(fs.readFileSync('unicorn.txt')); |
| 12 | //=> 'unicorn' |
| 13 | ``` |
| 14 | */ |
| 15 | declare function stripBomBuffer(buffer: Buffer): Buffer; |
| 16 | |
| 17 | export = stripBomBuffer; |