Comparing version 3.0.2 to 3.1.0
(function() { | ||
var BINARY_EXTENSIONS, COMPRESSED_EXTENSIONS, IMAGE_EXTENSIONS, MARKDOWN_EXTENSIONS, Module, async, fs, fsPlus, isMoveTargetValid, isMoveTargetValidSync, isPathValid, lstatSyncNoException, mkdirp, path, rimraf, statSyncNoException, _, | ||
var BINARY_EXTENSIONS, COMPRESSED_EXTENSIONS, IMAGE_EXTENSIONS, MARKDOWN_EXTENSIONS, Module, async, fs, fsPlus, isElectron3OrHigher, isMoveTargetValid, isMoveTargetValidSync, isPathValid, lstatSyncNoException, mkdirp, path, rimraf, statSyncNoException, _, | ||
__slice = [].slice; | ||
@@ -595,9 +595,21 @@ | ||
return !fsPlus.isCaseInsensitive(); | ||
}, | ||
statSyncNoException: function() { | ||
var args; | ||
args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
return statSyncNoException.apply(null, args); | ||
}, | ||
lstatSyncNoException: function() { | ||
var args; | ||
args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
return lstatSyncNoException.apply(null, args); | ||
} | ||
}; | ||
isElectron3OrHigher = process.versions.electron && parseInt(process.versions.electron.split('.')[0]) >= 3; | ||
statSyncNoException = function() { | ||
var args, error; | ||
args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
if (fs.statSyncNoException) { | ||
if (fs.statSyncNoException && !isElectron3OrHigher) { | ||
return fs.statSyncNoException.apply(fs, args); | ||
@@ -617,3 +629,3 @@ } else { | ||
args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
if (fs.lstatSyncNoException) { | ||
if (fs.lstatSyncNoException && !isElectron3OrHigher) { | ||
return fs.lstatSyncNoException.apply(fs, args); | ||
@@ -620,0 +632,0 @@ } else { |
{ | ||
"name": "fs-plus", | ||
"version": "3.0.2", | ||
"version": "3.1.0", | ||
"description": "node's fs with more helpers", | ||
@@ -5,0 +5,0 @@ "main": "./lib/fs-plus.js", |
@@ -236,1 +236,9 @@ # fs plus | ||
Returns `true` if case sensitive, `false` otherwise. | ||
### `statSyncNoException(path[, options])` | ||
Calls [`fs.statSync`](https://nodejs.org/docs/latest-v10.x/api/fs.html#fs_fs_statsync_path_options), catching all exceptions raised. This method calls `fs.statSyncNoException` when provided by the underlying `fs` module (Electron < 3.0). | ||
Returns `fs.Stats` if the file exists, `undefined` otherwise. | ||
### `lstatSyncNoException(path[, options])` | ||
Calls [`fs.lstatSync`](https://nodejs.org/docs/latest-v10.x/api/fs.html#fs_fs_lstatsync_path_options), catching all exceptions raised. This method calls `fs.lstatSyncNoException` when provided by the underlying `fs` module (Electron < 3.0). | ||
Returns `fs.Stats` if the file exists, `undefined` otherwise. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
33357
713
244