-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: ability to add custom accessors #71
Comments
@todofixthis I like this, there's a guide in the README for making a PR adding custom accessors, but sometimes they are application specific so this is great 👍 Will take a look at the PR |
Per #72 (comment) modifying the acceptance criteria so that extra accessors are provided as a parameter to |
evanshortiss
pushed a commit
that referenced
this issue
Sep 5, 2019
* [#71] Added ability to attach custom accessors. * [#71] Added ability to attach custom accessors. * [#71] Document that accessors are instance-specific. * [#71] Document that accessors are instance-specific. * Address PR comments. - Drop support for Node 6 & 7 (no longer LTS). - Address some issues causing code coverage drop. * [#71] Updated documentation. * [#71] Tightened up documentation a teeny bit 🔧 * [#74] Remove `raiseError` accessor param. If an accessor cannot process an input value, it should just throw an exception instead. There is a trade-off to this approach, in that the stacktrace for the accessor-thrown error is not preserved (replaced by `_raiseError()`), but accessors tend to be fairly simple in implementation, so it shouldn' be too difficult to locate the source of an error. * [#71] Replace `addAccessor` w/ extra param for `from`. * [#71] Updated documentation. * [#74] Refactored now-unnecessarily-complex function 🍃 * [#71] Add compat for #74. * [#71] Removed obsolete link ⛓ * [#71] Fixed incorrect `@param` for `extraAccessors` 🤖 * [#71] Fixed obsolete documentation 🚂 * Bifurcating rabbits.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As a developer, I would like to define custom accessors, so that I can work with env vars in formats specific to my application's requirements.
For example:
Proposed acceptance criteria:
from()
and provide an optional object as a second parameter. The object defines additional accessors for any value returned by that instance'sget()
.env.get()
.The text was updated successfully, but these errors were encountered: