7.2.1 • Published 10 months ago
@promaster-sdk/property-filter-pretty v7.2.1
@promaster-sdk/property-filter-pretty
Pretty printing of property filters
Introduction
When a user selection of a PropertyValueSet is invalid according to a PropertyFilter it can be useful to show the filter to the user so he can correct his selections. However showing the raw filter syntax is not very helpful so this package has functions to convert the property filter syntax into human readable form.
Installation
npm install --save @promaster-sdk/property-filter-pretty
The library is compiled to ES5 and no polyfills are required.
Usage
import { PropertyFilter } from "@promaster-sdk/property";
import {
filterPrettyPrintIndented,
FilterPrettyPrintMessagesEnglish
} from "@promaster-sdk/property-filter-pretty";
const pf = PropertyFilter.fromString("a=1,2&b=3");
const pfPretty = filterPrettyPrintIndented(
FilterPrettyPrintMessagesEnglish,
2,
" "
pf
); // a should equal 1 or 2 and b should equal 37.2.1
10 months ago
7.2.0
1 year ago
7.1.0
1 year ago
7.0.1
2 years ago
7.0.0
2 years ago
6.1.0
3 years ago
6.0.1
3 years ago
6.0.0
4 years ago
5.0.3
5 years ago
5.0.2
5 years ago
5.0.1
5 years ago
5.0.0
5 years ago
4.0.0
6 years ago
3.0.3
6 years ago
3.0.2
6 years ago
3.0.1
6 years ago
3.0.0
6 years ago
2.6.0
6 years ago
2.5.0
6 years ago
2.4.1
7 years ago
2.4.0
7 years ago
2.3.1
7 years ago