Skip to main content
deleted 8 characters in body
Source Link
alsotang
  • 1.6k
  • 1
  • 15
  • 15

Number(process.version.match(/^v(\d+\.\d+)/)[1])

if process.version is 'v0.11.5', then get 0.11 (Number).

Number(process.version.match(/^v(\d+\.\d+)/)[1])

if process.version is 'v0.11.5', then get 0.11 (Number).

process.version.match(/^v(\d+\.\d+)/)[1]

if process.version is 'v0.11.5', then get 0.11 .

Source Link
alsotang
  • 1.6k
  • 1
  • 15
  • 15

Number(process.version.match(/^v(\d+\.\d+)/)[1])

if process.version is 'v0.11.5', then get 0.11 (Number).