Comparing version 0.1.7 to 0.1.8
{ | ||
"name": "words.js", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"description": "A flexible, robust and powerful Javascript word-string manipulation library.", | ||
@@ -5,0 +5,0 @@ "main": "words.min.js", |
@@ -9,4 +9,4 @@ words.js | ||
Where in strings.js you use shuffle to randomly reorder the characters in a string, in words.js the overloaded | ||
shuffle function randomly reorders the words in a string. This same idea applies to pretty much all methods of | ||
words.js, although some methods like .upper() and .lower(), combine word and character based manipulation. | ||
shuffle function randomly reorders the words in a string, or you can shuffle the characters of a specific word in | ||
a string, and much more. See the API for some sweet examples. | ||
<br/><br/> | ||
@@ -22,12 +22,12 @@ All indexes in words.js are 1 based. Negative indexes can be used in most functions. -1 references the last | ||
<br/> | ||
<br/> | ||
Use: | ||
```javascript | ||
var Types= Words.Types | ||
var Strings= Words.Strings | ||
var Words = require('words.js'); | ||
// to have the non-overloaded strings.js, but also the handy types.js | ||
// functions available as well use: | ||
var Types = require('words.js').Types; | ||
var Strings = require('words.js').Strings; | ||
// or | ||
var Types= require('words.js').Types; | ||
var Strings= require('words.js').Strings; | ||
var Types= Words.Types; | ||
var Strings= Words.Strings; | ||
``` | ||
to have the non-overloaded strings.js, but also the handy types.js functions available as well. | ||
___ | ||
@@ -37,4 +37,7 @@ | ||
developer much more pleasant and bug free IMHO. | ||
<br/> | ||
All input and output is type save; you can throw in any type and still get a string if the expected output is of | ||
type `<string>`. If any method receives an argument of a type it cannot process, the argument will simply be ignored. | ||
All examples are to be found in the API below. | ||
@@ -45,2 +48,5 @@ ___ | ||
Everywhere you see `<string>/<number>`, it means you can either enter a String or Number argument, both will be parsed | ||
correctly. | ||
**Words.prototype.constructor** | ||
@@ -120,9 +126,10 @@ > `<this> constructor( <string>/<number> string= '' )` | ||
```javascript | ||
var words= new Words('access all words and do whatever you like with them'); | ||
// dispose all words longer than 4 characters | ||
var words= new Words('words of more than 4 characters will be removed'); | ||
words.xs( function(word, index){ | ||
if( word.length < 4 ) | ||
if( word.length < 5 ) | ||
return true; | ||
}); | ||
console.log( words.$ ); | ||
// all and do you | ||
// of more than 4 will be | ||
@@ -129,0 +136,0 @@ var words= new Words('or mark words in a string'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34344
341