Comparing version 2.0.0 to 2.0.1
@@ -25,5 +25,3 @@ 'use strict'; | ||
var FeatureFlagsContext = | ||
/*#__PURE__*/ | ||
React.createContext({}); | ||
var FeatureFlagsContext = /*#__PURE__*/React.createContext({}); | ||
@@ -38,3 +36,3 @@ function transformFlags(features) { | ||
function mergeFeatures(a, b) { | ||
return _extends({}, a, {}, b); | ||
return _extends({}, a, b); | ||
} | ||
@@ -41,0 +39,0 @@ |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function r(){return(r=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}var t=e.createContext({});function n(e){return Array.isArray(e)?Object.fromEntries(e.map((function(e){return[e,!0]}))):e}function o(){return e.useContext(t)}function u(e){var r=o();return Array.isArray(r)?r.includes(e):"boolean"==typeof r[e]?r[e]:e.split("/").reduce((function(e,r){return"boolean"==typeof e?e:void 0!==e[r]&&e[r]}),r)}function a(e){var r=e.render,t=void 0===r?e.children:r,n=u(e.name);return"function"==typeof t?t(n):n?t:null}exports.Feature=a,exports.FlagsProvider=function(u){var a,i,c=u.features,s=void 0===c?{}:c,f=u.children,l=o();return e.createElement(t.Provider,{value:(a=n(l),i=n(s),r({},a,{},i))},f)},exports.useFeature=u,exports.useFeatures=o,exports.withFeature=function(r){return function(t){return function(n){return e.createElement(a,{name:r},e.createElement(t,Object.assign({},n)))}}}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function r(){return(r=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}var t=e.createContext({});function n(e){return Array.isArray(e)?Object.fromEntries(e.map((function(e){return[e,!0]}))):e}function o(){return e.useContext(t)}function u(e){var r=o();return Array.isArray(r)?r.includes(e):"boolean"==typeof r[e]?r[e]:e.split("/").reduce((function(e,r){return"boolean"==typeof e?e:void 0!==e[r]&&e[r]}),r)}function a(e){var r=e.render,t=void 0===r?e.children:r,n=u(e.name);return"function"==typeof t?t(n):n?t:null}exports.Feature=a,exports.FlagsProvider=function(u){var a,i,c=u.features,s=void 0===c?{}:c,f=u.children,l=o();return e.createElement(t.Provider,{value:(a=n(l),i=n(s),r({},a,i))},f)},exports.useFeature=u,exports.useFeatures=o,exports.withFeature=function(r){return function(t){return function(n){return e.createElement(a,{name:r},e.createElement(t,Object.assign({},n)))}}}; | ||
//# sourceMappingURL=flagged.cjs.production.min.js.map |
@@ -21,5 +21,3 @@ import { useContext, createElement, createContext } from 'react'; | ||
var FeatureFlagsContext = | ||
/*#__PURE__*/ | ||
createContext({}); | ||
var FeatureFlagsContext = /*#__PURE__*/createContext({}); | ||
@@ -34,3 +32,3 @@ function transformFlags(features) { | ||
function mergeFeatures(a, b) { | ||
return _extends({}, a, {}, b); | ||
return _extends({}, a, b); | ||
} | ||
@@ -37,0 +35,0 @@ |
{ | ||
"name": "flagged", | ||
"description": "Feature flags for React made easy with hooks, HOC and Render Props", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/sergiodxa/flagged.git", |
@@ -12,3 +12,2 @@ # Flagged | ||
![releases](https://badgen.net/github/releases/sergiodxa/flagged) | ||
![npm version](https://badgen.net/npm/v/sergiodxa/flagged) | ||
![dependencies](https://badgen.net/david/dep/sergiodxa/flagged) | ||
@@ -15,0 +14,0 @@ |
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
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
28206
172
220