GithubHelp home page GithubHelp logo

Comments (2)

subzey avatar subzey commented on June 17, 2024 1

The chaining ("fluent") style has one inherent flaw: to make it possible, all the methods should present in the proto or be mixed in. Ether way it's not tree-shakable.

So you have to bundle all the code into to prod, even if you're not going to use it.

There's nothing too bad in calling

lighten(desaturate(c, .1), .1)

compose or |> or whatever can always be applied. Treeshakability can not

from color2k.

ricokahler avatar ricokahler commented on June 17, 2024 1

@subzey I totally agree. I haven't seen much feedback in this issue so it's probably not gonna land in the final API. In my personal usage of this lib and others like it, I've never really needed to chain more than one or two functions anyway.

If you were wondering how I was planning on adding this feature, take a look at #14 (feel free to leave feedback) . The fluent API would definitely be a no-go though.

from color2k.

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.