Giter Club home page Giter Club logo

Comments (6)

Tylertron1998 avatar Tylertron1998 commented on July 23, 2024 3

While I don't believe this belongs in core, I think that a PR to pieces for something like this would be nice; an extendable for various helper functions.

from klasa.

MrJacz avatar MrJacz commented on July 23, 2024

Well you don't increment when you decrease, so call it something like that

from klasa.

tech6hutch avatar tech6hutch commented on July 23, 2024

Might as well make helper functions for other common math operations as well, maybe object/array methods etc.

from klasa.

MrJacz avatar MrJacz commented on July 23, 2024

actually, this could be an option in the update method.
like we have action it could be { action: "increment" } for increase and { action: "decrease" } for decrease instead of creating a new method

from klasa.

gc avatar gc commented on July 23, 2024

The method im suggesting is following the way MongoDB does it, you increment by a negative number to decrement, which is simpler, and makes sense because 10 + -2 === 8. Secondly, having to type out an object with an action key defeats half the purpose of it being shorter and simpler.

from klasa.

bdistin avatar bdistin commented on July 23, 2024

I agree with Tyler here, it would make a great extendable for the pieces repo, but doesn't really belong in the core framework, as SG is already quite much...

from klasa.

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.