GithubHelp home page GithubHelp logo

filenamify's People

Contributors

flytam avatar izumiko avatar quarnster avatar werelord 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

Watchers

 avatar

filenamify's Issues

replacement with blank string isn't possible (sort of)

In my use case, I just want to remove all invalid characters from the string, but I am unable to due to the default being !; the code checks Replacement == "" and sets it to default if the replacement string is blank.

Fixing this isn't possible under the original methods, but with the V2 methods it is with some changes; the V2 methods can change the options after the default has been with calling the option function. I've engineered a fix under said V2 methods; you can find the changes here. In short, the changes are:

  • moved the logic out of the original methods into the "V2" methods (original call V2, instead of V2 calling original)
  • V2 changes the default options via passed in methods
  • remove check for replacement == ""
  • Tests:
    • original methods remains the same (just enhanced the output on test case failure)
    • V2 method, check on empty options list
    • V2 method, test blank string replacement

Thoughts? If you want me to create a pull request with these changes, let me know..

License

Hi there 👋 Just wondering what License this project is. Thanks.

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.