Sun calculation js library which is fully based on formula from http://aa.quae.nl/en/reken/zonpositie.html
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
369 B
12 lines
369 B
'use strict'
|
|
|
|
const cleanYamlObject = require('./clean-yaml-object.js')
|
|
const yaml = require('js-yaml')
|
|
|
|
module.exports = obj => (clean =>
|
|
(clean && typeof clean === 'object' && Object.keys(clean).length) ?
|
|
' ---\n' + (yaml.safeDump(clean).split('\n').map(
|
|
l => l.trim() ? ' ' + l : l.trim()
|
|
).join('\n')) + ' ...\n'
|
|
: ''
|
|
)(cleanYamlObject(obj))
|
|
|