15 lines
420 B
JavaScript
15 lines
420 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.nullIfEmpty = nullIfEmpty;
|
|
/**
|
|
* A useful tool when doing a getInputSpec.
|
|
* Look into the inputSpec {@link FileHelper} for an example of the use.
|
|
* @param s
|
|
* @returns
|
|
*/
|
|
function nullIfEmpty(s) {
|
|
if (s === null)
|
|
return null;
|
|
return Object.keys(s).length === 0 ? null : s;
|
|
}
|
|
//# sourceMappingURL=nullIfEmpty.js.map
|