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

react-router-sitemap-generator

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router-sitemap-generator - npm Package Compare versions

Comparing version 0.0.5 to 0.0.7

README.md

61

dist/Generator.js

@@ -8,2 +8,18 @@ "use strict";

var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -43,16 +59,16 @@

if (props != null) {
var children = props.children,
path = props.path;
var nestedComponent = props.children,
path = props.path,
propsComponents = props.component;
if (Array.isArray(children)) {
children === null || children === void 0 ? void 0 : children.forEach(function (child) {
components.push(child);
});
} else if (children != null) {
components.push(children);
}
if (path != null) {
this._paths.push(path);
}
components.push.apply(components, _toConsumableArray(this._getComponents(nestedComponent)));
components.push.apply(components, _toConsumableArray(this._getComponents(propsComponents === null || propsComponents === void 0 ? void 0 : propsComponents({
match: {
url: path
}
}))));
}

@@ -62,2 +78,17 @@ }

}, {
key: "_getComponents",
value: function _getComponents(components) {
var _components = [];
if (Array.isArray(components)) {
components === null || components === void 0 ? void 0 : components.forEach(function (child) {
_components.push(child);
});
} else if (components != null) {
_components.push(components);
}
return _components;
}
}, {
key: "getXML",

@@ -74,3 +105,8 @@ value: function getXML() {

var map = {
xml: '<?xml version="1.0" encoding="UTF-8"?>',
_declaration: {
_attributes: {
version: '1.0',
encoding: 'UTF-8'
}
},
urlset: {

@@ -86,4 +122,3 @@ url: this._paths.map(function (path) {

_attributes: {
version: '1.0',
encoding: 'utf-8'
xmlns: 'http://www.sitemaps.org/schemas/sitemap/0.9'
}

@@ -90,0 +125,0 @@ }

{
"name": "react-router-sitemap-generator",
"version": "0.0.5",
"version": "0.0.7",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "files": [

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