WIP - add extractor, generate snippet_data
This commit is contained in:
10
node_modules/underscore.string/count.js
generated
vendored
Normal file
10
node_modules/underscore.string/count.js
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
var makeString = require('./helper/makeString');
|
||||
|
||||
module.exports = function(str, substr) {
|
||||
str = makeString(str);
|
||||
substr = makeString(substr);
|
||||
|
||||
if (str.length === 0 || substr.length === 0) return 0;
|
||||
|
||||
return str.split(substr).length - 1;
|
||||
};
|
||||
Reference in New Issue
Block a user