Notoriously Psychedelic Modules
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    querifyjspublic

    This package has been deprecated

    Author message:

    WARNING: This project has been moved to QueryifyJs. Install using QueryifyJs instead.

    Querify JS

    Build Status NPM version Gittip donate button Analytics

    A No-SQL object query library made for javascript

    Documentation

    Library API

    Basic Examples

       var models = [
           {name: 'apple'},
           {name: 'banana'},
           {name: 'pineapple'},
           {name: 'strawberry'},
           {name: 'orange'},
           {name: 'grapefruit'}
       ];
       var query = {
           name: /apple/,      // regexp to match any names with 'apple' in them 
           $or: {              // or 
               name: 'banana'  // match name against 'banana' 
           }
       };
       var results = querify.sync.filter(models, query);
       // produces [{"name":"apple"},{"name":"banana"},{"name":"pineapple"}] 
       
       var query = {
           name: {
               $right: 'e'     // match the last char in name that contains 'e' 
           }
       };
       
       var results = querify.sync.filter(models, query);
       // produces [{"name":"apple"},{"name":"pineapple"},{"name":"orange"}] 
        // direct value queries 
        
        var result = querify.sync.one("myvalue", {$equals: 'myvalue'});
       // promise based example 
       var query = {
           name: /an/          // regexp to match any names with 'an' 
       };
       
       querify.promise.filter(models, query)
               .then(function(results) {
                   // produces [{"name":"banana"},{"name":"orange"}] 
               });

    Contributing

    Feel free to submit ideas and issues.

    install

    npm i querifyjs

    Downloadsweekly downloads

    1

    version

    0.13.0

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar