This is used to extract Numbers only.
npm i extractnumbersonly --save
Then...
import {extractnumbersonly} from 'extractnumbersonly'
var str="hello1234world"
extractnumbersonly(str)
"type":"module"
Extract Numbers only
var str="hello1234world"