Giter Club home page Giter Club logo

Comments (12)

smfoote avatar smfoote commented on June 24, 2024

{@double-eq}?

from dustjs-helpers.

sethkinast avatar sethkinast commented on June 24, 2024

This would just be a type on {@eq}, like {@eq type="case-insensitive-string"} (which is too long :P )

from dustjs-helpers.

sethkinast avatar sethkinast commented on June 24, 2024

istring?

from dustjs-helpers.

smfoote avatar smfoote commented on June 24, 2024

{@eq flags="i"}

from dustjs-helpers.

sethkinast avatar sethkinast commented on June 24, 2024

I don't like introducing a new flags param that would only apply to strings, since eq compares anything.

from dustjs-helpers.

smfoote avatar smfoote commented on June 24, 2024

Good point. Maybe this should be a separate helper? Otherwise "istring" looks pretty good. Although it looks like isString at first glance.

from dustjs-helpers.

sethkinast avatar sethkinast commented on June 24, 2024

What about something around loose vs strict, where loose matches with
double eq and case insensitive, and strict is what we have? That could be
its own flag or own helper.

On Tue, Feb 16, 2016, 8:40 PM Steven [email protected] wrote:

Good point. Maybe this should be a separate helper? Otherwise "istring"
looks pretty good. Although it looks like isString at first glance.


Reply to this email directly or view it on GitHub
#142 (comment)
.

from dustjs-helpers.

sethkinast avatar sethkinast commented on June 24, 2024
{@eq key="0" value=0 strict="false"}true{/eq}
{@ne key="0" value=0}default is strict, just like now{/ne}
{@eq key="Alice" value="alice" strict="false"}maybe it's weird that strict means both double-eq and toLower{/eq}```

from dustjs-helpers.

sethkinast avatar sethkinast commented on June 24, 2024

{@eq key="3.1" value=3 strict="false"}how deep does it go{/eq}

from dustjs-helpers.

smfoote avatar smfoote commented on June 24, 2024

{@eq key="What is the answer?" value=42 strict="false"}Turtles all the way down{/eq}

from dustjs-helpers.

prashn64 avatar prashn64 commented on June 24, 2024

We should be making it easier to transform inputs instead of adding flags to our comparators. So like if we had a toLowerCase helper or mathFloor helper that we could use inside our eq/ne helpers, we can handle more cases

from dustjs-helpers.

sethkinast avatar sethkinast commented on June 24, 2024

A filter totally seems like the right solution, and one that people could
add themselves. Nice call.

On Thu, Feb 18, 2016 at 10:51 PM prashn64 [email protected] wrote:

We should be making it easier to transform inputs instead of adding flags
to our comparators. So like if we had a toLowerCase helper or mathFloor
helper that we could use inside our eq/ne helpers, we can handle more cases


Reply to this email directly or view it on GitHub
#142 (comment)
.

from dustjs-helpers.

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.