1
0
mirror of https://github.com/oceanprotocol/community-numbers.git synced 2024-11-21 17:27:01 +01:00

update comments

This commit is contained in:
Norbi 2021-02-04 13:15:41 +02:00
parent ec03e58149
commit 6d73ab7153

View File

@ -12,9 +12,9 @@ export default async function fetchDiscord() {
// extract members count from meta description
const metaDescription = data('meta[name="description"]').attr('content')
const regex = /\d+[,]\d+/ // one or more digits
const regex = /\d+[,]\d+/ // one or more digits separated by comma
const number = metaDescription.match(regex)
const membersNumber = number[0].replace(/,/,'')
const membersNumber = number[0].replace(/,/,'') // eliminate comma from number
const members = parseInt(membersNumber)
log(