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

@transloadit/file-exists

Package Overview
Dependencies
Maintainers
0
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@transloadit/file-exists - npm Package Compare versions

Comparing version 0.3.4 to 1.0.0

3

dist/fileExists.d.ts

@@ -1,2 +0,1 @@

declare const _default: (path: string) => Promise<boolean>;
export = _default;
export declare function fileExists(path: string): Promise<boolean>;
"use strict";
const fs = require("node:fs");
module.exports = function fileExists(path) {
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.fileExists = fileExists;
const node_fs_1 = __importDefault(require("node:fs"));
function fileExists(path) {
return new Promise((resolve) => {
fs.access(path, fs.constants.F_OK, (err) => {
node_fs_1.default.access(path, node_fs_1.default.constants.F_OK, (err) => {
resolve(!err);
});
});
};
}
//# sourceMappingURL=fileExists.js.map
{
"name": "@transloadit/file-exists",
"version": "0.3.4",
"version": "1.0.0",
"repository": {

@@ -12,7 +12,11 @@ "type": "git",

"types": "dist/fileExists.d.ts",
"files": [
"dist",
"src",
"!*.test.*"
],
"scripts": {
"build": "tsc --build --clean && tsc --build",
"typecheck": "tsc --noEmit",
"test": "tsx --test src/**/*.test.ts",
"test:watch": "tsx --test --watch src/**/*.test.ts"
"prepack": "tsc --build",
"test": "tsc --build && node --test --enable-source-maps",
"test:watch": "node --test --enable-source-maps --watch"
},

@@ -19,0 +23,0 @@ "publishConfig": {

@@ -1,4 +0,4 @@

import fs = require('node:fs')
import fs from 'node:fs'
export = function fileExists(path: string): Promise<boolean> {
export function fileExists(path: string): Promise<boolean> {
return new Promise((resolve) => {

@@ -5,0 +5,0 @@ fs.access(path, fs.constants.F_OK, (err) => {

Sorry, the diff of this file is not supported yet

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