Skip to content

Latest commit

 

History

History
21 lines (12 loc) · 418 Bytes

toOnlyNumbers.md

File metadata and controls

21 lines (12 loc) · 418 Bytes

toOnlyNumbers

Removes all non-numeric characters from a string

Arguments

  • value: String: value to be format

Returns

  • string: String: A string with just numeric characters. If not exist number the return default is an empty

Usage

import { toOnlyNumbers } from '@platformbuilders/helpers'

toOnlyNumbers('683.905.690-27'); // return '68390569027'

toOnlyNumbers('abc'); // return ''