Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const line = (p) => {
const r = parse.line(p)
if (!r) return null
if (r.productCode) {
r.productCode = parseInt(r.productCode)
r.product = (util.products.categories[r.productCode] || {}).type || null
r.mode = modes[r.productCode]
r.public = true
} else if (r.class) {
r.product = (util.products.bitmasks[r.class] || {}).type || null
r.mode = modesByClass[r.class]
r.public = true
}
if (r.name) {
r.id = slugg(r.name.trim())
const l = parseLineName(r.name)
if (l && l.type) {