Git Product home page Git Product logo

Comments (3)

djbe avatar djbe commented on June 12, 2024

We try to avoid dependencies, especially if they are A) too new, or B) unmaintained.

Our filters might not match other implementations, that's why we have documentation about how they work:
https://github.com/SwiftGen/StencilSwiftKit/blob/master/Documentation/filters-strings.md

We usually do something like value|snakeToCamelCase|lowerFirstWord in our templates (see https://github.com/SwiftGen/templates).

from stencilswiftkit.

AliSoftware avatar AliSoftware commented on June 12, 2024

Hi @johndpope

Thanks for the suggestion.

As @djbe said though, and after reviewing the library quickly, I don't think it's worth adding a dependency just for this kind of feature. Adding a dependency, especially one we don't have control over (contrary to Stencil and PathKit for which we work closely with the other and know he's active), might ends being a blocker if the dep isn't active, and is only worth it if it provides significant functionality that would be tedious to reproduce and maintain.
This is not the case for our casing filters, especially also because we want the ones we use to be configurable, composable and fit for use in templates (so use |snakeToCamelCase|lowerFirstWord to compose filters), unlike the ones from that library that are strict and less composable.

So in conclusion, drawing a dependency only for those few filters doesn't seem worth it to me, and thus I'm closing the issue. Thanks for the suggestion though! 👍

from stencilswiftkit.

johndpope avatar johndpope commented on June 12, 2024

after actually using the function in template - it works well when chaining together.

from stencilswiftkit.

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.