repo.or.cz
/
gitter.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge branch 'hotfix/21.56.9' into master
[gitter.git]
/
shared
/
get-org-name-from-troupe-name.js
blob
f5bb2a044f949547b176687b94e14ac6497e2421
1
'use strict'
;
2
3
module
.
exports
=
function
getOrgNameFromTroupeName
(
name
) {
4
name
=
name
||
''
;
5
if
(
name
[
0
] ===
'/'
) {
6
name
=
name
.
substring
(
1
);
7
}
8
return
/\//
.
test
(
name
) ?
name
.
split
(
'/'
)[
0
] :
name
;
9
};