danverbraganza / varcaser Goto Github PK
View Code? Open in Web Editor NEWProvide ability to transform between common variable casing conventions.
License: MIT License
Provide ability to transform between common variable casing conventions.
License: MIT License
I presume that the varcaser
was never designed/intended to be used with input with spaces. However I do hope that it still works -- this is what I discovered:
varcaser.Caser{
From: varcaser.LowerCamelCase, To: varcaser.LowerSnakeCase}.
String("GNU PYTHON Standard")
The output of above code is not "gnu python standard", but oddly, it is
gn_u _pytho_n _standard
I.e., look at those extra "_
" that the plain "gnu python standard" doesn't have.
Would you consider it bug?
Would it possibly be fixed?
Thx
Current implementation of Varcaser doesn't implement strings.replacer
. There's an internal interface in go's std-lib: strings.replacer. It is the good way to standardize all string-replacers.
The implementation doesn't allow us to use Varcaser, where strings.replacer
is expected.
Implement the interface.
For varcaser.Caser{ From: varcaser.ScreamingSnakeCase, To: varcaser.UpperCamelCaseKeepCaps}
the output is wrong IMHO --
E.g., for MY_CONSTANT_VARIABLE
, I'm expecting the output to be MyConstantVariable
, but I'm currently getting MYCONSTANTVARIABLE
instead.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.