UNPKG

@ocap/util

Version:

utils shared across multiple forge js libs, works in both node.js and browser

10 lines (9 loc) 450 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getListField = void 0; const get_1 = __importDefault(require("lodash/get")); const getListField = (obj, key) => (0, get_1.default)(obj, `${key}List`) || (0, get_1.default)(obj, key) || []; exports.getListField = getListField;