From 38acabfa6089ab8ac469c12b5f55022fb96935e5 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 23 Aug 2021 16:46:06 -0300 Subject: added web vendors --- date-fns/src/addMonths/benchmark.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 date-fns/src/addMonths/benchmark.js (limited to 'date-fns/src/addMonths/benchmark.js') diff --git a/date-fns/src/addMonths/benchmark.js b/date-fns/src/addMonths/benchmark.js new file mode 100644 index 0000000..13f5203 --- /dev/null +++ b/date-fns/src/addMonths/benchmark.js @@ -0,0 +1,21 @@ +// @flow +/* eslint-env mocha */ +/* global suite, benchmark */ + +import addMonths from '.' +import moment from 'moment' + +suite('addMonths', function () { + benchmark('date-fns', function () { + return addMonths(this.date, 4) + }) + + benchmark('Moment.js', function () { + return this.moment.add(4, 'months') + }) +}, { + setup: function () { + this.date = new Date() + this.moment = moment() + } +}) -- cgit v1.2.3