How to use the strRight function from underscore.string

Find comprehensive JavaScript underscore.string.strRight code examples handpicked from public code repositorys.

223
224
225
226
227
228
229
230
231
232
}
separateValueUnit(string) {
    var str = _s.clean(string);
    if (_s.contains(str, ' ')) {
        var value = _s.strLeft(str, ' ');
        var unit = _s.strRight(str, ' ');
    }
    else {
        var value = str;
    }
fork icon0
star icon1
watch icon0

+ 5 other calls in file

226
227
228
229
230
231
232
233
234
235
console.log(d);
var res = JSON.parse(d.replace("database.namespaces", "ns")).ns;
if (res) {
    return _.map(res, x => {
        var prefix = _s.strLeft(x, "=");
        var uri = _s.strRight(x, "=");
        return { prefix: prefix, uri: uri };
    });
}
else {
fork icon0
star icon1
watch icon0

+ 2 other calls in file

15
16
17
18
19
20
21
22
23
24
25
    #DEPLOY h2 { @apply text-2xl; }
    #DEPLOY p span { @apply text-gray-500 mr-1; }
  </style>
`)


let deployId = _s.strRight(window.location.pathname, 'deploy/')
log(deployId)
deployId = _s.strLeftBack(deployId, '/log')
log(deployId)

fork icon2
star icon0
watch icon0

5
6
7
8
9
10
11
12
13
14
15


module.exports = () => {
  if(window.location.pathname.search('test') === -1) return false 
  if(window.location.pathname.search('result') === -1) return
  
  const testId = _s.strRight(window.location.pathname, 'result/')
  let test 
  let subdomain = ''
  let deployUrl 
  let deployType = 'regtest cloud'
fork icon2
star icon0
watch icon0

576
577
578
579
580
581
582
583
584
585
if(!url){
    console.error( 'wrong url:'+url);
    then(null);
}

var imgurl = _s.strRight(url, "://");
console.log( 'imgurl:'+imgurl);
var host = _s.strLeft(imgurl, "/");
console.log( 'host:'+host);
//var path = _s.strRight(imgurl, "/");
fork icon0
star icon0
watch icon0

+ 3 other calls in file