@humblejs/context
Advanced tools
Comparing version 1.9.8 to 1.9.9
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports.createContext = exports.BaseContext = exports.withContext = exports.Consumer = exports.Provider = undefined; | ||
exports.createWithContext = exports.createContext = undefined; | ||
@@ -81,25 +81,23 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
var createWithContext = function createWithContext(Consumer) { | ||
return function () { | ||
return withConsumerContext(Consumer).apply(undefined, arguments); | ||
}; | ||
}; | ||
var createContext = function createContext() { | ||
var BaseContext = _react2.default.createContext(); | ||
var _React$createContext = _react2.default.createContext(), | ||
Provider = _React$createContext.Provider, | ||
Consumer = _React$createContext.Consumer; | ||
return { | ||
Provider: BaseContext.Provider, | ||
Consumer: BaseContext.Consumer, | ||
withContext: function withContext() { | ||
return withConsumerContext(BaseContext.Consumer).apply(undefined, arguments); | ||
}, | ||
BaseContext: BaseContext, | ||
v: 1 | ||
Provider: Provider, | ||
Consumer: Consumer, | ||
withContext: createWithContext(Consumer) | ||
}; | ||
}; | ||
var _createContext = createContext(); | ||
// export const { Provider, Consumer, withContext } = createContext(); | ||
var Provider = _createContext.Provider, | ||
Consumer = _createContext.Consumer, | ||
withContext = _createContext.withContext, | ||
BaseContext = _createContext.BaseContext; | ||
exports.Provider = Provider; | ||
exports.Consumer = Consumer; | ||
exports.withContext = withContext; | ||
exports.BaseContext = BaseContext; | ||
exports.createContext = createContext; | ||
exports.createContext = createContext; | ||
exports.createWithContext = createWithContext; |
{ | ||
"name": "@humblejs/context", | ||
"version": "1.9.8", | ||
"version": "1.9.9", | ||
"main": "dist/export.js", | ||
@@ -5,0 +5,0 @@ "module": "dist/export.js", |
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
14498
294