Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nuxt/utils

Package Overview
Dependencies
Maintainers
3
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxt/utils - npm Package Compare versions

Comparing version 2.14.4 to 2.14.5

42

dist/utils.js
/*!
* @nuxt/utils v2.14.4 (c) 2016-2020
* @nuxt/utils v2.14.5 (c) 2016-2020

@@ -1859,21 +1859,25 @@ * - All the amazing contributors

}
return function (...args) {
if (typeof base !== 'function') {
return fn.apply(this, args)
if (typeof base !== 'function') {
return fn
}
return function (arg0, ...args) {
const next = (previous = arg0) => {
const fnResult = fn.call(this, previous, ...args);
if (fnResult && typeof fnResult.then === 'function') {
return fnResult.then(res => res || previous)
}
return fnResult || previous
};
const baseResult = base.call(this, arg0, ...args);
if (baseResult && typeof baseResult.then === 'function') {
return baseResult.then(res => next(res))
}
let baseResult = base.apply(this, args);
// Allow function to mutate the first argument instead of returning the result
if (baseResult === undefined) {
[baseResult] = args;
}
const fnResult = fn.call(
this,
baseResult,
...Array.prototype.slice.call(args, 1)
);
// Return mutated argument if no result was returned
if (fnResult === undefined) {
return baseResult
}
return fnResult
return next(baseResult)
}

@@ -1880,0 +1884,0 @@ };

{
"name": "@nuxt/utils",
"version": "2.14.4",
"version": "2.14.5",
"repository": "nuxt/nuxt.js",

@@ -16,3 +16,3 @@ "license": "MIT",

"semver": "^7.3.2",
"serialize-javascript": "^4.0.0",
"serialize-javascript": "^5.0.0",
"signal-exit": "^3.0.3",

@@ -19,0 +19,0 @@ "ua-parser-js": "^0.7.21"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc