Giter Site home page Giter Site logo

Comments (7)

borkdude avatar borkdude commented on June 2, 2024

What about:

$ echo '{"anApple": 1}' | jet -i json -k '(comp keyword csk/->kebab-case)'
{:an-apple 1}

Is this not short enough?

from jet.

aschofie avatar aschofie commented on June 2, 2024

from jet.

borkdude avatar borkdude commented on June 2, 2024

Alright, but one thing I might want to change is the use of simple symbols as they might conflict with regular Clojure functions. Also, I think the names should reflect their shape, like in the csk library: SCREAMING_SNAKE_CASE, such that they are self-documenting. Perhaps we can use keywords:

--keywordize :SCREAMING_SNAKE_CASE

from jet.

aschofie avatar aschofie commented on June 2, 2024

@borkdude Happy to make whatever changes necessary to get this in. I had thought about using the csk names but didn't because the case endings added ~33 chars to the line width compared to leaving it off, and doing so took away the self-documenting ability from "camel", so I just made everything consistent and the easiest to type, but I have no strong feelings here, and will change it back to the csk names if you like that best. With regards to needing keywords though-- what mechanisms could you use to make -k SCREAMING_SNAKE_CASE mean something else? By having SCREAMING_SNAKE_CASE defined in user.clj or another place?

from jet.

borkdude avatar borkdude commented on June 2, 2024

Maybe the same mechanism as you had it in the original PR, special cases?

from jet.

borkdude avatar borkdude commented on June 2, 2024

So my proposal would be -k :SCREAMING_SNAKE_CASE

from jet.

aschofie avatar aschofie commented on June 2, 2024

Created new #145 with the csk keyword cases.

from jet.

Related Issues (20)

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.