Skip to content

Commit

Permalink
Update: Remove isNull utility (ref #112)
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Sep 26, 2016
1 parent 7159e5d commit 7e1b829
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 31 deletions.
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ var cloneBuffer = require('./lib/cloneBuffer');
var removeTrailingSep = require('remove-trailing-separator');
var isBuffer = require('./lib/isBuffer');
var isStream = require('is-stream');
var isNull = require('./lib/isNull');
var inspectStream = require('./lib/inspectStream');
var normalize = require('./lib/normalize');
var replaceExt = require('replace-ext');
Expand Down Expand Up @@ -63,7 +62,7 @@ File.prototype.isStream = function() {
};

File.prototype.isNull = function() {
return isNull(this.contents);
return (this.contents === null);
};

File.prototype.isDirectory = function() {
Expand Down Expand Up @@ -169,7 +168,7 @@ Object.defineProperty(File.prototype, 'contents', {
return this._contents;
},
set: function(val) {
if (!isBuffer(val) && !isStream(val) && !isNull(val)) {
if (!isBuffer(val) && !isStream(val) && (val !== null)) {
throw new Error('File.contents can only be a Buffer, a Stream, or null.');
}

Expand Down
3 changes: 0 additions & 3 deletions lib/isNull.js

This file was deleted.

25 changes: 0 additions & 25 deletions test/is-null.js

This file was deleted.

0 comments on commit 7e1b829

Please sign in to comment.