Comments (11)
I believe this should already work. Also, as an interesting side-effect, that should then be accessible from Configru['as-df']
and Configru[:as-df]
.
from configru.
Configru[:'as-df']
, you mean
from configru.
I keep forgetting this isn't a Lisp. Where would :as - df
ever make sense, anyway?
from configru.
How bad would it be if Configru replaced _ with - behind the scenes? For example, the configuration file would have foo-bar: baz
, and foo_bar
would be used in the load DSL for it and the value could be accessed using Configru.foo_bar
. Would this be much of a problem, do you think?
from configru.
I don't think this would be a problem, personally. May want to ask around a bit, though.
EDIT: Screw that, do it. Change back people complain and you feel it's worth changing. :P
from configru.
I can't ask around, you are my only user!
I'll make it replace _ with - and push out 0.0.2 unless you have any other feature requests I should add as well.
from configru.
if you have:
foo-bar
you should have:
Configru.foo_bar
and
Configru['foo-bar']
from configru.
Both of those work, along with Configru['foo_bar']
and Configru[:foo_bar]
.
from configru.
Sounds good!
So then your only limitation is not having foo_bar
AND foo-bar
from configru.
If you use underscores in YAML, you should be murdered.
from configru.
True
from configru.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from configru.