De-python-ization
This commit is contained in:
parent
17dc5ab169
commit
53b6a98edc
2 changed files with 3 additions and 3 deletions
|
@ -70,8 +70,8 @@ exports.trbl = (raw, name, _default=0) => units => {
|
||||||
|
|
||||||
exports.asym = (raw, name) => {
|
exports.asym = (raw, name) => {
|
||||||
// allow different aliases
|
// allow different aliases
|
||||||
source_aliases = ['source', 'origin', 'base', 'primary', 'left']
|
const source_aliases = ['source', 'origin', 'base', 'primary', 'left']
|
||||||
clone_aliases = ['clone', 'image', 'derived', 'secondary', 'right']
|
const clone_aliases = ['clone', 'image', 'derived', 'secondary', 'right']
|
||||||
_in(raw, name, ['both'].concat(source_aliases, clone_aliases))
|
_in(raw, name, ['both'].concat(source_aliases, clone_aliases))
|
||||||
// return aliases to canonical names
|
// return aliases to canonical names
|
||||||
if (source_aliases.includes(raw)) return 'source'
|
if (source_aliases.includes(raw)) return 'source'
|
||||||
|
|
|
@ -128,7 +128,7 @@ exports.parse = (config, name, points={}, units={}, asym='source') => {
|
||||||
|
|
||||||
// otherwise, it is treated as a condition to filter all available points
|
// otherwise, it is treated as a condition to filter all available points
|
||||||
} else {
|
} else {
|
||||||
source = Object.values(points).filter(complex(config, name, units))
|
const source = Object.values(points).filter(complex(config, name, units))
|
||||||
if (['source', 'both'].includes(asym)) {
|
if (['source', 'both'].includes(asym)) {
|
||||||
result = result.concat(source)
|
result = result.concat(source)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue