Skip to content
This repository has been archived by the owner on Oct 21, 2019. It is now read-only.

Commit

Permalink
docs(Readme): update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
zapkub committed Apr 11, 2017
1 parent abd9dac commit 99a7abc
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
# JQL.js
# jqljs
[![npm version](https://badge.fury.io/js/jqljs.svg)](https://badge.fury.io/js/jqljs)
[![Travis Status](https://travis-ci.org/zapkub/JQLjs.svg?branch=master)](https://travis-ci.org/zapkub/JQLjs)
[![Coverage Status](https://coveralls.io/repos/github/zapkub/JQLjs/badge.svg?branch=master)](https://coveralls.io/github/zapkub/JQLjs?branch=master)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

Query json structure in SQL-like manners

# Usage
**with npm/commonjs/webpack**
```
$ npm install jqljs --save
```
```js
const JQL = require('jqljs');
const collection = new JQL([/** your data */]);
// create query
const query = collection.select('*').where('name').match('^jo', 'i');
// result here
const result = query.fetch();
```

```HTML

**or with legacy script tag**
```HTML
<script src="dist/jql.min.js" type="text/javascript"></script>
```
```HTML
<script type="text/javascript">
var data = [{
name: 'John',
Expand All @@ -37,6 +51,10 @@ console.log(data.select('*').where('room').lessThan(200).orderBy('name').fetch()
# Limitation
- ``or`` conditions are not support yet

## TODO
- [ ] refactor legacy code
- [ ] coverage 80%++


## Development
> NOTE: commitizen welcome please read [Commitizen](https://github.com/commitizen/cz-cli)
Expand Down

0 comments on commit 99a7abc

Please sign in to comment.