Socket
Socket
Sign inDemoInstall

vinyl

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vinyl - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

4

index.js

@@ -37,2 +37,6 @@ var path = require('path');

File.prototype.isDirectory = function() {
return this.isNull() && this.stat && this.stat.isDirectory();
};
File.prototype.clone = function() {

@@ -39,0 +43,0 @@ var clonedStat = clone(this.stat);

2

package.json
{
"name": "vinyl",
"description": "A virtual file format",
"version": "0.1.0",
"version": "0.2.0",
"homepage": "http://github.com/wearefractal/vinyl",

@@ -6,0 +6,0 @@ "repository": "git://github.com/wearefractal/vinyl.git",

@@ -149,2 +149,30 @@ var File = require('../');

describe('isDirectory()', function() {
var fakeStat = {
isDirectory: function() {
return true;
}
};
it('should return false when the contents are a Buffer', function(done) {
var val = new Buffer("test");
var file = new File({contents: val, stat: fakeStat});
file.isDirectory().should.equal(false);
done();
});
it('should return false when the contents are a Stream', function(done) {
var val = new Stream();
var file = new File({contents: val, stat: fakeStat});
file.isDirectory().should.equal(false);
done();
});
it('should return true when the contents are a null', function(done) {
var file = new File({contents: null, stat: fakeStat});
file.isDirectory().should.equal(true);
done();
});
});
describe('clone()', function() {

@@ -151,0 +179,0 @@ it('should copy all attributes over with Buffer', function(done) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc