Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fs-plus

Package Overview
Dependencies
Maintainers
10
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-plus - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1-0

15

lib/fs-plus.js
(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.
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