You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
259 B
16 lines
259 B
6 years ago
|
'use strict';
|
||
|
module.exports = function (buf) {
|
||
|
if (!buf || buf.length < 8) {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
return buf[0] === 137 &&
|
||
|
buf[1] === 80 &&
|
||
|
buf[2] === 78 &&
|
||
|
buf[3] === 71 &&
|
||
|
buf[4] === 13 &&
|
||
|
buf[5] === 10 &&
|
||
|
buf[6] === 26 &&
|
||
|
buf[7] === 10;
|
||
|
};
|