HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /proc/self/root/usr/share/node_modules/libtap/lib/
Upload File :
Current File : //proc/self/root/usr/share/node_modules/libtap/lib/obj-to-yaml.js
'use strict'

const yaml = require('tap-yaml')
const cleanYamlObject = require('./clean-yaml-object.js')

module.exports = obj => (clean =>
  (clean && typeof clean === 'object' && Object.keys(clean).length) ?
    '  ---\n' + (yaml.stringify(clean).split('\n').map(
      l => l.trim() ? '  ' + l : l.trim()
    ).join('\n')) + '  ...\n'
    : ''
)(cleanYamlObject(obj))