Convert camelCase strings to dot.notation from the command line. Zero dependencies.
npm install -g @kszongic/camel2dot-cli# Pass as arguments
camel2dot myVariableName
# → my.variable.name
camel2dot getElementById parseJSON
# → get.element.by.id
# → parse.json
# Pipe from stdin
echo "helloWorld" | camel2dot
# → hello.world
cat identifiers.txt | camel2dot| Flag | Description |
|---|---|
-h, --help |
Show usage information |
-V, --version |
Show version number |
| Input | Output |
|---|---|
myVariableName |
my.variable.name |
getElementById |
get.element.by.id |
XMLHttpRequest |
xml.http.request |
helloWorld |
hello.world |
parseJSON |
parse.json |
MIT © kszongic