Comparing version 1.2.1 to 1.3.0
@@ -6,2 +6,6 @@ # Changelog | ||
### 1.3.0 (2017-12-18) | ||
- Added unsubscribe method | ||
### 1.2.1 (2017-11-12) | ||
@@ -8,0 +12,0 @@ |
@@ -39,7 +39,14 @@ 'use strict'; | ||
function unsubscribe(context, subscriptionId) { | ||
if (context[CHANNEL]) { | ||
context[CHANNEL].unsubscribe(subscriptionId); | ||
} | ||
} | ||
return { | ||
contextTypes: contextTypes, | ||
initial: initial, | ||
subscribe: subscribe | ||
subscribe: subscribe, | ||
unsubscribe: unsubscribe | ||
}; | ||
} |
@@ -25,7 +25,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function unsubscribe(context, subscriptionId) { | ||
if (context[CHANNEL]) { | ||
context[CHANNEL].unsubscribe(subscriptionId); | ||
} | ||
} | ||
return { | ||
contextTypes: contextTypes, | ||
initial: initial, | ||
subscribe: subscribe | ||
subscribe: subscribe, | ||
unsubscribe: unsubscribe | ||
}; | ||
} |
{ | ||
"name": "theming", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"description": "Unified CSSinJS theming solution for React", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs", |
@@ -1,5 +0,3 @@ | ||
# theming | ||
# Theming | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/iamstarkov/theming.svg)](https://greenkeeper.io/) | ||
[![NPM version][npm-image]][npm-url] | ||
@@ -10,3 +8,3 @@ [![Build][travis-image]][travis-url] | ||
> Unified CSSinJS theming solution for React | ||
## Unified CSSinJS theming solution for React | ||
@@ -13,0 +11,0 @@ * `ThemeProvider` allows you to pass, update, merge and augment `theme` through context down react tree. |
@@ -25,2 +25,8 @@ import PropTypes from 'prop-types'; | ||
function unsubscribe(context, subscriptionId) { | ||
if (context[CHANNEL]) { | ||
context[CHANNEL].unsubscribe(subscriptionId); | ||
} | ||
} | ||
return { | ||
@@ -30,3 +36,4 @@ contextTypes, | ||
subscribe, | ||
unsubscribe, | ||
}; | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72576
1477
372