Comparing version 3.1.0 to 3.1.1-0
(function() { | ||
var BINARY_EXTENSIONS, COMPRESSED_EXTENSIONS, IMAGE_EXTENSIONS, MARKDOWN_EXTENSIONS, Module, async, fs, fsPlus, isElectron3OrHigher, isMoveTargetValid, isMoveTargetValidSync, isPathValid, lstatSyncNoException, mkdirp, path, rimraf, statSyncNoException, _, | ||
var BINARY_EXTENSIONS, COMPRESSED_EXTENSIONS, IMAGE_EXTENSIONS, MARKDOWN_EXTENSIONS, Module, async, checkIfElectron2OrLower, fs, fsPlus, isElectron2OrLower, isMoveTargetValid, isMoveTargetValidSync, isPathValid, lstatSyncNoException, mkdirp, path, rimraf, statSyncNoException, _, | ||
__slice = [].slice; | ||
@@ -608,8 +608,15 @@ | ||
isElectron3OrHigher = process.versions.electron && parseInt(process.versions.electron.split('.')[0]) >= 3; | ||
isElectron2OrLower = null; | ||
checkIfElectron2OrLower = function() { | ||
if (isElectron2OrLower === null) { | ||
isElectron2OrLower = process.versions.electron && parseInt(process.versions.electron.split('.')[0]) <= 2; | ||
} | ||
return isElectron2OrLower; | ||
}; | ||
statSyncNoException = function() { | ||
var args, error; | ||
args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
if (fs.statSyncNoException && !isElectron3OrHigher) { | ||
if (fs.statSyncNoException && checkIfElectron2OrLower()) { | ||
return fs.statSyncNoException.apply(fs, args); | ||
@@ -629,3 +636,3 @@ } else { | ||
args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
if (fs.lstatSyncNoException && !isElectron3OrHigher) { | ||
if (fs.lstatSyncNoException && checkIfElectron2OrLower()) { | ||
return fs.lstatSyncNoException.apply(fs, args); | ||
@@ -632,0 +639,0 @@ } else { |
{ | ||
"name": "fs-plus", | ||
"version": "3.1.0", | ||
"version": "3.1.1-0", | ||
"description": "node's fs with more helpers", | ||
@@ -5,0 +5,0 @@ "main": "./lib/fs-plus.js", |
@@ -239,6 +239,6 @@ # fs plus | ||
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. | ||
Returns `fs.Stats` if the file exists, `false` 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. | ||
Returns `fs.Stats` if the file exists, `false` 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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
33540
720
0
1