logoots-utils
Advanced tools
+13
| **logoots-utils** is a NodeJS module. It implements some functions useful to create and edit data structures provided by the NodeJS module **logoots-structs**. | ||
| # Installation | ||
| ``` | ||
| npm install logoots-utils | ||
| ``` | ||
| # See also | ||
| * **logoots-structs** | ||
| * **logoots-texteditor-server** | ||
| * **logoots-texteditor-client** | ||
| * **demo-logoots-texteditor** |
+9
-3
| { | ||
| "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@" | ||
| } |
+26
-0
@@ -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); | ||
| } | ||
| }; |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
2966
53.36%3
50%98
32.43%1
-50%14
Infinity%