Skip to content

thipages/jca-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JCA-FILTER

Facilitate filters creation for JS-CRUD-API

Installation

  • via npm : npm i jca_filter
import jca_filter from 'jca_filter';
// then
jca_filter(logic,otherConditions={});
  • via HTML
<script src="min.js"></script>
<script>
    // then
    jca_filter(logic,otherConditions={});
</script>

Example

const conditions=jca_filter(
    "('field1,eq,val1' OR 'field2,eq,val2') AND 'field3,eq,val3'",
    {order:'field1'}
);
/**
 * conditions content
 * 
 * {
 *   filter: ["field1,eq,val1","field3,eq,val3"],
 *   filter1: ["field2,eq,val2","field3,eq,val3"],
 *   order: "field1"
 * }
 * 
*/

see live example

LIMITATION

only OR and AND operators are available

About

Facilitates filters creation for JS-CRUD-API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published