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

jss-extend

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jss-extend - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

11

dist/jss-extend.js

@@ -73,6 +73,11 @@ (function webpackUniversalModuleDefinition(root, factory) {

function extend(newStyle, style) {
if (Array.isArray(style.extend)) {
for (var i = 0; i < style.extend.length; i++) {
extend(newStyle, style.extend[i]);
if (typeof style.extend == 'string') {
if (rule.options && rule.options.sheet) {
var refRule = rule.options.sheet.getRule(style.extend);
if (refRule) extend(newStyle, refRule.originalStyle);
}
} else if (Array.isArray(style.extend)) {
for (var index = 0; index < style.extend.length; index++) {
extend(newStyle, style.extend[index]);
}
} else {

@@ -79,0 +84,0 @@ for (var prop in style.extend) {

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.jssExtend=t():e.jssExtend=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){"use strict";function n(){return function(e){function t(e,n){if(Array.isArray(n.extend))for(var r=0;r<n.extend.length;r++)t(e,n.extend[r]);else for(var o in n.extend)"extend"===o?t(e,n.extend.extend):e[o]=n.extend[o];for(var o in n)"extend"!==o&&(e[o]=n[o]);return e}e.style&&e.style.extend&&(e.style=t({},e.style))}}t.__esModule=!0,t["default"]=n,e.exports=t["default"]}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.jssExtend=t():e.jssExtend=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){"use strict";function n(){return function(e){function t(n,o){if("string"==typeof o.extend){if(e.options&&e.options.sheet){var r=e.options.sheet.getRule(o.extend);r&&t(n,r.originalStyle)}}else if(Array.isArray(o.extend))for(var s=0;s<o.extend.length;s++)t(n,o.extend[s]);else for(var d in o.extend)"extend"===d?t(n,o.extend.extend):n[d]=o.extend[d];for(var d in o)"extend"!==d&&(n[d]=o[d]);return n}e.style&&e.style.extend&&(e.style=t({},e.style))}}t.__esModule=!0,t["default"]=n,e.exports=t["default"]}])});

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

## 1.1.0 / 2015-11-14
- allow extend value to be a name of a rule from the style sheet
## 1.0.0 / 2015-10-19

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

@@ -17,6 +17,11 @@ /**

function extend(newStyle, style) {
if (Array.isArray(style.extend)) {
for (var i = 0; i < style.extend.length; i++) {
extend(newStyle, style.extend[i]);
if (typeof style.extend == 'string') {
if (rule.options && rule.options.sheet) {
var refRule = rule.options.sheet.getRule(style.extend);
if (refRule) extend(newStyle, refRule.originalStyle);
}
} else if (Array.isArray(style.extend)) {
for (var index = 0; index < style.extend.length; index++) {
extend(newStyle, style.extend[index]);
}
} else {

@@ -23,0 +28,0 @@ for (var prop in style.extend) {

{
"name": "jss-extend",
"description": "JSS plugin that enables inheritance",
"version": "1.0.0",
"version": "1.1.0",
"author": {

@@ -36,9 +36,9 @@ "name": "Oleg Slobodskoi",

"babel-core": "^5.6.20",
"babel-eslint": "^3.1.23",
"babel-eslint": "4.1.3",
"babel-loader": "^5.3.1",
"eslint": "^0.24.1",
"eslint-config-airbnb": "^0.0.6",
"eslint-config-jss": "^0.1.0",
"eslint-plugin-react": "^2.7.0",
"jss": ">=3.0.0 < 4.0.0",
"eslint": "1.7.3",
"eslint-config-airbnb": "0.1.0",
"eslint-config-jss": "0.2.0",
"eslint-plugin-react": "3.6.3",
"jss": ">=3.1.1 < 4.0.0",
"opener": "^1.4.1",

@@ -50,4 +50,4 @@ "qunitjs": "1.15.0",

"peerDependencies": {
"jss": ">=3.0.0 < 4.0.0"
"jss": ">=3.1.1 < 4.0.0"
}
}
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