How to use the startsWith function from underscore.string
Find comprehensive JavaScript underscore.string.startsWith code examples handpicked from public code repositorys.
GitHub: ticup/emotional
123 124 125 126 127 128 129 130 131 132 133
// throw Error("No sentiment corpus loaded"); // } // id = _str.pad(id.toString(), 8, "0"); // if (! (_str.startsWith(id, "n-") && // _str.startsWith(id, "v-") && // _str.startsWith(id, "a-") && // _str.startsWith(id, "r-"))) { // switch (pos) { // case NOUN:
7
36
4
+ 5 other calls in file
976 977 978 979 980 981 982 983 984 985
* @return {Boolean} if symbol language or not * @api public */ function isSymbolBasedLanguage() { var locale = Alloy.CFG.ocapi.default_locale; if (_s.startsWith(locale, 'ja') || _s.startsWith(locale, 'zh')) { return true; } else { return false; }
4
0
0
162 163 164 165 166 167 168 169 170 171
console.log(files[i] + ':', png); } function findExact(name, filename, width, height) { return _.find(graphics, function(g) { console.log('G:' + g); return _s.startsWith(g.filename, name) && (!filename || g.filename === filename) && (!width || g.width === width) && (!height || g.height === height); });
1
4
0
GitHub: bnclabs/cbsh
77 78 79 80 81 82 83 84 85 86 87
var modules = load_modules( path.join( __dirname, 'completors' )); return _u.object( _u.map( modules, function(c) { return [c.name, c] } )); } module.exports.completes = function( prefix, ls ) { var words = _u.filter( ls, function(s) {return _s.startsWith(s, prefix)} ); var len = prefix.length; var partials = _u.map( words, function(w) { return _s.splice(w, 0, len) } ); return { words:words, partials:partials };
0
2
2
GitHub: w3c-lbd-cg/opm
171 172 173 174 175 176 177 178 179 180
} }); }); return types; }).flatten().reject(item => { return _s.startsWith(item, '@'); }) .map(item => { if (_s.contains(item, '#')) { return _s.strLeftBack(item, '#') + '#';
0
1
0
+ 5 other calls in file
GitHub: khsmaxim/sef-1
58 59 60 61 62 63 64 65 66 67
if (headersLines.length === 0) { throw new InvalidRequestError('No headers'); } var cookieIndex = _.findIndex(headersLines, function (line) { return _s.startsWith(line, 'Cookie:'); }); var cookieLine; if (cookieIndex !== -1) { cookieLine = headersLines[cookieIndex];
1
0
0
+ 3 other calls in file
underscore.string.slugify is the most popular function in underscore.string (323 examples)