vinyl
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -56,3 +56,3 @@ var path = require('path'); | ||
opt = { | ||
deep: false, | ||
deep: true, | ||
contents: true | ||
@@ -59,0 +59,0 @@ }; |
@@ -1,7 +0,1 @@ | ||
var buf = require('buffer'); | ||
var Buffer = buf.Buffer; | ||
// could use Buffer.isBuffer but this is the same exact thing... | ||
module.exports = function(o) { | ||
return typeof o === 'object' && o instanceof Buffer; | ||
}; | ||
module.exports = require('buffer').Buffer.isBuffer; |
{ | ||
"name": "vinyl", | ||
"description": "A virtual file format", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"homepage": "http://github.com/wearefractal/vinyl", | ||
@@ -6,0 +6,0 @@ "repository": "git://github.com/wearefractal/vinyl.git", |
@@ -116,2 +116,13 @@ # vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl) | ||
### contents | ||
The [Stream](https://nodejs.org/api/stream.html#stream_stream) or [Buffer](https://nodejs.org/api/buffer.html#buffer_class_buffer) of the file as it was passed in via options, or as the result of modification. | ||
For example: | ||
```js | ||
if (file.isBuffer()) { | ||
console.log(file.contents.toString()); // logs out the string of contents | ||
} | ||
``` | ||
### path | ||
@@ -118,0 +129,0 @@ |
12861
222
200