shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
simply
Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.string
This function take a string with accents, etc and convert it to a more simply version like “éàddö” to “eaddo”
Params
- string*-String
The string to simplyfy
- settings{}Object
An object of settings to simplify your string as you want:
Return
- -String
The simplified string
Example
import { simplify } from '@blackbyte/sugar/string';
simplify('éàddö'); // => eaddoSettings
- specialCharstrueBoolean
Specify if you want to get rid of the special chars like é, è, etc…
- lowerCasetrueBoolean
Specify if you want your returned string to be lowercased
- dashSpacetrueBoolean
Specify if you want to replace the ”_|-” by a space
- [trim=true}*-Boolean
Specify if you want your string to be trimed or not
Todo
- testsnormal
Author
- João Filipe Ventura Coelhojoaoventura93@outlook.com