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

@elderjs/plugin-random

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elderjs/plugin-random - npm Package Compare versions

Comparing version 0.1.40 to 0.1.41

19

index.js

@@ -5,3 +5,19 @@ const notProduction = process.env.NODE_ENV !== 'production';

description: 'Adds a /random/ page on previewer requests that displays all of the possible routes.',
init: (plugin) => {},
minimumElderjsVersion: '1.4.13',
init: (plugin) => {
// version check
let enabled = false;
if (plugin.settings.version) {
const [major, minor, patch] = plugin.settings.version.split('.');
if (major > 1) enabled = true;
if (major === 1 && minor > 4) enabled = true;
if (major === 1 && minor === 4 && patch >= 13) enabled = true;
}
if (!enabled) {
plugin.hooks = [];
plugin.routes = {};
console.error('@elderjs/plugin-random requires Elder.js v1.4.13 or greater. Plugin disabled.');
}
return plugin;
},
routes: {

@@ -11,2 +27,3 @@ pluginRandom: {

template: 'Random.svelte',
layout: 'RandomLayout.svelte',
permalink: ({ request }) => {

@@ -13,0 +30,0 @@ if (request.slug && request.realRoute) return `/random/${request.realRoute}/`;

2

package.json
{
"name": "@elderjs/plugin-random",
"version": "0.1.40",
"version": "0.1.41",
"description": "Easily preview a random page of a route by visiting a single url. This plugin should be used exclusively for development.",

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

Sorry, the diff of this file is not supported yet

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