fs-exists-sync

WebJar for fs-exists-sync

License

License

MIT
Categories

Categories

eXist Data Databases
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

fs-exists-sync
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

fs-exists-sync
WebJar for fs-exists-sync
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/jonschlinkert/fs-exists-sync

Download fs-exists-sync

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/fs-exists-sync/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>fs-exists-sync</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/fs-exists-sync/
implementation 'org.webjars.npm:fs-exists-sync:0.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/fs-exists-sync/
implementation ("org.webjars.npm:fs-exists-sync:0.1.0")
'org.webjars.npm:fs-exists-sync:jar:0.1.0'
<dependency org="org.webjars.npm" name="fs-exists-sync" rev="0.1.0">
  <artifact name="fs-exists-sync" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='fs-exists-sync', version='0.1.0')
)
libraryDependencies += "org.webjars.npm" % "fs-exists-sync" % "0.1.0"
[org.webjars.npm/fs-exists-sync "0.1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

fs-exists-sync NPM version NPM downloads Build Status

Drop-in replacement for fs.existsSync with zero dependencies. Other libs I found either have crucial differences from fs.existsSync, or unnecessary dependencies. See README.md for more info.

Install

Install with npm:

$ npm install fs-exists-sync --save

Usage

var exists = require('fs-exists-sync');

console.log(exists('.'));
//=> true
console.log(exists(process.cwd()));
//=> true
console.log(exists('README.md'));
//=> true
console.log(exists('foo.txt'));
//=> false
console.log(exists(''));
//=> false
console.log(exists());
//=> false

Why another "exists" lib?

I just want a simple replacement for fs.existsSync. Here is what I found:

API

Related projects

You might also be interested in these projects:

  • is-absolute: Polyfill for node.js path.isAbolute. Returns true if a file path is absolute. | homepage
  • parse-filepath: Pollyfill for node.js path.parse, parses a filepath into an object. | homepage
  • try-open: Tries to open a file using fs.openSync (only necessary with sync), fails gracefully if the… more | homepage

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Building docs

Generate readme and API documentation with verb:

$ npm install verb && npm run docs

Or, if verb is installed globally:

$ verb

Running tests

Install dev dependencies:

$ npm install -d && npm test

Author

Jon Schlinkert

License

Copyright © 2016, Jon Schlinkert. Released under the MIT license.


This file was generated by verb, v0.9.0, on April 09, 2016.

Versions

Version
0.1.0