Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
riot.route(function (decimal, name) {
var scale = /^\d{4}$/.test(decimal) ? Scale.get(+decimal) : null
if (scale) {
if (!/^\s*$/.test(name)) {
name = (name in scale.names()) ? name : scale.name()
app.select(name || scale.decimal)
} else {
route(scale.decimal, scale.name() || scale.binary)
}
} else {
var clean = decodeURIComponent(name)
scale = Scale.get(clean)
if (scale) route(scale.decimal, name)
}
})
riot.route(function (decimal, name) {
var scale = /^\d{4}$/.test(decimal) ? Scale.get(+decimal) : null
if (scale) {
if (!/^\s*$/.test(name)) {
name = (name in scale.names()) ? name : scale.name()
app.select(name || scale.decimal)
} else {
route(scale.decimal, scale.name() || scale.binary)
}
} else {
var clean = decodeURIComponent(name)
scale = Scale.get(clean)
if (scale) route(scale.decimal, name)
}
})
riot.route(function (decimal, name) {
var scale = /^\d{4}$/.test(decimal) ? Scale.get(+decimal) : null
if (scale) {
if (!/^\s*$/.test(name)) {
name = (name in scale.names()) ? name : scale.name()
app.select(name || scale.decimal)
} else {
route(scale.decimal, scale.name() || scale.binary)
}
} else {
var clean = decodeURIComponent(name)
scale = Scale.get(clean)
if (scale) route(scale.decimal, name)
}
})
riot.route(function (decimal, name) {
var scale = /^\d{4}$/.test(decimal) ? Scale.get(+decimal) : null
if (scale) {
if (!/^\s*$/.test(name)) {
name = (name in scale.names()) ? name : scale.name()
app.select(name || scale.decimal)
} else {
route(scale.decimal, scale.name() || scale.binary)
}
} else {
var clean = decodeURIComponent(name)
scale = Scale.get(clean)
if (scale) route(scale.decimal, name)
}
})
get: function (name, root) {
return scaleData(name, root, Scale.get(name))
},
build: function () {
get: function (name, root) {
return scaleData(name, root, Scale.get(name))
},
build: function () {