Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

logoots-utils

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logoots-utils - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

README.md

12

package.json
{
"name": "logoots-utils",
"version": "0.0.3",
"version": "0.0.4",
"description": "Helper providing several function manipulating strings or arrays",

@@ -14,4 +14,10 @@ "main": "utils.js",

],
"author": "Matthieu Nicolas",
"license": "ISC"
"author": {
"name": "Matthieu Nicolas"
},
"license": "ISC",
"readme": "ERROR: No README data found!",
"_id": "logoots-utils@0.0.3",
"_shasum": "b414ed9c71da1b7a0e98ae555786de3468790c8c",
"_from": "logoots-utils@"
}

@@ -75,3 +75,29 @@ module.exports = {

return copy;
},
occurrences: function (string, subString, allowOverlapping) {
var n;
var pos;
var step;
string += "";
subString += "";
if(subString.length<=0) {
return string.length+1;
}
n = 0;
pos = 0;
step = (allowOverlapping) ? (1) : (subString.length);
while(true) {
pos = string.indexOf(subString,pos);
if(pos>=0) {
n++;
pos += step;
}
else {
break;
}
}
return(n);
}
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc