blob: 8a731c8edda8f19e168ed2d65714697d841d0f51 [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
var h = require('mercury').h;
module.exports = {
'shouldFormat': shouldFormat,
'format': format
};
/*
* The input is empty in various cases.
*/
function shouldFormat(input) {
return input === undefined || input === null || input === '' ||
(input instanceof Array && input.length === 0);
}
/*
* Indicate that nothing was there.
*/
function format(input) {
return h('span', '<no data>');
}