all files / api/toJSON/ galleryContent.js

100% Statements 5/5
75% Branches 3/4
100% Functions 1/1
100% Lines 5/5
1 2 3 4 5 6 7 8 9 10 11           
'use strict';
 
const R = require('ramda');
const createImage = require('./image');
 
module.exports = function (imageDimensions, galleryContent) {
 
    Eif(R.has('image', galleryContent) && !R.isNil(galleryContent.image)) {
        return createImage(imageDimensions, [{}, galleryContent.image]);
    }
};