isUrlCompliant

Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.string

This function check if the passed string is url compliant. This mean that it has no spaces, and no special characters

Params

  1. string*-String

    The string to process

Return

  1. -Boolean

    true if compliant, false if not

Example

import { isUrlCompliant } from '@blackbyte/sugar/string';
isUrlCompliant('Hello world'); // false
isUrlCompliant('/something/cool'); // true

Todo

  • testsnormal