utilizes.suffix
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

suffix

Adding fix to the end of a string only if the string is present.

Usage: suffix(value: string, fix: string): string

import { suffix } from 'utilizes.suffix'

suffix('Mr ', 'john')
// Output: 'Mr john'
suffix('Mr ', null)
// Output: 'Mr '
suffix(null, 'john')
// Output: ''

This module exported from utilizes project.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i utilizes.suffix

      Weekly Downloads

      1

      Version

      1.0.2

      License

      MIT

      Unpacked Size

      2.73 kB

      Total Files

      5

      Last publish

      Collaborators

      • natqe3