Restores accepting `Buffer` as input.
authorJakub Pawlowicz <contact@jakubpawlowicz.com>
Wed, 7 Dec 2016 12:19:11 +0000 (13:19 +0100)
committerJakub Pawlowicz <contact@jakubpawlowicz.com>
Fri, 16 Dec 2016 10:49:34 +0000 (11:49 +0100)
lib/utils/read-sources.js

index 6177059..925af0b 100644 (file)
@@ -29,6 +29,8 @@ var REMOTE_RESOURCE_PATTERN = /^(https?:)?\/\//;
 function readSources(input, context, callback) {
   if (typeof input == 'string') {
     return fromString(input, context, {}, callback);
+  } else if (Buffer.isBuffer(input)) {
+    return fromString(input.toString(), context, {}, callback);
   } else if (typeof input == 'object') {
     return fromHash(input, context, {}, callback);
   }