2020-08-20 02:05:34 +02:00
|
|
|
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
|
exports.extendWithAge = exports.isWithAge = void 0;
|
|
|
|
function isWithAge(obj) {
|
2020-08-18 14:04:33 +02:00
|
|
|
return typeof obj['age'] === 'number';
|
|
|
|
}
|
2020-08-20 02:05:34 +02:00
|
|
|
exports.isWithAge = isWithAge;
|
|
|
|
function extendWithAge(sourceObj, age) {
|
2020-08-18 14:04:33 +02:00
|
|
|
const extension = { age };
|
|
|
|
return Object.assign({}, sourceObj, extension);
|
|
|
|
}
|
2020-08-20 02:05:34 +02:00
|
|
|
exports.extendWithAge = extendWithAge;
|
2020-08-18 14:04:33 +02:00
|
|
|
//# sourceMappingURL=WithAge.js.map
|