728x90 tags1 Firebase function - 태그 더하기 exports.addDocTag = functions.region("asia-northeast3").firestore .document("/Documents/{documentId}") .onWrite((snap, context) => { const snapshotDescription = snap.data().description; let reg = /@([\S]+)/igm; //regex let tags = (commentData['contents'].match(reg) || []).map(e => e.replace(reg, '$1')); if(tags.length>0){ functions.logger.log("Find tags ", context.params.documentId, tags); retur.. 2022. 1. 27. 이전 1 다음 728x90