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

  1. string*-String

    The string to simplyfy

  2. settings{}Object

    An object of settings to simplify your string as you want:

Return

  1. -String

    The simplified string

Example

import { simplify } from '@blackbyte/sugar/string';
simplify('éàddö'); // => eaddo

Settings

  1. specialCharstrueBoolean

    Specify if you want to get rid of the special chars like é, è, etc…

  2. lowerCasetrueBoolean

    Specify if you want your returned string to be lowercased

  3. dashSpacetrueBoolean

    Specify if you want to replace the ”_|-” by a space

  4. [trim=true}*-Boolean

    Specify if you want your string to be trimed or not

Todo

  • testsnormal

Author