This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const admin = require('firebase-admin'); | |
| const fs = require('fs'); | |
| const serviceAccount = require('../../../../../../Private/myschool-data_transfer-key.json'); | |
| admin.initializeApp({ credential: admin.credential.cert(serviceAccount) }); | |
| const schema = require('./schema').schema; | |
| const firestore2json = (db, schema, current) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:(function() { | |
| function extractText(element) { | |
| if (element.nodeType === Node.TEXT_NODE) { | |
| return element.textContent.trim() + ' '; | |
| } | |
| if (element.nodeType !== Node.ELEMENT_NODE) { | |
| return ''; | |
| } | |
| let text = ''; | |
| for (const child of element.childNodes) { |