master
Conduitry 5 years ago
parent a818ebc2f0
commit ee1a795b27

@ -38,8 +38,8 @@ let recurse = obj => {
}
}
export default obj => {
export default args => {
array = []
recurse(obj)
args.forEach(recurse)
return array
}

@ -1,4 +1,3 @@
let lookup = new Map()
let get = symbol =>
lookup.has(symbol) ? lookup.get(symbol) : (lookup.set(symbol, lookup.size), lookup.size - 1)
let get = symbol => lookup.get(symbol) || (lookup.set(symbol, lookup.size + 1), lookup.size)
export default symbols => symbols.sort((a, b) => get(a) - get(b))

Loading…
Cancel
Save