twing
Version:
First-class Twig engine for Node.js
20 lines (19 loc) • 727 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.maxSynchronously = exports.max = void 0;
const iterator_to_array_1 = require("../../../helpers/iterator-to-array");
const math_1 = require("locutus/php/math");
const max = (_executionContext, ...values) => {
if (values.length === 1) {
values = values[0];
}
return Promise.resolve((0, math_1.max)((0, iterator_to_array_1.iteratorToArray)(values)));
};
exports.max = max;
const maxSynchronously = (_executionContext, ...values) => {
if (values.length === 1) {
values = values[0];
}
return (0, math_1.max)((0, iterator_to_array_1.iteratorToArray)(values));
};
exports.maxSynchronously = maxSynchronously;