Giter VIP home page Giter VIP logo

Comments (4)

Jameskmonger avatar Jameskmonger commented on May 10, 2024

I'd be more than happy to address this in a PR if you can decide on the solution @perry-mitchell

from buttercup-core.

perry-mitchell avatar perry-mitchell commented on May 10, 2024

This is a very interesting topic.. I definitely agree that we need to add this functionality.

The reason I had not exposed the searching tools is because they operate on the composed, raw JSON data behind the archive (searching commands don't return ManagedGroup or ManagedEntry instances). For this reason, I'd like to keep it hidden for now.

What are your thoughts on having a couple of Archive-level functions like findGroups and findEntries? We'd need to figure our exactly how the methods would work, as groups have just a title, but entries have properties and meta.

What about:

  • findGroupsByTitle(title) - Searches for groups that contain title
  • findEntriesByProperty(propName, value)
  • findEntriesByMeta(metaName, value)

That way we could search by several different aspects - This could be used in the GUI's search field at some stage in the future too. Perhaps returning an array of matched items would be better too, as you could just Array.shift() them to get the first.

from buttercup-core.

perry-mitchell avatar perry-mitchell commented on May 10, 2024

I might take this @Jameskmonger if you're on other items. Would like to get this out this week :)

from buttercup-core.

Jameskmonger avatar Jameskmonger commented on May 10, 2024

Feel free @perry-mitchell.

I agree that the best solution would be to return an array of matching items rather than the first, and then letting the user work with those.

from buttercup-core.

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.