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.4.3 to 2.4.5

34

dist/utils.js
/*!
* @nuxt/utils v2.4.3 (c) 2016-2019
* @nuxt/utils v2.4.5 (c) 2016-2019

@@ -1364,10 +1364,10 @@ * - All the amazing contributors

*/
function baseGet(object, path$$1) {
path$$1 = _castPath(path$$1, object);
function baseGet(object, path) {
path = _castPath(path, object);
var index = 0,
length = path$$1.length;
length = path.length;
while (object != null && index < length) {
object = object[_toKey(path$$1[index++])];
object = object[_toKey(path[index++])];
}

@@ -1404,4 +1404,4 @@ return (index && index == length) ? object : undefined;

*/
function get(object, path$$1, defaultValue) {
var result = object == null ? undefined : _baseGet(object, path$$1);
function get(object, path, defaultValue) {
var result = object == null ? undefined : _baseGet(object, path);
return result === undefined ? defaultValue : result;

@@ -1413,18 +1413,18 @@ }

const flatRoutes = function flatRoutes(router, _path = '', routes = []) {
router.forEach((r$$1) => {
if ([':', '*'].some(c => r$$1.path.includes(c))) {
router.forEach((r) => {
if ([':', '*'].some(c => r.path.includes(c))) {
return
}
/* istanbul ignore if */
if (r$$1.children) {
if (_path === '' && r$$1.path === '/') {
if (r.children) {
if (_path === '' && r.path === '/') {
routes.push('/');
}
return flatRoutes(r$$1.children, _path + r$$1.path + '/', routes)
return flatRoutes(r.children, _path + r.path + '/', routes)
}
_path = _path.replace(/^\/+$/, '/');
routes.push(
(r$$1.path === '' && _path[_path.length - 1] === '/'
(r.path === '' && _path[_path.length - 1] === '/'
? _path.slice(0, -1)
: _path) + r$$1.path
: _path) + r.path
);

@@ -1456,4 +1456,4 @@ });

} // clean first / for parents
routesIndex.forEach((r$$1) => {
const i = r$$1.indexOf('index') - start; // children names
routesIndex.forEach((r) => {
const i = r.indexOf('index') - start; // children names
if (i < paths.length) {

@@ -1464,3 +1464,3 @@ for (let a = 0; a <= i; a++) {

}
if (a < i && names[a] !== r$$1[a]) {
if (a < i && names[a] !== r[a]) {
break

@@ -1467,0 +1467,0 @@ }

{
"name": "@nuxt/utils",
"version": "2.4.3",
"version": "2.4.5",
"repository": "nuxt/nuxt.js",

@@ -5,0 +5,0 @@ "license": "MIT",

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