7.0.1 • Published 1 month ago

@promaster-sdk/property-filter-pretty v7.0.1

Weekly downloads
455
License
MIT
Repository
github
Last release
1 month ago

@promaster-sdk/property-filter-pretty

npm version code style: prettier types MIT license

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 3
7.0.1

1 month ago

7.0.0

3 months ago

6.1.0

1 year ago

6.0.1

1 year ago

6.0.0

2 years ago

5.0.3

3 years ago

5.0.2

4 years ago

5.0.1

4 years ago

5.0.0

4 years ago

4.0.0

4 years ago

3.0.3

4 years ago

3.0.2

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.6.0

5 years ago

2.5.0

5 years ago

2.4.1

5 years ago

2.4.0

5 years ago

2.3.1

5 years ago