UNPKG

node-libpng

Version:

Unofficial bindings for node to libpng.

18 lines 542 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isPng = void 0; const native_1 = require("./native"); /** * Will check if the provided buffer contains a PNG image. * Under the hood this will call `png_sig_cmp` and check for the * header of the buffer. * * @param buffer The buffer to check. * * @return `true` if the file was a PNG image file and `false` otherwise. */ function isPng(buffer) { return native_1.__native_isPng(buffer); } exports.isPng = isPng; //# sourceMappingURL=is-png.js.map