Skip to content

verifyStringLengths() Helper Method

Documentation coming soon!

Module Code

ts
// ./src/helpers/verifyStringLengths.ts

import verifyType from './verifyType'

export default function ( data: string, minLength: number = 1, maxLength: number = 100 ): boolean {

    if ( verifyType(data, 'string') ) {

        return data.length >= minLength && data.length <= maxLength ? true : false

    }

    return false

}

Released under the MIT License