Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

process-upcoming-changes.js 542 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  1. const yaml = require('js-yaml')
  2. const { groupBy } = require('lodash')
  3. const renderContent = require('../../../lib/render-content')
  4. module.exports = async function processUpcomingChanges (upcomingChangesYml) {
  5. const upcomingChanges = yaml.safeLoad(upcomingChangesYml).upcoming_changes
  6. for (const change of upcomingChanges) {
  7. change.date = change.date.slice(0, 10)
  8. change.reason = await renderContent(change.reason)
  9. change.description = await renderContent(change.description)
  10. }
  11. return groupBy(upcomingChanges, 'date')
  12. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...