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

bare-fs

Package Overview
Dependencies
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bare-fs - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

27

index.js

@@ -242,2 +242,27 @@ /* global Bare */

function exists (filepath, cb) {
if (typeof filepath !== 'string') {
throw typeError('ERR_INVALID_ARG_TYPE', 'Path must be a string. Received type ' + (typeof filepath) + ' (' + filepath + ')')
}
if (typeof cb !== 'function') {
throw typeError('ERR_INVALID_ARG_TYPE', 'Callback must be a function. Received type ' + (typeof cb) + ' (' + cb + ')')
}
return access(filepath, (err) => cb(!!err)) // eslint-disable-line n/no-callback-literal
}
function existsSync (filepath) {
if (typeof filepath !== 'string') {
throw typeError('ERR_INVALID_ARG_TYPE', 'Path must be a string. Received type ' + (typeof filepath) + ' (' + filepath + ')')
}
try {
accessSync(filepath)
return true
} catch {
return false
}
}
function read (fd, buffer, offset, len, pos, cb) {

@@ -1746,2 +1771,3 @@ if (typeof fd !== 'number') {

exports.close = close
exports.exists = exists
exports.fchmod = fchmod

@@ -1774,2 +1800,3 @@ exports.fstat = fstat

exports.closeSync = closeSync
exports.existsSync = existsSync
exports.fchmodSync = fchmodSync

@@ -1776,0 +1803,0 @@ exports.fstatSync = fstatSync

2

package.json
{
"name": "bare-fs",
"version": "2.0.0",
"version": "2.1.0",
"description": "Native file system for Javascript",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -20,2 +20,3 @@ # bare-fs

fs.chmod
fs.exists
fs.fstat

@@ -67,2 +68,3 @@ fs.ftruncate

fs.closeSync
fs.existsSync
fs.fchmodSync

@@ -69,0 +71,0 @@ fs.fstatSync

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