Git Product home page Git Product logo

snakecase's People

Contributors

implexis-analytics avatar strengejacke avatar tazinho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

snakecase's Issues

Build easier internal logic

Maybe it is easier to just use backreferences and underscore instea of str_split. This would give also the possibility to drop the str_split logic

to_any_case: bug in screaming_snake and replace special characters

string <- "MERKWÜRDIGER-VariablenNAME mit.VIELENMustern_version: 3.7.4"

to_any_case(string,

  • case = "screaming_snake",
  • preprocess = "-|:|(?<!\d)\.",
  • protect = "\.",
  • replace_special_characters = TRUE,
  • postprocess = "\.")
    [1] "MERKWUeRDIGER.VARIABLEN.NAME.MIT.VIELEN.MUSTERN.VERSION.3.7.4"

think more about intended conversion logic (and the implementation behind)

How should this be handled? Maybe like in the comments?

> snakecase::to_snake_case("CId") # c_id
[1] "cid"
> snakecase::to_small_camel_case("CId") # cId
[1] "cid"
> snakecase::to_big_camel_case("CId") #CId
[1] "Cid"

Edit: It must be translated to c_id, see RStudio -> r_studio for example for another content based movitation. Or see in the table, for a logical motivation.

add badges

cran check, download stats, other checks than travis (see issue #2 )

Special character treatment

Systematical Addition of cases to support, similar to german umlauts. Also decide of and how to replace in replace Special characters argument

Add Leaveout functionality

Sth like to_snake_case(strings, leave_out = c(2,4,5)) that applies the conversion to everything but elements in leave_out position

postprocess string/regex behaviour

postprocess argument must take a strign and not a regex

to_any_case("MERKWÜRDIGER-VariablenNAME mit.VIELENMustern_version: 3.7.4",
case = "snake",
preprocess = "-|:|(?<!\d)\.",
protect = "\.",
replace_special_characters = TRUE,
postprocess = ".")

returns "." ???

implement test_basic_cases and control the basic tests for this

sth like

test_basic_cases <- function(strings){
to_snake_case(string) == to_snake_case(to_snake_case(string))
to_snake_case(string) == to_snake_case(to_small_camel_case(string))
to_snake_case(string) == to_snake_case(to_big_camel_case(string))
to_snake_case(string) == to_snake_case(to_screaming_snake_case(string))

to_small_camel_case(string) == to_small_camel_case(to_small_camel_case(string))
to_small_camel_case(string) == to_small_camel_case(to_snake_case(string))
...
}

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.