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

react-shadow

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-shadow - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

5

example/js/weather.js

@@ -80,2 +80,3 @@ import React, { Component, PropTypes } from 'react';

const label = weather ? `${weather.main.temp}${String.fromCharCode(8451)}` : String.fromCharCode(8212);
const fheit = weather ? `${weather.main.temp * 9 / 5 + 32}${String.fromCharCode(8457)}` : '';

@@ -85,3 +86,3 @@ return (

<div className="my-weather">
<div className="weather">

@@ -91,3 +92,3 @@ <img src={filenameFor(country)} alt={country} />

<h1>{title}</h1>
<h2>{label}</h2>
<h2 title={fheit}>{label}</h2>

@@ -94,0 +95,0 @@ <ul>

16

example/server/default.js

@@ -1,12 +0,8 @@

(function($process) {
import http from 'http';
import express from 'express';
"use strict";
const app = express();
const server = http.createServer(app);
var express = require('express'),
app = express(),
server = require('http').createServer(app);
app.use(express.static(__dirname + '/..'));
server.listen($process.env.PORT || 5000);
})(process);
app.use(express.static(__dirname + '/example'));
server.listen(process.env.PORT || 5000);
{
"name": "react-shadow",
"version": "1.0.4",
"version": "1.0.5",
"description": "Utilise Shadow DOM in React with all the benefits of style encapsulation.",
"main": "dist/react-shadow.js",
"scripts": {
"start": "node example/server/default.js",
"start": "babel example/server/default.js | node",
"build": "webpack && npm run example",

@@ -36,2 +36,3 @@ "example": "webpack --config webpack.dev-config.js",

"axios-mock-adapter": "^1.6.1",
"babel-cli": "^6.14.0",
"babel-core": "^6.14.0",

@@ -38,0 +39,0 @@ "babel-loader": "^6.2.5",

@@ -23,3 +23,3 @@ ![Screenshot](media/screenshot.png)

<ShadowDOM cssDocuments={['css/core/calendar.css', props.theme]}>
<h1>Calendar</h1>
<h1>Calendar for {props.date}</h1>
</ShadowDOM>

@@ -26,0 +26,0 @@ );

@@ -22,4 +22,10 @@ import { get as fetch } from 'axios';

*/
const fetchStylesheet = memoize(document => fetch(document).then(response => response.data));
const fetchStylesheet = memoize(document => {
return new Promise(resolve => {
fetch(document).then(response => response.data).then(response => resolve(response)).catch(() => resolve(''));
});
});
/**

@@ -26,0 +32,0 @@ * @class ShadowDOM

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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