This commit is contained in:
8
node_modules/xml-utils/count-substring.js
generated
vendored
Normal file
8
node_modules/xml-utils/count-substring.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
function countSubstring(string, substring) {
|
||||
const pattern = new RegExp(substring, "g");
|
||||
const match = string.match(pattern);
|
||||
return match ? match.length : 0;
|
||||
}
|
||||
|
||||
module.exports = countSubstring;
|
||||
module.exports.default = countSubstring;
|
||||
Reference in New Issue
Block a user