Neglected Puppy Market

    JQ

    0.0.1 • Public • Published

    JQ Build Status

    JQ is a DSL for querying javascript object. APIs are very similar to jQuery. If you know jQuery, you can use this library immediately.

    Instalation

    via npm:

    $ npm install JQ

    Browser Support

    To compile JQ to a single file runnable for client-side use simply execute:

    $ make JQ.js

    Sample

    var JQ = require('JQ').JQ;
     
    var family = {
      father_name: 'bob',
      mother_name: 'kathy',
      children: [
        { 
          name: 'john',
          age: 3
        },
        {
          name: 'alice',
          age: 2
        },
        {
          name: 'mike',
          age: 1
        }
      ]
    };
     
    var $family = JQ(family);
    $family("name === 'john' || age === 1").get(0); // -> { name: 'john', age: 3 }
    $family("name === 'john' || age === 1").get(1); // -> { name: 'make', age: 1 }
     

    Keywords

    none

    Install

    npm i JQ

    DownloadsWeekly Downloads

    3

    Version

    0.0.1

    License

    none

    Last publish

    Collaborators

    • arumons