All files / src/plugins/id/serializers id.js

100% Statements 10/10
75% Branches 3/4
100% Functions 2/2
100% Lines 8/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 151x     100x 100x 100x   100x 483x 483x     100x    
module.exports = {
  name: 'id',
  desc: 'applies Object.prototype.toString to the input and joins without newlines.',
  func: ({}) => jsons => {
    let str   = ''
    const err = []
 
    for (let index = 0; index < jsons.length; index++) {
      const obj = jsons[index]
      Eif (typeof obj !== 'undefined' && obj !== null) str += obj.toString()
    }
 
    return {err, str}
  }
}