Coder Social home page Coder Social logo

Comments (3)

dabeeeenster avatar dabeeeenster commented on June 22, 2024

Thanks for the report @miscgithub - we'll look into a new version that lowercase's the getTrait method.

from flagsmith-js-client.

miscgithub avatar miscgithub commented on June 22, 2024

Hi Ben, thanks for the quick response! A short thought on this: I wonder if lowercasing trait names is the best approach as the web frontend says "Trait names are case sensitive" (e.g. in "New Segment" modal). Chances are probably minor that there will be two different traits with the same lowercase representation, but it feels strange to me consistency-wise (and like a possible source of confusion) to have trait names that are case sensitive on the API level/frontend level but not on the client level. But I agree, lowercasing trait names might help in nearly all cases.

from flagsmith-js-client.

kyle-ssg avatar kyle-ssg commented on June 22, 2024

Hey @miscgithub, @dabeeeenster.

The flagsmith client itself currently parses response of flags and traits from the api, forcing them to lowercase. The only part that was missing was to do the exact same for the key in getTrait, getValue and hasFeature.

This means that although the api does treat them as case sensitive the sdk will rule out any possibility of case differences.

I'm going to bump this one to 1.2.0 just incase there are side effects but I think this will be fine.

1.2.0 is now released for both flagsmith and react-native-flagsmith.

from flagsmith-js-client.

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.