2.0.0 • Published 1 year ago

@6river/where-filter v2.0.0

Weekly downloads
504
License
MIT
Repository
github
Last release
1 year ago

where-filter

Effectively a fork of loopback-filters

Works according to Loopback Where Criteria spec. With the additional support for array predicates some and all.

some

const condition = {
	lines: {
		some: {
			status: 'good',
		},
	},
};

const data = {
	lines: [
		{
			status: 'good',
		},
		{
			status: 'bad',
		},
	],
};

const result = whereFilter(condition)(data);

console.log(result);
// true

all

const condition = {
	lines: {
		all: {
			status: 'good',
		},
	},
};

const data = {
	lines: [
		{
			status: 'good',
		},
		{
			status: 'good',
		},
	],
};

const result = whereFilter(condition)(data);

console.log(result);
// true
2.0.0

1 year ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.1-orb.10

3 years ago

1.2.1-orb.11

3 years ago

1.2.1-orb.9

3 years ago

1.2.1-orb.8

3 years ago

1.2.1-orb.7

3 years ago

1.2.1-orb.4

3 years ago

1.2.1-lodash.1

3 years ago

1.2.1-main.1

3 years ago

1.2.1-arTest.1

3 years ago

1.2.1-arTest.2

3 years ago

1.2.0

4 years ago

1.2.0-END.5

4 years ago

1.2.0-END.4

4 years ago

1.2.0-END.3

4 years ago

1.2.0-END.2

4 years ago

1.2.0-END.1

4 years ago

1.1.1

5 years ago

1.1.1-codecov.1

5 years ago

1.1.0

6 years ago

1.1.0-spruceUp.5

6 years ago

1.0.3

6 years ago