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

gatsby-link

Package Overview
Dependencies
Maintainers
1
Versions
693
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-link - npm Package Compare versions

Comparing version 1.0.0-alpha11-alpha.268aa2cc to 1.0.0-alpha11-alpha.2a65312c

README.md

23

index.js

@@ -1,10 +0,10 @@

'use strict';
"use strict";
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _react = require('react');
var _react = require("react");
var _react2 = _interopRequireDefault(_react);
var _Link = require('react-router/lib/Link');
var _Link = require("react-router/lib/Link");

@@ -15,3 +15,3 @@ var _Link2 = _interopRequireDefault(_Link);

var linkPrefix = '';
var linkPrefix = "";
if (__PREFIX_LINKS__) {

@@ -25,3 +25,3 @@ linkPrefix = __LINK_PREFIX__;

var GatsbyLink = _react2.default.createClass({
displayName: 'GatsbyLink',
displayName: "GatsbyLink",

@@ -31,3 +31,2 @@ propTypes: {

},
componentDidMount: function componentDidMount() {

@@ -38,18 +37,18 @@ var _this = this;

// don't support service workers *cough* Safari/IE *cough*.
if (process.env.NODE_ENV === 'production' && !('serviceWorker' in navigator)) {
if (process.env.NODE_ENV === "production" && !("serviceWorker" in navigator)) {
(function () {
var routes = window.gatsbyRootRoute;
var _require = require('history'),
var _require = require("history"),
createMemoryHistory = _require.createMemoryHistory;
var matchRoutes = require('react-router/lib/matchRoutes');
var getComponents = require('react-router/lib/getComponents');
var matchRoutes = require("react-router/lib/matchRoutes");
var getComponents = require("react-router/lib/getComponents");
var createLocation = createMemoryHistory().createLocation;
if (typeof routes !== 'undefined') {
if (typeof routes !== "undefined") {
matchRoutes([routes], createLocation(_this.props.to), function (error, nextState) {
getComponents(nextState, function () {
return console.log('loaded assets for ' + _this.props.to);
return console.log("loaded assets for " + _this.props.to);
});

@@ -56,0 +55,0 @@ });

{
"name": "gatsby-link",
"version": "1.0.0-alpha11-alpha.268aa2cc",
"version": "1.0.0-alpha11-alpha.2a65312c",
"description": "An enhanced Link component for Gatsby sites with support for resource prefetching",

@@ -5,0 +5,0 @@ "main": "index.js",

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