var fs = require("fs");
var buffer = new Buffer(1);
function png_colour_type(file) {
	var fd = fs.openSync(file, "r");
	fs.readSync(fd, buffer, 0, 1, 25);
	fs.close(fd);
	return buffer[0];
}
module.exports = png_colour_type;
@@ -78,17 +78,20 @@
 file) %7B%0A
-%09
+    
 var fd =
@@ -115,17 +115,20 @@
 , %22r%22);%0A
-%09
+    
 fs.readS
@@ -154,17 +154,20 @@
 1, 25);%0A
-%09
+    
 fs.close
@@ -176,16 +176,420 @@
 d);%0A
-%09return 
+    return buffer%5B0%5D;%0A%7D%0A%0Apng_colour_type.withPromise = function (file) %7B%0A    return new Promise((resolve, reject) =%3E %7B%0A        fs.open(file, %22r%22, (err, fd) =%3E %7B%0A            if ( err ) return reject(err);%0A            let buffer = new Buffer(1);%0A            fs.read(fd, buffer, 0, 1, 25, (err) =%3E %7B%0A                if ( err ) return reject(err);%0A                fs.close(fd, (err) =%3E %7B%0A                    resolve(
 buff
@@ -593,19 +593,78 @@
 uffer%5B0%5D
+)
 ;%0A
-%7D
+                %7D);%0A            %7D);%0A        %7D);%0A    %7D);%0A%7D;%0A
 %0Amodule.
@@ -689,8 +689,9 @@
 ur_type;
+%0A

Update index.js