Giter Club home page Giter Club logo

assert-dotenv's People

Contributors

busterc avatar nubs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

nubs

assert-dotenv's Issues

fs.exists is slated to be removed

fs.exists is considered an antipattern and is documented as a potential deprecation in the documentation. It seems like it should be possible to just do the read and handle the error appropriately.

I personally find that a bit funky although it likely makes sense in this particular use case.

Async behavior can cause problems

The client code would be a lot cleaner if this could be done synchronously rather that async as there would be no need for a callback. There are also cases where different runners (e.g., gulp, mocha) seem to expect things to be run immediately and they register nextTick handlers to process their stuff. This doesn't work with the async callback.

It should be possible to switch this to a synchronous API using the fs.*Sync calls. find-parent-dir also offers a synchronous API that can be used.

The expected result of this would be changing this:

require('assert-dotenv')({}, function() {
  // some code
});

into this:

require('assert-dotenv')({});
// some code

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.