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

jss-isolate

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jss-isolate - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

4

changelog.md

@@ -0,1 +1,5 @@

## 1.0.3 / 2016-11-23
- support jss.createRule(styles) without a sheet
## 1.0.2 / 2016-11-05

@@ -2,0 +6,0 @@

3

dist/jss-isolate.js

@@ -94,3 +94,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

var sheet = void 0;
var sheet = null;
var resetRule = void 0;

@@ -101,2 +101,3 @@ var selectors = [];

if (rule.type !== 'regular') return;
if (!rule.options.sheet) return;
if (rule.options.sheet === sheet) return;

@@ -103,0 +104,0 @@ if (rule.options.sheet.options.isolate === false) return;

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.jssIsolate=t():e.jssIsolate=t()}(this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=void 0,o=void 0,n=[];return function(r){if("regular"===r.type&&r.options.sheet!==t&&r.options.sheet.options.isolate!==!1&&(!r.options.parent||"keyframe"!==r.options.parent.type)){if(r.style&&r.style.isolate===!1)return void delete r.style.isolate;if(!t&&r.options.jss){t=r.options.jss.createStyleSheet({},{link:!0,meta:"jss-isolate"});var s=e.reset?i({},a.default,e.reset):a.default;o=t.addRule("reset",s),t.attach()}n.indexOf(r.selector)===-1&&n.push(r.selector),u(o,n)}}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e};t.default=r;var s=o(1),a=n(s),l=function(e){var t=void 0;return function(){for(var o=arguments.length,n=Array(o),r=0;r<o;r++)n[r]=arguments[r];clearTimeout(t),t=setTimeout(function(){return e.apply(void 0,n)})}},u=l(function(e,t){e.selector=t.join(",\n")})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={"border-collapse":"separate","border-spacing":"0","caption-side":"top",cursor:"auto",direction:"ltr","empty-cells":"show","font-family":"serif","font-size":"medium","font-style":"normal","font-variant":"normal","font-weight":"normal","font-stretch":"normal","line-height":"normal",hyphens:"none","letter-spacing":"normal","list-style":"disc outside none","tab-size":"8","text-align":"left","text-align-last":"auto","text-indent":"0","text-shadow":"none","text-transform":"none",visibility:"visible","white-space":"normal",widows:"2","word-spacing":"normal"}}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.jssIsolate=t():e.jssIsolate=t()}(this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null,o=void 0,n=[];return function(r){if("regular"===r.type&&r.options.sheet&&r.options.sheet!==t&&r.options.sheet.options.isolate!==!1&&(!r.options.parent||"keyframe"!==r.options.parent.type)){if(r.style&&r.style.isolate===!1)return void delete r.style.isolate;if(!t&&r.options.jss){t=r.options.jss.createStyleSheet({},{link:!0,meta:"jss-isolate"});var i=e.reset?s({},a.default,e.reset):a.default;o=t.addRule("reset",i),t.attach()}n.indexOf(r.selector)===-1&&n.push(r.selector),u(o,n)}}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e};t.default=r;var i=o(1),a=n(i),l=function(e){var t=void 0;return function(){for(var o=arguments.length,n=Array(o),r=0;r<o;r++)n[r]=arguments[r];clearTimeout(t),t=setTimeout(function(){return e.apply(void 0,n)})}},u=l(function(e,t){e.selector=t.join(",\n")})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={"border-collapse":"separate","border-spacing":"0","caption-side":"top",cursor:"auto",direction:"ltr","empty-cells":"show","font-family":"serif","font-size":"medium","font-style":"normal","font-variant":"normal","font-weight":"normal","font-stretch":"normal","line-height":"normal",hyphens:"none","letter-spacing":"normal","list-style":"disc outside none","tab-size":"8","text-align":"left","text-align-last":"auto","text-indent":"0","text-shadow":"none","text-transform":"none",visibility:"visible","white-space":"normal",widows:"2","word-spacing":"normal"}}])});
//# sourceMappingURL=jss-isolate.min.js.map

@@ -38,3 +38,3 @@ 'use strict';

var sheet = void 0;
var sheet = null;
var resetRule = void 0;

@@ -45,2 +45,3 @@ var selectors = [];

if (rule.type !== 'regular') return;
if (!rule.options.sheet) return;
if (rule.options.sheet === sheet) return;

@@ -47,0 +48,0 @@ if (rule.options.sheet.options.isolate === false) return;

@@ -209,2 +209,20 @@ 'use strict';

});
describe('createRule()', function () {
it('should not create reset sheet', function () {
jss.createRule({
color: 'red'
});
(0, _expect2['default'])(jss.sheets.registry.length).to.be(0);
});
it('should not throw', function () {
(0, _expect2['default'])(function () {
jss.createRule({
color: 'red'
});
}).to.not.throwException();
});
});
});
{
"name": "jss-isolate",
"description": "True rules isolation through automatic inheritable properties reset.",
"version": "1.0.2",
"version": "1.0.3",
"author": {

@@ -6,0 +6,0 @@ "name": "Maksim Koretskiy",

@@ -38,3 +38,3 @@ 'use strict';

var sheet = void 0;
var sheet = null;
var resetRule = void 0;

@@ -45,2 +45,3 @@ var selectors = [];

if (rule.type !== 'regular') return;
if (!rule.options.sheet) return;
if (rule.options.sheet === sheet) return;

@@ -47,0 +48,0 @@ if (rule.options.sheet.options.isolate === false) return;

@@ -209,2 +209,20 @@ 'use strict';

});
describe('createRule()', function () {
it('should not create reset sheet', function () {
jss.createRule({
color: 'red'
});
(0, _expect2['default'])(jss.sheets.registry.length).to.be(0);
});
it('should not throw', function () {
(0, _expect2['default'])(function () {
jss.createRule({
color: 'red'
});
}).to.not.throwException();
});
});
});

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