Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 25 lines (19 sloc) 0.485 kB
c92e021 @astro util: move getNodeUser(), getUserDomain()
astro authored
1 nodeRegexp = /^\/user\/([^\/]+)\/?(.*)/
2 exports.getNodeUser = (node) ->
3 unless node
4 return null
5
c06c15b @astro operations: CreateNode default config
astro authored
6 nodeRegexp.exec(node)?[1]
c92e021 @astro util: move getNodeUser(), getUserDomain()
astro authored
7
c06c15b @astro operations: CreateNode default config
astro authored
8 exports.getNodeType = (node) ->
9 unless node
10 return null
c92e021 @astro util: move getNodeUser(), getUserDomain()
astro authored
11
c06c15b @astro operations: CreateNode default config
astro authored
12 nodeRegexp.exec(node)?[2]
c92e021 @astro util: move getNodeUser(), getUserDomain()
astro authored
13
14 exports.getUserDomain = (user) ->
15 if user.indexOf('@') >= 0
16 user.substr(user.indexOf('@') + 1)
17 else
18 user
1cf051c @astro router: autosubscribeNewUsers
astro authored
19
20 exports.nodeTypes = [
21 "posts", "status",
22 "geo/previous", "geo/current", "geo/next",
23 "subscriptions"
24 ];
Something went wrong with that request. Please try again.