mirror of
https://github.com/wassname/side-by-side.git
synced 2026-09-11 12:44:22 +08:00
No unnecessary parens
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
angular.module("sideBySide").service "route", ['$location', ($location) ->
|
||||
@params = $location.path()
|
||||
.split('/')
|
||||
.filter((item) -> item)
|
||||
.map (item) ->
|
||||
item.split(':')
|
||||
.split '/'
|
||||
.filter (item) -> item
|
||||
.map (item) -> item.split ':'
|
||||
.reduce((params, param) ->
|
||||
key = param.shift()
|
||||
|
||||
if (param.length > 1)
|
||||
value = {}
|
||||
value[param[0]] = param[1].split(',')
|
||||
value[param[0]] = param[1].split ','
|
||||
else
|
||||
value = param[0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user