From 291803c31f829fe0d32bb3207bc11def95a7408c Mon Sep 17 00:00:00 2001 From: Nevena Bojovic Date: Tue, 1 Mar 2022 20:05:50 +0100 Subject: Urađena test aplikacija. Povezan front i back. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Front/node_modules/lodash/wrapperReverse.js | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 sandbox/testAppNevena/Front/node_modules/lodash/wrapperReverse.js (limited to 'sandbox/testAppNevena/Front/node_modules/lodash/wrapperReverse.js') diff --git a/sandbox/testAppNevena/Front/node_modules/lodash/wrapperReverse.js b/sandbox/testAppNevena/Front/node_modules/lodash/wrapperReverse.js new file mode 100644 index 00000000..e93112a2 --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/lodash/wrapperReverse.js @@ -0,0 +1,44 @@ +var LazyWrapper = require('./_LazyWrapper'), + LodashWrapper = require('./_LodashWrapper'), + reverse = require('./reverse'), + thru = require('./thru'); + +/** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ +function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + 'func': thru, + 'args': [reverse], + 'thisArg': undefined + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); +} + +module.exports = wrapperReverse; -- cgit v1.2.3