Last active
May 17, 2021 01:28
-
-
Save yuchenQ/245533198f2d127608f96763b7bf0bfd to your computer and use it in GitHub Desktop.
PFA criteria 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const largerThan = [5000]; // >= 5000 ? > 5000 ? | |
const smallerThan1 = [1, 5000] // <= 5000 ? | |
const smallerThan2 = [0, 4999] // < 5000 ? | |
const equal = [1, 1]; | |
// 3 X 3 OR 4 X 4 OR 5 X 5 | |
const pouch = { | |
id: 'pouch-ptr-id', | |
criteria: { | |
base: [ | |
{ | |
type: 'width', | |
range: [3000, 3000], | |
}, | |
{ | |
type: 'height', | |
range: [3000, 3000], | |
}, | |
], | |
// alternative is a list of metrics: | |
alternative: [ | |
[ | |
{ | |
type: 'width', | |
range: [4000, 4000], | |
}, | |
{ | |
type: 'height', | |
range: [4000, 4000], | |
}, | |
], | |
[ | |
{ | |
type: 'width', | |
range: [5000, 5000], | |
}, | |
{ | |
type: 'height', | |
range: [5000, 5000], | |
}, | |
], | |
], | |
}, | |
}; | |
// 5 X 5 only | |
const sticker = { | |
id: 'sticker-ptr-id', | |
criteria: { | |
base: [ | |
{ | |
type: 'width', | |
value: [5000, 5000], | |
}, | |
{ | |
type: 'height', | |
value: [5000, 5000], | |
}, | |
], | |
alternative: [], // do we need this? | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment