{"_id":"flag","_rev":"44-f43df6d5368186178e84054a6a4b1440","name":"flag","description":"Strictly typed feature flagging for React","dist-tags":{"latest":"5.0.1","next":"4.4.0-0"},"versions":{"0.0.0":{"name":"flag","version":"0.0.0","description":"development environment for frontend","main":"index.js","bin":{"def":"bin/def"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git@gitlab.alibaba-inc.com:yuchun/def.git"},"keywords":["frontend"],"dependencies":{"jade":">=0.28.1","express":">=3.0.6","underscore":">=1.4","async":">=0.2.8"},"author":{"name":"frontwindysky"},"license":"BSD","_id":"flag@0.0.0","dist":{"shasum":"4aade41202991bfe699035ce7af4cda881366853","tarball":"https://registry.npmjs.org/flag/-/flag-0.0.0.tgz","integrity":"sha512-sJi4CyecsDZe0/IKLS4LuZ9qq4w4ahscCQYp1zVqwsk86ghvWbANHhKTzAs7T0Vnn+3m/ko5mkxcK6ykgTW/CQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkTuztqAYnBfrSWAn+NGKAQGfQeGMihYz78a8xhxgMsQIhALDj45vQsj8XlJcWtCwJlfRqI7/1xE25ScDBfQqAeEeh"}]},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"czy88840616","email":"czy88840616@gmail.com"},"maintainers":[{"name":"czy88840616","email":"czy88840616@gmail.com"}],"directories":{}},"1.0.0":{"name":"flag","version":"1.0.0","description":"A temporary holding place for this while I work on it.","main":"index.js","author":{"name":"Gabe Scholz"},"license":"MIT","_id":"flag@1.0.0","scripts":{},"_shasum":"fb8087b894e0f057d06d3d1300215c046c7914ad","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"dist":{"shasum":"fb8087b894e0f057d06d3d1300215c046c7914ad","tarball":"https://registry.npmjs.org/flag/-/flag-1.0.0.tgz","integrity":"sha512-IjW0lzqdTY5Qqd1yyrHnaiTMLZLczhytGWYwIlw4uzsy8Z5lwKOGq6KCERboyRPr0IQ/L5dD9bLJGKib+qPkeg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPi5UMoooBG3KMneVh/bBiFRlKz387s25rAmXxljHa2gIgSMWZUzvCVP1mp0E4j+Z5rww8FXwK5B7aoWLtszybV28="}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/flag-1.0.0.tgz_1491603251264_0.3434516272973269"},"directories":{}},"1.0.2":{"name":"flag","version":"1.0.2","description":"Feature flagging made easy for React and Redux","main":"./build/index.ts","types":"./build/index.d.ts","author":{"name":"Unbounce"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/unbounce/react-redux-feature-flag.git"},"scripts":{"test":"jest","build":"rm -rf build && tsc --outDir build -d","release":"np"},"dependencies":{"@types/lodash":"^4.14.64","deep-computed":"^0.0.6"},"peerDependencies":{"lodash":"^4.17.4","react":"^15.5.4","react-redux":"^5.0.5","redux":"^3.6.0"},"devDependencies":{"@types/jest":"^19.2.3","@types/react":"^15.0.25","@types/react-redux":"^4.4.40","enzyme":"^2.8.2","jest":"^20.0.4","np":"^2.15.0","react":"^15.5.4","react-dom":"^15.5.4","react-redux":"^5.0.5","react-test-renderer":"^15.5.4","redux":"^3.6.0","ts-jest":"^20.0.4","typescript":"^2.3.3"},"jest":{"transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js"]},"gitHead":"9e001fa7f973d49614d58c5766fc7d98da516a65","bugs":{"url":"https://github.com/unbounce/react-redux-feature-flag/issues"},"homepage":"https://github.com/unbounce/react-redux-feature-flag#readme","_id":"flag@1.0.2","_shasum":"f43e4a0bdfbce761254273b1227aaefba97fa7ac","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"dist":{"shasum":"f43e4a0bdfbce761254273b1227aaefba97fa7ac","tarball":"https://registry.npmjs.org/flag/-/flag-1.0.2.tgz","integrity":"sha512-F9qdEcfrWpcUR5JaE95k1W0f2FuoEiFjhJeS6FFE6YdHBas8P0UJKPNv3NH0qsCwPIiymyTUO9cuvBkVYat6oA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPV3BOTuNSK8+f0c/VtpRb5EMQiCBlpGT9gO/LEDh8jwIgCa1nVqTN8H8lDE5DN+rgLHL8xD9III07mqgSA7MBwZM="}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag-1.0.2.tgz_1496017813866_0.2986086967866868"},"directories":{}},"1.0.3":{"name":"flag","version":"1.0.3","description":"Feature flagging made easy for React and Redux","main":"./build/index.ts","types":"./build/index.d.ts","author":{"name":"Unbounce"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/unbounce/react-redux-feature-flag.git"},"scripts":{"test":"jest","build":"rm -rf build && tsc --outDir build -d","release":"np"},"dependencies":{"deep-computed":"^0.0.6"},"peerDependencies":{"lodash":"^4.17.4","react":"^15.5.4","react-redux":"^5.0.5","redux":"^3.6.0"},"devDependencies":{"@types/jest":"^19.2.3","@types/lodash":"^4.14.64","@types/react":"^15.0.25","@types/react-redux":"^4.4.40","enzyme":"^2.8.2","jest":"^20.0.4","np":"^2.15.0","react":"^15.5.4","react-dom":"^15.5.4","react-redux":"^5.0.5","react-test-renderer":"^15.5.4","redux":"^3.6.0","ts-jest":"^20.0.4","typescript":"^2.3.3"},"jest":{"transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js"]},"gitHead":"af94d65c68fc36e0d57ab1111e5e847add926b40","bugs":{"url":"https://github.com/unbounce/react-redux-feature-flag/issues"},"homepage":"https://github.com/unbounce/react-redux-feature-flag#readme","_id":"flag@1.0.3","_shasum":"baecc1f612dbff8b6c1ea8da32022049dc4a1f50","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"dist":{"shasum":"baecc1f612dbff8b6c1ea8da32022049dc4a1f50","tarball":"https://registry.npmjs.org/flag/-/flag-1.0.3.tgz","integrity":"sha512-hWiev9Dwl+9trCDOvnh3kMprvZmEHt6qMq+hmx7mCPEgOaBhsYChVk3LWQ2gDd+JxpcJDuXkdg5bbgwj+iB96g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqVXaZVX+4C6brkjsGDfS2miqwsIK2mbdigsg+BjFTAwIhALoBvPQnzI3XMBYtTKDwvpM0cggiJmUnDQO6s0m6mtbU"}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag-1.0.3.tgz_1496017971718_0.884514561155811"},"directories":{}},"1.0.4":{"name":"flag","version":"1.0.4","description":"Feature flagging made easy for React and Redux","main":"./build/index.ts","types":"./build/index.d.ts","author":{"name":"Unbounce"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/unbounce/react-redux-feature-flag.git"},"scripts":{"test":"jest","lint":"tslint src/* --fix","build":"rm -rf build && tsc --outDir build -d","release":"np"},"dependencies":{"@types/jest":"^19.2.3","@types/lodash":"^4.14.64","@types/prop-types":"^15.5.1","@types/react":"^15.0.25","@types/react-redux":"^4.4.40","deep-computed":"^0.0.6"},"peerDependencies":{"lodash":"^4.17.4","prop-types":"^15.5.10","react":"^15.5.4","react-redux":"^5.0.5","redux":"^3.6.0"},"devDependencies":{"enzyme":"^2.8.2","jest":"^20.0.4","np":"^2.15.0","react":"^15.5.4","react-dom":"^15.5.4","react-redux":"^5.0.5","react-test-renderer":"^15.5.4","redux":"^3.6.0","ts-jest":"^20.0.4","tslint":"^5.3.2","tslint-react":"^3.0.0","typescript":"^2.3.3"},"jest":{"transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js"]},"gitHead":"75794cb6895e931e1e543e9bcc9acd53e2efb5c0","bugs":{"url":"https://github.com/unbounce/react-redux-feature-flag/issues"},"homepage":"https://github.com/unbounce/react-redux-feature-flag#readme","_id":"flag@1.0.4","_shasum":"a68be7f6552b493b53cd9b055d279c67dbfd4bfc","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"dist":{"shasum":"a68be7f6552b493b53cd9b055d279c67dbfd4bfc","tarball":"https://registry.npmjs.org/flag/-/flag-1.0.4.tgz","integrity":"sha512-wmul19mQa5UV4ugbW9bgqFDsm4TJvgiLIBSpRaOpAOsWwDBKGYoefmkZVtBdOA0yvJqz/4iYA/Kpxg+XL9tN1g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdajIg/IpDNA0l4z+F0YmfEBz792SqR52Pg1JHb72g+QIhAPPIl7S5Wh8oOzxw5Lkzed49ia0p889XOxOdojdzOhmL"}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag-1.0.4.tgz_1496089480538_0.9413808023091406"},"directories":{}},"1.0.5":{"name":"flag","version":"1.0.5","description":"Feature flagging made easy for React and Redux","main":"./build/index.js","types":"./build/index.d.ts","author":{"name":"Unbounce"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/unbounce/react-redux-feature-flag.git"},"scripts":{"test":"jest","lint":"tslint src/* --fix","build":"rm -rf build && tsc --outDir build -d","release":"np"},"dependencies":{"@types/jest":"^19.2.3","@types/lodash":"^4.14.64","@types/prop-types":"^15.5.1","@types/react":"^15.0.25","@types/react-redux":"^4.4.40","deep-computed":"^0.0.6"},"peerDependencies":{"lodash":"^4.17.4","prop-types":"^15.5.10","react":"^15.5.4","react-redux":"^5.0.5","redux":"^3.6.0"},"devDependencies":{"enzyme":"^2.8.2","jest":"^20.0.4","np":"^2.15.0","react":"^15.5.4","react-dom":"^15.5.4","react-redux":"^5.0.5","react-test-renderer":"^15.5.4","redux":"^3.6.0","ts-jest":"^20.0.4","tslint":"^5.3.2","tslint-react":"^3.0.0","typescript":"^2.3.3"},"jest":{"transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js"]},"gitHead":"2807182fa5028f19ecefc2a83483b72f20a1cb99","bugs":{"url":"https://github.com/unbounce/react-redux-feature-flag/issues"},"homepage":"https://github.com/unbounce/react-redux-feature-flag#readme","_id":"flag@1.0.5","_npmVersion":"5.0.0","_nodeVersion":"7.8.0","_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"dist":{"integrity":"sha512-jaB+OFLaEDXnEH9V18iPPweeRbOtLhSjf5LIUhhRIe6CjwyiqA4BufOePtfkX8JDiW20/xz+0JTdUlSeq06JgQ==","shasum":"f01b28d3f5f7013163eeb77a92c5f2f532e1fef6","tarball":"https://registry.npmjs.org/flag/-/flag-1.0.5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDktN7Ia3pLN2Q7LbUz0UIRCJ7SLkQVX+U/zKgSIQOpigIhAL0fIF0LlZBcHEKEzadp8cBe6aua2k9Qe32R6IX4o+jt"}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag-1.0.5.tgz_1496247711539_0.144115878501907"},"directories":{}},"1.0.6":{"name":"flag","version":"1.0.6","description":"Feature flagging made easy for React and Redux","main":"./build/index.js","types":"./build/index.d.ts","author":{"name":"Unbounce"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/unbounce/flag.git"},"scripts":{"test":"jest","lint":"tslint src/* --fix","build":"rm -rf build && tsc --outDir build -d","release":"np"},"dependencies":{"@types/jest":"^19.2.3","@types/lodash":"^4.14.64","@types/prop-types":"^15.5.1","@types/react":"^15.0.25","@types/react-redux":"^4.4.40","deep-computed":"^0.0.6"},"peerDependencies":{"lodash":"^4.17.4","prop-types":"^15.5.10","react":"^15.5.4","react-redux":"^5.0.5","redux":"^3.6.0"},"devDependencies":{"enzyme":"^2.8.2","jest":"^20.0.4","np":"^2.15.0","react":"^15.5.4","react-dom":"^15.5.4","react-redux":"^5.0.5","react-test-renderer":"^15.5.4","redux":"^3.6.0","ts-jest":"^20.0.4","tslint":"^5.3.2","tslint-react":"^3.0.0","typescript":"^2.3.3"},"jest":{"transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js"]},"gitHead":"2c18b8dd9c9c6d4ff1eb0b445736aa5e33a4c189","bugs":{"url":"https://github.com/unbounce/flag/issues"},"homepage":"https://github.com/unbounce/flag#readme","_id":"flag@1.0.6","_npmVersion":"5.0.0","_nodeVersion":"7.8.0","_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"dist":{"integrity":"sha512-01lPdNowbcoNuvOa0aqBZThKlOQcPe5ASaDBpVGjoeka1b4S1osIvZyv3qJV+1bZ1UQrdLMdFpzjQZ7da+uP5A==","shasum":"e86e0ab6c2f2ba19d7e94babf62eb2621f55e5fd","tarball":"https://registry.npmjs.org/flag/-/flag-1.0.6.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwIegmGr5dAMyBup5tJD+U7G6zBvYE7lDVSQ6pEJqfJwIgZ9BIxGEtmavgPdvGesIx86Dx5dMSpR35BrgduhPb1u8="}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag-1.0.6.tgz_1496247765749_0.4856968284584582"},"directories":{}},"2.0.1":{"name":"flag","version":"2.0.1","description":"Feature flagging made easy for React and Redux","main":"./build/index.js","types":"./build/index.d.ts","author":{"name":"Unbounce"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/unbounce/flag.git"},"scripts":{"test":"jest","build":"rm -rf build && tsc --outDir build -d","release":"np"},"dependencies":{"@types/jest":"^20.0.2","@types/lodash":"^4.14.66","@types/react":"^15.0.31","@types/react-redux":"^4.4.45","deep-computed":"^0.0.6"},"peerDependencies":{"lodash":"^4.17.4","react":"^15.5.4","react-redux":"^5.0.5","redux":"^3.6.0"},"devDependencies":{"enzyme":"^2.9.1","jest":"^20.0.4","np":"^2.16.0","react":"^15.6.1","react-dom":"^15.6.1","react-redux":"^5.0.5","react-test-renderer":"^15.6.1","redux":"^3.7.0","ts-jest":"^20.0.6","typescript":"^2.3.4"},"jest":{"transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js"]},"gitHead":"c4d277aa752d412403e11eaee59ebcd6ee5bd416","bugs":{"url":"https://github.com/unbounce/flag/issues"},"homepage":"https://github.com/unbounce/flag#readme","_id":"flag@2.0.1","_shasum":"afd7170eab938f2f662bca1cc49c39016f6be94d","_from":".","_npmVersion":"4.6.1","_nodeVersion":"7.8.0","_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"dist":{"shasum":"afd7170eab938f2f662bca1cc49c39016f6be94d","tarball":"https://registry.npmjs.org/flag/-/flag-2.0.1.tgz","integrity":"sha512-HgV/z7ktEEMjq7GzURoN2Mv7RsWpJEi/HJ920GKapFUtZmQEf4owlL886ljHhBbqTd1ga3SeG/rckard5kOdiA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFrf6x40XP1OBwf8SYbrRYJ+OF4WF4TTU2uIwOEA6+TtAiEAqV4pi5QpPxhNEK92nKVLjcRVS8M7Njls5blsJSTKwwQ="}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag-2.0.1.tgz_1498341100544_0.7278390089049935"},"directories":{}},"2.0.2":{"name":"flag","version":"2.0.2","description":"Feature flagging made easy for React and Redux","main":"./build/index.js","types":"./build/index.d.ts","author":{"name":"Unbounce"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/unbounce/flag.git"},"scripts":{"test":"jest","build":"rm -rf build && tsc --outDir build -d","release":"np"},"dependencies":{"@types/jest":"^20.0.2","@types/lodash":"^4.14.66","@types/react":"^15.0.31","@types/react-redux":"^4.4.45","deep-computed":"^0.0.6"},"peerDependencies":{"lodash":"^4.17.4","react":"^15.5.4","react-redux":"^5.0.5","redux":"^3.6.0"},"devDependencies":{"enzyme":"^2.9.1","jest":"^20.0.4","np":"^2.16.0","react":"^15.6.1","react-dom":"^15.6.1","react-redux":"^5.0.5","react-test-renderer":"^15.6.1","redux":"^3.7.0","ts-jest":"^20.0.6","typescript":"^2.3.4"},"jest":{"transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js"]},"gitHead":"27328b308a317bb25c8bb324cd0c5d4a6859bd8a","bugs":{"url":"https://github.com/unbounce/flag/issues"},"homepage":"https://github.com/unbounce/flag#readme","_id":"flag@2.0.2","_shasum":"eb47d8c5ccbc68352620f5b6029ef13ceb82e555","_from":".","_npmVersion":"4.6.1","_nodeVersion":"7.8.0","_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"dist":{"shasum":"eb47d8c5ccbc68352620f5b6029ef13ceb82e555","tarball":"https://registry.npmjs.org/flag/-/flag-2.0.2.tgz","integrity":"sha512-9trfEBIQycgJBXn2j0WAfyxjIL33gm81yFRjtA82/8l1lFWEWaDKVHCcN/UD3PIxem8byPjIYKt2PCcfeF4QKQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpVyNPOd1VG4wZHeLZfAZ4C1kuUBZqG2oJWnXksrShWgIhANcS6lb7oks4dVKRJ/r64qtZktndJw4U1m8cKdzrJRyt"}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag-2.0.2.tgz_1498689108053_0.019044285407289863"},"directories":{}},"2.0.3-0":{"name":"flag","version":"2.0.3-0","description":"Feature flagging made easy for React and Redux","main":"./build/index.js","types":"./build/index.d.ts","author":{"name":"Unbounce"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/unbounce/flag.git"},"scripts":{"test":"jest","build":"rm -rf build && tsc --outDir build -d","release":"np"},"dependencies":{"deep-computed":"^0.0.6"},"peerDependencies":{"lodash":"^4.17.4","react":"^15.5.4"},"devDependencies":{"@types/jest":"^20.0.2","@types/lodash":"^4.14.66","@types/react":"^15.0.31","@types/react-redux":"^4.4.45","enzyme":"^2.9.1","jest":"^20.0.4","np":"^2.16.0","react":"^15.6.1","react-dom":"^15.6.1","react-redux":"^5.0.5","react-test-renderer":"^15.6.1","ts-jest":"^20.0.6","typescript":"^2.3.4"},"jest":{"transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js"]},"gitHead":"1b325a37c1a141048074522d8f0b3674903d0ca3","bugs":{"url":"https://github.com/unbounce/flag/issues"},"homepage":"https://github.com/unbounce/flag#readme","_id":"flag@2.0.3-0","_shasum":"467a853a941aa332e05d36c755e9c00bee5bf249","_from":".","_npmVersion":"4.6.1","_nodeVersion":"7.8.0","_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"dist":{"shasum":"467a853a941aa332e05d36c755e9c00bee5bf249","tarball":"https://registry.npmjs.org/flag/-/flag-2.0.3-0.tgz","integrity":"sha512-sCR4wl2zi0g+FcHQ466+PwMpKYYqFbeEFWN+UmLLOmx0MCfDtwB5gHTSTW8hynGf5jc4CYIvv/9ISZoHFuab7Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC39Y12z7vS14GOWDJuPuyDNOiNsf7GquInCV9xcwv3vgIhAK9o1V1ljSg9f457XHU5E1p6tM52mMx8j2xQwNQsg/cl"}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag-2.0.3-0.tgz_1498691542763_0.10705967480316758"},"directories":{}},"2.0.3-1":{"name":"flag","version":"2.0.3-1","description":"Feature flagging made easy for React and Redux","main":"./build/index.js","types":"./build/index.d.ts","author":{"name":"Unbounce"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/unbounce/flag.git"},"scripts":{"test":"jest","build":"rm -rf build && tsc --outDir build -d","release":"np"},"dependencies":{"deep-computed":"^0.0.6","react-redux":"^5.0.5","redux":"^3.7.1"},"peerDependencies":{"lodash":"^4.17.4","react":"^15.5.4"},"optionalDependencies":{"react-redux":"^5.0.5","redux":"^3.7.1"},"devDependencies":{"@types/jest":"^20.0.2","@types/lodash":"^4.14.66","@types/react":"^15.0.31","@types/react-redux":"^4.4.45","@types/redux":"^3.6.0","enzyme":"^2.9.1","jest":"^20.0.4","np":"^2.16.0","react":"^15.6.1","react-dom":"^15.6.1","react-test-renderer":"^15.6.1","ts-jest":"^20.0.6","typescript":"^2.3.4"},"jest":{"transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js"]},"gitHead":"e0b991b7eb1eeab32915ace811e5c453c98fe8e1","bugs":{"url":"https://github.com/unbounce/flag/issues"},"homepage":"https://github.com/unbounce/flag#readme","_id":"flag@2.0.3-1","_shasum":"36ea500510f5d25823b6157b50e8ee547b092ac2","_from":".","_npmVersion":"4.6.1","_nodeVersion":"7.8.0","_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"dist":{"shasum":"36ea500510f5d25823b6157b50e8ee547b092ac2","tarball":"https://registry.npmjs.org/flag/-/flag-2.0.3-1.tgz","integrity":"sha512-DvGyt3zDi+rvX2JL9olqtu/4drrtjCiiRjDf9iRE2iFgVNldTRXTYzVaWdBUA34ipn3++U5K9U1EeOjblnfSWQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFfO7ezmBj99zddzzYD9+/BDwqgpfIl5Vq5Wlcez6SjmAiEA3ds/P44Kyb7QOEE1JxQ1AFqZsTlTT+Mm3Qtv42/wPoc="}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag-2.0.3-1.tgz_1498691863627_0.6703953268006444"},"directories":{}},"2.0.3-2":{"name":"flag","version":"2.0.3-2","description":"Feature flagging made easy for React and Redux","main":"./build/index.js","types":"./build/index.d.ts","author":{"name":"Unbounce"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/unbounce/flag.git"},"scripts":{"test":"jest","build":"rm -rf build && tsc --outDir build -d","release":"np"},"dependencies":{"deep-computed":"^0.0.6","react-dom":"^15.6.1","react-redux":"^5.0.5","redux":"^3.7.1"},"peerDependencies":{"lodash":"^4.17.4","react":"^15.5.4"},"optionalDependencies":{"react-dom":"^15.6.1","react-redux":"^5.0.5","redux":"^3.7.1"},"devDependencies":{"@types/jest":"^20.0.2","@types/lodash":"^4.14.66","@types/react":"^15.0.31","@types/react-redux":"^4.4.45","@types/redux":"^3.6.0","enzyme":"^2.9.1","jest":"^20.0.4","np":"^2.16.0","react":"^15.5.4","react-test-renderer":"^15.6.1","ts-jest":"^20.0.6","typescript":"^2.3.4"},"jest":{"transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js"]},"gitHead":"ea5f5dcd18ebdcfdd28a4b007e0a59ffc300a158","bugs":{"url":"https://github.com/unbounce/flag/issues"},"homepage":"https://github.com/unbounce/flag#readme","_id":"flag@2.0.3-2","_shasum":"d4a0efb6e86bcb750d02cceb6e45b4531bdee93c","_from":".","_npmVersion":"4.6.1","_nodeVersion":"7.8.0","_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"dist":{"shasum":"d4a0efb6e86bcb750d02cceb6e45b4531bdee93c","tarball":"https://registry.npmjs.org/flag/-/flag-2.0.3-2.tgz","integrity":"sha512-kB7mTr3W2xwMk+ntkDfkSvVSmxFcWFkZPokRWKwxQzeYAbQFTu7oGDt6nH7HzZn272Jqnx/LN5AmoEzLn5oUQg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLthahQkVxaQLjNb6PqSsI2ICZTrlMZGBCMZxPCcXoaAIhALS4w4movu1TA/fNi5UKxk+uqCxQg9cYp+lz+1CMDv5w"}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag-2.0.3-2.tgz_1498692193753_0.10419732239097357"},"directories":{}},"2.0.3":{"name":"flag","version":"2.0.3","description":"Feature flagging made easy for React and Redux","main":"./build/index.js","types":"./build/index.d.ts","author":{"name":"Unbounce"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/unbounce/flag.git"},"scripts":{"test":"jest","build":"rm -rf build && tsc --outDir build -d","release":"np"},"dependencies":{"deep-computed":"^0.0.6","react-dom":"^15.6.1","react-redux":"^5.0.5","redux":"^3.7.1"},"peerDependencies":{"lodash":"^4.17.4","react":"^15.5.4"},"optionalDependencies":{"react-dom":"^15.6.1","react-redux":"^5.0.5","redux":"^3.7.1"},"devDependencies":{"@types/jest":"^20.0.2","@types/lodash":"^4.14.66","@types/react":"^15.0.31","@types/react-redux":"^4.4.45","@types/redux":"^3.6.0","enzyme":"^2.9.1","jest":"^20.0.4","np":"^2.16.0","react":"^15.5.4","react-test-renderer":"^15.6.1","ts-jest":"^20.0.6","typescript":"^2.3.4"},"jest":{"transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js"]},"gitHead":"6744da1ce13af002321c7275cbe2bfa439cc1b08","bugs":{"url":"https://github.com/unbounce/flag/issues"},"homepage":"https://github.com/unbounce/flag#readme","_id":"flag@2.0.3","_shasum":"47a18457e06bd074be27ff95ef49a3987460e887","_from":".","_npmVersion":"4.6.1","_nodeVersion":"7.8.0","_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"dist":{"shasum":"47a18457e06bd074be27ff95ef49a3987460e887","tarball":"https://registry.npmjs.org/flag/-/flag-2.0.3.tgz","integrity":"sha512-AfmL63PCJ4ZcKi9lkUoxhvOJNhEIdH7eqMJLRZKRYBKGrF/sikfVeShSGgzlNkvXHaM3olvzdD6UVCVarl3pNw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRpLat5T+7JZ+DWYHOUXIXm0cnx9ps4ZK6CrGNo/x3NgIhAJwd5wmFoXEC5IjPHVB9W5MuMWK1zRiJu60MrL/LQu0h"}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag-2.0.3.tgz_1499451747859_0.528766919625923"},"directories":{}},"2.0.4":{"name":"flag","version":"2.0.4","description":"Feature flagging made easy for React and Redux","main":"./build/index.js","types":"./build/index.d.ts","author":{"name":"Unbounce"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/unbounce/flag.git"},"scripts":{"test":"jest","build":"rm -rf build && tsc --outDir build -d","release":"np"},"dependencies":{"deep-computed":"^0.0.6","hoist-non-react-statics":"^2.3.0","react-dom":"^15.6.1","react-redux":"^5.0.6","redux":"^3.7.2"},"peerDependencies":{"lodash":"^4.17.4","react":"^15.5.4"},"optionalDependencies":{"react-dom":"^15.6.1","react-redux":"^5.0.6","redux":"^3.7.2"},"devDependencies":{"@types/jest":"^20.0.7","@types/lodash":"^4.14.73","@types/node":"^8.0.24","@types/react":"15.6.1","@types/react-redux":"^5.0.4","enzyme":"^2.9.1","jest":"^20.0.4","np":"^2.16.0","react":"^15.5.4","react-test-renderer":"^15.6.1","ts-jest":"^20.0.10","typescript":"^2.4.2"},"jest":{"transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js"]},"gitHead":"e7f6f3d66cce3856c679b5dc8f3a8b4f6aace9ac","bugs":{"url":"https://github.com/unbounce/flag/issues"},"homepage":"https://github.com/unbounce/flag#readme","_id":"flag@2.0.4","_shasum":"764001f1bdc26cd2091868d06f5164d4509a7b27","_from":".","_npmVersion":"4.6.1","_nodeVersion":"7.8.0","_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"dist":{"shasum":"764001f1bdc26cd2091868d06f5164d4509a7b27","tarball":"https://registry.npmjs.org/flag/-/flag-2.0.4.tgz","integrity":"sha512-X74aJZKjc/gaR0T3eLPCWJ9uX22xaF/cDwY9AJS3Q3e0DBcN4R3odyj7j2g7GkMfPounQSPi6xSvDPpw80epWw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGrqvpTIG9C8gJdGjNG6W2EBHCEOEPl04E3c3aCHP9oyAiEA4Np1SvfbVUuNUKJc4r0iVATkCizrOCYJSxZvTwB2i8s="}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag-2.0.4.tgz_1503024422632_0.12095866329036653"},"directories":{}},"3.0.0-0":{"name":"flag","version":"3.0.0-0","description":"Feature flagging made easy for React and Redux","main":"./build/index.js","types":"./build/index.d.ts","author":{"name":"Unbounce"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/unbounce/flag.git"},"scripts":{"test":"jest","build":"rm -rf build && tsc --outDir build -d","prepublish":"npm run build","release":"np"},"dependencies":{"deep-computed":"^0.0.6","hoist-non-react-statics":"^2.3.0","lodash":"^4.17.4","react":"^16.1.0","react-dom":"^16.1.0","react-redux":"^5.0.6","redux":"^3.7.2"},"optionalDependencies":{"react-dom":"^16.1.0","react-redux":"^5.0.6","redux":"^3.7.2"},"devDependencies":{"@types/jest":"^20.0.7","@types/lodash":"^4.14.73","@types/node":"^8.0.24","@types/react":"^16.0.18","@types/react-redux":"^5.0.4","enzyme":"^3.1.0","enzyme-adapter-react-16":"^1.0.2","jest":"^20.0.4","np":"^2.16.0","react-test-renderer":"^16.1.0","ts-jest":"^20.0.10","typescript":"^2.4.2"},"jest":{"transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js"],"setupFiles":["<rootDir>/test/setup.js"]},"gitHead":"aab175e46743869ab8504f14738d36d26b895530","bugs":{"url":"https://github.com/unbounce/flag/issues"},"homepage":"https://github.com/unbounce/flag#readme","_id":"flag@3.0.0-0","_shasum":"66dd4a45059cfd6b9d2bf27e737d2521628c7942","_from":".","_npmVersion":"4.6.1","_nodeVersion":"8.4.0","_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"dist":{"shasum":"66dd4a45059cfd6b9d2bf27e737d2521628c7942","tarball":"https://registry.npmjs.org/flag/-/flag-3.0.0-0.tgz","integrity":"sha512-x5yhORwB2sPei4Oj3Hc4nKAjP7EhfPDPI5BK2LJDciQ8D1FjylMB1j3goTiezb8DxLlCsHp58B37UcdiAgsqtg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHf13jRVkgj8RD7NGGAdw50Rjv3xuSbbPx1HkepbSHrjAiAz7NOMOFminC6KtTt3pqBfwPRAvvaIW3DIeh5qhKLx6Q=="}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag-3.0.0-0.tgz_1510347960643_0.4312595617957413"},"directories":{}},"3.0.0-1":{"name":"flag","version":"3.0.0-1","description":"Feature flagging made easy for React and Redux","main":"./build/index.js","types":"./build/index.d.ts","author":{"name":"Unbounce"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/unbounce/flag.git"},"scripts":{"test":"jest","build":"rm -rf build && tsc --outDir build -d","prepublish":"npm run build","release":"np"},"dependencies":{"deep-computed":"^0.0.6","hoist-non-react-statics":"^2.3.0","lodash":"^4.17.4","react":"^16.1.0","react-dom":"^16.1.0","react-redux":"^5.0.6","redux":"^3.7.2"},"optionalDependencies":{"react-dom":"^16.1.0","react-redux":"^5.0.6","redux":"^3.7.2"},"devDependencies":{"@types/jest":"^20.0.7","@types/lodash":"^4.14.73","@types/node":"^8.0.24","@types/react":"^16.0.18","@types/react-redux":"^5.0.4","enzyme":"^3.1.0","enzyme-adapter-react-16":"^1.0.2","jest":"^20.0.4","np":"^2.16.0","react-test-renderer":"^16.1.0","ts-jest":"^20.0.10","typescript":"^2.4.2"},"jest":{"transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js"],"setupFiles":["<rootDir>/test/setup.js"]},"gitHead":"1f5ee71b110bc617dc46e3ba8670d54b7624b188","bugs":{"url":"https://github.com/unbounce/flag/issues"},"homepage":"https://github.com/unbounce/flag#readme","_id":"flag@3.0.0-1","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"dist":{"integrity":"sha512-hGYGGRe/CEcUF/BJ8Ftd+I5dKVFyfakE0ewR5+xFCwEYBLGwtgrxv3bUHCvDREiJoizTA46dLGBhJucK5Nyn0Q==","shasum":"c0b97af27cad3e55ef537ff706c67b12a97a18d0","tarball":"https://registry.npmjs.org/flag/-/flag-3.0.0-1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpeESqefDcOj1NJShcUuXS9kILWiD97loAs5rwcGKIQwIhAKUIyOt1YeuBgrevXw8LiU98cP/0HIkNb3YhZmVqjZKg"}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag-3.0.0-1.tgz_1514338394514_0.3117358924355358"},"directories":{}},"4.0.0-0":{"name":"flag","version":"4.0.0-0","description":"Feature flagging made easy for React and Redux","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"https://github.com/garbles/flag"},"author":{"name":"Gabe Scholz"},"license":"MPL-2.0","devDependencies":{"@types/enzyme":"^3.9.1","@types/jest":"^24.0.11","@types/lodash":"^4.14.123","@types/shallowequal":"^1.1.1","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.12.1","jest":"^24.7.1","np":"^4.0.2","react":"^16.8.6","react-dom":"^16.8.6","ts-jest":"^24.0.1","typescript":"3.3.4000"},"dependencies":{"deep-computed":"^0.1.1","lodash":"^4.17.11","shallowequal":"^1.1.0","useful-types":"^0.2.0"},"peerDependencies":{"react":"^16.8.6","react-dom":"^16.8.6"},"optionalDependencies":{"@types/react":"^16.8.12","@types/react-dom":"^16.8.3","@types/react-redux":"^7.0.7","@types/redux":"^3.6.0","react-redux":"^7.0.2","redux":"^4.0.1"},"scripts":{"clean":"rm -rf build","build":"tsc","prepublish":"yarn clean && yarn build","test":"jest","pub":"np"},"readmeFilename":"README.md","readme":"# Flag\n\n_Feature flagging made easy for React and Redux_\n\n```\nyarn add flag\n```\n\n## Motivation\n\nFeature flagging is necessary for large client-side applications. They improve development speed\nand allow teams to test new features before they are stable. In order to **WANT** to use feature\nflags in an application, they should be **VERY** easy to add and remove. That means minimal\nboiler plate and no need to pass boolean props down through component hierarchy. Such a thing could be\ndone with global variables; however, they live outside of the React/Redux lifecycle, making them\nmore difficult to control. Instead, this library injects and then accesses feature flags directly\nfrom the React context without getting in your way.\n\nFlag allows you to declare flags as either plain values or as functions. If a flag is a function then it is referred to as a computed flag. The function accepts one argument which is the flags object itself. You do not have to use computed flags, but they can be very convenient. For example,\n\n```ts\nconst flags = {\n  // properties can be nested objects\n  features: {\n    // they can be boolean\n    useMyCoolNewThing: true\n  },\n  config: {\n    // they can be strings\n    apiUrl: \"www.example.com/api\"\n  },\n  // they can be numbers\n  cool: 1,\n  dude: 5,\n  // they can be computed\n  coolAndDude: flags => flags.cool + flags.dude,\n  // they can be computed from other computed properties.\n  // other computed properties are resolved for you, so that you do not\n  // need to call it as a function.\n  largeCoolAndDude: flags => flags.coolAndDude > 10\n};\n```\n\n## Getting Started\n\nThis library has strong TypeScript support as of v4. In order to get that support, you must\ninitialize the `flag` library before using it.\n\n### createFlags\n\nCreates React bindings for flags. **You should only initialize one instance of this API**. Does\nnot take any value arguments, but takes one type argument `T` which is the shape of your resolved\nflags.\n\n```ts\n// flags.ts\n\nimport createFlags from \"flag\";\n\nexport type MyFlags = {\n  features: {\n    useMyCoolNewThing: boolean;\n  };\n  config: {\n    apiUrl: string;\n  };\n  cool: number;\n  dude: number;\n  coolAndDude: number;\n  largeCoolAndDude: boolean;\n};\n\nconst { FlagsProvider, Flag, useFlag, useFlags } = createFlags<MyFlags>();\n\nexport { FlagsProvider, Flag, useFlag, useFlags };\n```\n\n### createReduxBindings\n\nYou can also add support for Redux by importing `createReduxBindings` from `flag/redux`.\n\n| Args       | Type               | Required | Description                       |\n| ---------- | ------------------ | -------- | --------------------------------- |\n| `provider` | `FlagsProvider<T>` | `true`   | Provider created by `createFlags` |\n\n```ts\n// flags.ts\n\n// ... the above\n\nimport createReduxBindings from \"flag/redux\";\n\nconst {\n  setFlagsAction,\n  createFlagsReducer,\n  ConnectedFlagsProvider\n} = createReduxBindings(FlagsProvider);\n\nexport { setFlagsAction, createFlagsReducer, ConnectedFlagsProvider };\n```\n\n## React API\n\nFor brevity, the type `T` in the section below refers to the shape of your resolved feature flags.\n\n### Computable\n\nGeneric type used to describe unresolved flags. Very useful when including functions are part of your flag definitions because function arguments can be inferred.\n\n```tsx\nimport { Computable } from \"flag\";\n\ntype MyFlags = {\n  a: boolean;\n  b: boolean;\n  c: boolean;\n};\n\nconst flags: Computable<MyFlags> = {\n  a: true,\n  b: false,\n  // 👇 `flags` type checks!\n  c: flags => flags.a && flags.b\n};\n```\n\n### FlagsProvider\n\nReturned as part of `createFlags()`. React component that makes flags available to children through the Context API.\n\n| Props      | Type            | Required | Description            |\n| ---------- | --------------- | -------- | ---------------------- |\n| `flags`    | `Computable<T>` | `true`   | All pre-computed flags |\n| `children` | `ReactNode`     | `true`   | React children         |\n\n```tsx\n// index.tsx\n\nimport { MyApplication } from \"./app\";\nimport { FlagsProvider, Flag } from \"./flags\";\n\nconst instance = (\n  <FlagsProvider flags={flags}>\n    <MyApplication />\n  </FlagsProvider>\n);\n\nReact.render(instance, document.querySelector(\"#app\"));\n```\n\n### Flag\n\nReturned as part of `createFlags()`. Renders a some UI based on whether a flag is truthy or falsy. It's a glorified if statement 😬. Must be used in side of `FlagsProvider`.\n\n| Props               | Type                          | Required | Description                         |\n| ------------------- | ----------------------------- | -------- | ----------------------------------- |\n| `name`              | `string[]`                    | `true`   | Must be a valid key path of `T`     |\n| `children`          | `ReactNode`                   | `false`  | React children                      |\n| `render`            | `(flags: T) => ReactNode`     | `false`  | Function that returns a `ReactNode` |\n| `fallbackRender`    | `(flags: T) => ReactNode`     | `false`  | Function that returns a `ReactNode` |\n| `component`         | `ComponentType<{ flags: T }>` | `false`  | React Component with `T` as props   |\n| `fallbackComponent` | `ComponentType<{ flags: T }>` | `false`  | React Component with `T` as props   |\n\nOrder of deciding which of these nodes to renders is as follows:\n\n- If the flag is `truthy`:\n  - render `children` if defined\n  - call `render` with `T` if defined _or_\n  - call `component` with `{flags: T}` if defined _else_\n  - return `null`\n- If the flag is `falsy`:\n  - call `fallbackRender` with `T` if defined _or_\n  - call `fallbackComponent` with `{ flags: T }` if defined _else_\n  - return `null`\n\n```tsx\n<Flag\n  name={[\"features\", \"useMyCoolNewThing\"]}\n  render={() => <div>Rendered on truthy</div>}\n  fallbackRender={() => <div>Rendered on falsy</div>}\n/>\n```\n\n### useFlags\n\nReturned as part of `createFlags()`. A React hook that returns all of the flags. Must be used in side of `FlagsProvider`.\n\n```tsx\n// my-component.tsx\n\nimport { useFlags } from \"./flags\";\n\nconst MyComponent = () => {\n  const flags = useFlags();\n\n  return <div>The API url is \"{flags.config.apiUrl}\"</div>;\n};\n```\n\n### useFlag\n\nReturned as part of `createFlags()`. A React hook to return a single flag. Must be used in side of `FlagsProvider`.\n\n| Args      | Type       | Required | Description                     |\n| --------- | ---------- | -------- | ------------------------------- |\n| `keyPath` | `string[]` | `true`   | Must be a valid key path of `T` |\n\n```tsx\n// my-component.tsx\n\nimport { useFlags } from \"./flags\";\n\nconst MyComponent = () => {\n  const apiUrl = useFlag([\"config\", \"apiUrl\"]);\n\n  return <div>The API url is \"{apiUrl}\"</div>;\n};\n```\n\n## Redux API\n\n### createFlagsReducer\n\nReturned as part of `createReduxBindings(...)`. Creates a reducer to be used in your Redux stores.\n\n| Args    | Type | Required | Description                     |\n| ------- | ---- | -------- | ------------------------------- |\n| `flags` | `T`  | `true`   | The initial value of your flags |\n\n```tsx\n// reducer.ts\n\nimport { combineReducers } from \"redux\";\nimport { Computable } from \"flag\";\nimport { createFlagsReducer, MyFlags } from \"./flags\";\nimport { otherReducer } from \"./other-reducer\";\n\nconst flags: Computable<MyFlags> = {\n  // ...\n};\n\nexport default combineReducers({\n  // 👇 must use the \"flags\" key of your state\n  flags: createFlagsReducuer(flags),\n  other: otherReducer\n});\n```\n\n### ConnectedFlagsProvider\n\nReturned as part of `createReduxBindings(...)`. Wraps `FlagsProvider`, fetching the flags from Redux state.\n\n```tsx\nimport { Provider } from \"redux\";\nimport { MyApplication } from \"./app\";\nimport { ConnectedFlagsProvider } from \"./flags\";\nimport { store } from \"./store\";\n\nconst instance = (\n  <Provider store={store}>\n    <ConnectedFlagsProvider>\n      <MyApplication />\n    </ConnectedFlagsProvider>\n  </Provider>\n);\n\nReact.render(instance, document.querySelector(\"#app\"));\n```\n\n### setFlagsAction\n\nReturned as part of `createReduxBindings(...)`. A dispatchable action that sets flags. Merges a partial value of pre-computed flags with existing pre-computed flags.\n\n| Args    | Type            | Required | Description                |\n| ------- | --------------- | -------- | -------------------------- |\n| `flags` | `Computable<T>` | `true`   | Partial pre-computed flags |\n\n```tsx\nimport { Thunk } from \"redux-thunk\";\nimport { setFlagsAction } from \"./flags\";\n\nexport const someThunk: Thunk<any> = ({ dispatch }) => async () => {\n  const user = await fetchUser();\n\n  dispatch(setFlagsAction(user.flags));\n  // ...\n};\n```\n\n## License\n\nMPL-2.0\n","licenseText":"Copyright 2019 (c) Gabe Scholz\n\n# Mozilla Public License Version 2.0\n\n### 1. Definitions\n\n**1.1. “Contributor”**  \n means each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n**1.2. “Contributor Version”**  \n means the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n**1.3. “Contribution”**  \n means Covered Software of a particular Contributor.\n\n**1.4. “Covered Software”**  \n means Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n**1.5. “Incompatible With Secondary Licenses”**  \n means\n\n- **(a)** that the initial Contributor has attached the notice described\n  in Exhibit B to the Covered Software; or\n- **(b)** that the Covered Software was made available under the terms of\n  version 1.1 or earlier of the License, but not also under the\n  terms of a Secondary License.\n\n**1.6. “Executable Form”**  \n means any form of the work other than Source Code Form.\n\n**1.7. “Larger Work”**  \n means a work that combines Covered Software with other material, in\na separate file or files, that is not Covered Software.\n\n**1.8. “License”**  \n means this document.\n\n**1.9. “Licensable”**  \n means having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n**1.10. “Modifications”**  \n means any of the following:\n\n- **(a)** any file in Source Code Form that results from an addition to,\n  deletion from, or modification of the contents of Covered\n  Software; or\n- **(b)** any new file in Source Code Form that contains any Covered\n  Software.\n\n**1.11. “Patent Claims” of a Contributor**  \n means any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n**1.12. “Secondary License”**  \n means either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n**1.13. “Source Code Form”**  \n means the form of the work preferred for making modifications.\n\n**1.14. “You” (or “Your”)**  \n means an individual or a legal entity exercising rights under this\nLicense. For legal entities, “You” includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, “control” means **(a)** the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or **(b)** ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n### 2. License Grants and Conditions\n\n#### 2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n- **(a)** under intellectual property rights (other than patent or trademark)\n  Licensable by such Contributor to use, reproduce, make available,\n  modify, display, perform, distribute, and otherwise exploit its\n  Contributions, either on an unmodified basis, with Modifications, or\n  as part of a Larger Work; and\n- **(b)** under Patent Claims of such Contributor to make, use, sell, offer\n  for sale, have made, import, and otherwise transfer either its\n  Contributions or its Contributor Version.\n\n#### 2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n#### 2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n- **(a)** for any code that a Contributor has removed from Covered Software;\n  or\n- **(b)** for infringements caused by: **(i)** Your and any other third party's\n  modifications of Covered Software, or **(ii)** the combination of its\n  Contributions with other software (except as part of its Contributor\n  Version); or\n- **(c)** under Patent Claims infringed by Covered Software in the absence of\n  its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n#### 2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n#### 2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n#### 2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n#### 2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n### 3. Responsibilities\n\n#### 3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n#### 3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n- **(a)** such Covered Software must also be made available in Source Code\n  Form, as described in Section 3.1, and You must inform recipients of\n  the Executable Form how they can obtain a copy of such Source Code\n  Form by reasonable means in a timely manner, at a charge no more\n  than the cost of distribution to the recipient; and\n\n- **(b)** You may distribute such Executable Form under the terms of this\n  License, or sublicense it under different terms, provided that the\n  license for the Executable Form does not attempt to limit or alter\n  the recipients' rights in the Source Code Form under this License.\n\n#### 3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n#### 3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n#### 3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n### 4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: **(a)** comply with\nthe terms of this License to the maximum extent possible; and **(b)**\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n### 5. Termination\n\n**5.1.** The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated **(a)** provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and **(b)** on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n**5.2.** If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n### 6. Disclaimer of Warranty\n\n> Covered Software is provided under this License on an “as is”\n> basis, without warranty of any kind, either expressed, implied, or\n> statutory, including, without limitation, warranties that the\n> Covered Software is free of defects, merchantable, fit for a\n> particular purpose or non-infringing. The entire risk as to the\n> quality and performance of the Covered Software is with You.\n> Should any Covered Software prove defective in any respect, You\n> (not any Contributor) assume the cost of any necessary servicing,\n> repair, or correction. This disclaimer of warranty constitutes an\n> essential part of this License. No use of any Covered Software is\n> authorized under this License except under this disclaimer.\n\n### 7. Limitation of Liability\n\n> Under no circumstances and under no legal theory, whether tort\n> (including negligence), contract, or otherwise, shall any\n> Contributor, or anyone who distributes Covered Software as\n> permitted above, be liable to You for any direct, indirect,\n> special, incidental, or consequential damages of any character\n> including, without limitation, damages for lost profits, loss of\n> goodwill, work stoppage, computer failure or malfunction, or any\n> and all other commercial damages or losses, even if such party\n> shall have been informed of the possibility of such damages. This\n> limitation of liability shall not apply to liability for death or\n> personal injury resulting from such party's negligence to the\n> extent applicable law prohibits such limitation. Some\n> jurisdictions do not allow the exclusion or limitation of\n> incidental or consequential damages, so this exclusion and\n> limitation may not apply to You.\n\n### 8. Litigation\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n### 9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n### 10. Versions of the License\n\n#### 10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n#### 10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n#### 10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\n## Exhibit A - Source Code Form License Notice\n\n    This Source Code Form is subject to the terms of the Mozilla Public\n    License, v. 2.0. If a copy of the MPL was not distributed with this\n    file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\n## Exhibit B - “Incompatible With Secondary Licenses” Notice\n\n    This Source Code Form is \"Incompatible With Secondary Licenses\", as\n    defined by the Mozilla Public License, v. 2.0.\n","_id":"flag@4.0.0-0","dist":{"shasum":"3c70c8f7095f9d9003c600039c13758d6693aa34","tarball":"https://registry.npmjs.org/flag/-/flag-4.0.0-0.tgz","integrity":"sha512-P9nUouPsFawcmrdvsXCfxiNOQ/4LK5P1KGxuJov74isFjG3yWfL4UmlqW8ZzSXGWGYMRxVqg7RF8ewqJbE1JEg==","fileCount":13,"unpackedSize":32827,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcu095CRA9TVsSAnZWagAAMk0P/0WPKiZdMsBuKSM5mR4d\nDpLtpNAPlnfX6jw/8VWfNoAe7FZ7/NSmwsVQ6VcGjvsi+Vu74rpAjxvJrRz+\nVrbSMULdXahCkI02O8Y8BqEXW5ovoZSzcScYWhilwRs+on4ZNLyfW8hFxnG0\nKAfHtFkPlCDP3IHajxh1+gHMHIxMZwnGlnxIRjpTg1NZB+2klhSHFxX0ukAj\nmxDG8mXNcBhoUtT1iht8czJmADBUpYqdQnMBnBCa3Boje0JQZ4CFBjc39wp1\nglCdPYER+pUPqKPGPdKxBn0+Aplj3KMTL4/WhSW02K4UXMxFUlN5Ed1XwdcQ\n+oaRANBHBZRHjJU8UGmVC7VmORPWO5wU0LLVh1gK4KePwQtVP23pQl8UYKkw\nyKXxBrZ7Pbb3w/XMdzb4/rFE8jbDlJ+FP33kkRmhVwwrTsogTgeZh4W3Y0Ms\noYYeahKjIpNju9vYUF3gHYwI6EwpW47ycdYyRhR+Oe1h4A/XlGW6gZIQ7gCD\nrHUBSrPCD2NEgPRcDe03C9+Hoo2V4DxMajq38QtCSAUwGSb3Q/I5AUgLmgDn\nXveB6pOjzhg6Is6iAQG7u8wp6MTT26peZSHhReTvLP5Snbm1H1mrXoov0RlC\nCq7FgXF1ZQYU2h8xwO6WNP5j/i8/Dysv//rNTMSf+Z062WBO/m/fNWkXY97s\nZqC+\r\n=jZrC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICHfk2E2os5kzt2gBs0J5o/iwK13IQLs9abtXCzmR/hXAiEAosrve0WppnwDTcJ3SH9N3JqxKNyCqSi8lKwkRHo3LhM="}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag_4.0.0-0_1555779448883_0.7813853729301292"},"_hasShrinkwrap":false},"4.0.0-1":{"name":"flag","version":"4.0.0-1","description":"Feature flagging made easy for React and Redux","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"https://github.com/garbles/flag"},"author":{"name":"Gabe Scholz"},"license":"MPL-2.0","devDependencies":{"@types/enzyme":"^3.9.1","@types/jest":"^24.0.11","@types/lodash":"^4.14.123","@types/shallowequal":"^1.1.1","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.12.1","jest":"^24.7.1","np":"^4.0.2","react":"^16.8.6","react-dom":"^16.8.6","ts-jest":"^24.0.1","typescript":"3.3.4000"},"dependencies":{"deep-computed":"^0.1.1","lodash":"^4.17.11","shallowequal":"^1.1.0","useful-types":"^0.2.0"},"peerDependencies":{"react":"^16.8.6","react-dom":"^16.8.6"},"optionalDependencies":{"@types/react":"^16.8.12","@types/react-dom":"^16.8.3","@types/react-redux":"^7.0.7","@types/redux":"^3.6.0","react-redux":"^7.0.2","redux":"^4.0.1"},"scripts":{"clean":"rm -rf build","build":"tsc","prepublish":"yarn clean && yarn build","test":"jest","pub":"np"},"readmeFilename":"README.md","readme":"# Flag\n\n_Feature flagging made easy for React and Redux_\n\n```\nyarn add flag@next\n```\n\n## Motivation\n\nFeature flagging is necessary for large client-side applications. They improve development speed\nand allow teams to test new features before they are stable. In order to **WANT** to use feature\nflags in an application, they should be **VERY** easy to add and remove. That means minimal\nboiler plate and no need to pass boolean props down through component hierarchy. Such a thing could be\ndone with global variables; however, they live outside of the React/Redux lifecycle, making them\nmore difficult to control. Instead, this library injects and then accesses feature flags directly\nfrom the React context without getting in your way.\n\nFlag allows you to declare flags as either plain values or as functions. If a flag is a function then it is referred to as a computed flag. The function accepts one argument which is the flags object itself. You do not have to use computed flags, but they can be very convenient. For example,\n\n```ts\nconst flags = {\n  // properties can be nested objects\n  features: {\n    // they can be boolean\n    useMyCoolNewThing: true\n  },\n  config: {\n    // they can be strings\n    apiUrl: \"www.example.com/api\"\n  },\n  // they can be numbers\n  cool: 1,\n  dude: 5,\n  // they can be computed\n  coolAndDude: flags => flags.cool + flags.dude,\n  // they can be computed from other computed properties.\n  // other computed properties are resolved for you, so that you do not\n  // need to call it as a function.\n  largeCoolAndDude: flags => flags.coolAndDude > 10\n};\n```\n\n## Getting Started\n\nThis library has strong TypeScript support as of v4. In order to get that support, you must\ninitialize the `flag` library before using it.\n\n### createFlags\n\nCreates React bindings for flags. **You should only initialize one instance of this API**. Does\nnot take any value arguments, but takes one type argument `T` which is the shape of your resolved\nflags.\n\n```ts\n// flags.ts\n\nimport createFlags from \"flag\";\n\nexport type MyFlags = {\n  features: {\n    useMyCoolNewThing: boolean;\n  };\n  config: {\n    apiUrl: string;\n  };\n  cool: number;\n  dude: number;\n  coolAndDude: number;\n  largeCoolAndDude: boolean;\n};\n\nconst { FlagsProvider, Flag, useFlag, useFlags } = createFlags<MyFlags>();\n\nexport { FlagsProvider, Flag, useFlag, useFlags };\n```\n\n### createReduxBindings\n\nYou can also add support for Redux by importing `createReduxBindings` from `flag/redux`.\n\n| Args       | Type               | Required | Description                       |\n| ---------- | ------------------ | -------- | --------------------------------- |\n| `provider` | `FlagsProvider<T>` | `true`   | Provider created by `createFlags` |\n\n```ts\n// flags.ts\n\n// ... the above\n\nimport createReduxBindings from \"flag/redux\";\n\nconst {\n  setFlagsAction,\n  createFlagsReducer,\n  ConnectedFlagsProvider\n} = createReduxBindings(FlagsProvider);\n\nexport { setFlagsAction, createFlagsReducer, ConnectedFlagsProvider };\n```\n\n## React API\n\nFor brevity, the type `T` in the section below refers to the shape of your resolved feature flags.\n\n### Computable\n\nGeneric type used to describe unresolved flags. Very useful when including functions are part of your flag definitions because function arguments can be inferred.\n\n```tsx\nimport { Computable } from \"flag\";\n\ntype MyFlags = {\n  a: boolean;\n  b: boolean;\n  c: boolean;\n};\n\nconst flags: Computable<MyFlags> = {\n  a: true,\n  b: false,\n  // 👇 `flags` type checks!\n  c: flags => flags.a && flags.b\n};\n```\n\n### FlagsProvider\n\nReturned as part of `createFlags()`. React component that makes flags available to children through the Context API.\n\n| Props      | Type            | Required | Description            |\n| ---------- | --------------- | -------- | ---------------------- |\n| `flags`    | `Computable<T>` | `true`   | All pre-computed flags |\n| `children` | `ReactNode`     | `true`   | React children         |\n\n```tsx\n// index.tsx\n\nimport { MyApplication } from \"./app\";\nimport { FlagsProvider, Flag } from \"./flags\";\n\nconst instance = (\n  <FlagsProvider flags={flags}>\n    <MyApplication />\n  </FlagsProvider>\n);\n\nReact.render(instance, document.querySelector(\"#app\"));\n```\n\n### Flag\n\nReturned as part of `createFlags()`. Renders a some UI based on whether a flag is truthy or falsy. It's a glorified if statement 😬. Must be used in side of `FlagsProvider`.\n\n| Props               | Type                          | Required | Description                         |\n| ------------------- | ----------------------------- | -------- | ----------------------------------- |\n| `name`              | `string[]`                    | `true`   | Must be a valid key path of `T`     |\n| `children`          | `ReactNode`                   | `false`  | React children                      |\n| `render`            | `(flags: T) => ReactNode`     | `false`  | Function that returns a `ReactNode` |\n| `fallbackRender`    | `(flags: T) => ReactNode`     | `false`  | Function that returns a `ReactNode` |\n| `component`         | `ComponentType<{ flags: T }>` | `false`  | React Component with `T` as props   |\n| `fallbackComponent` | `ComponentType<{ flags: T }>` | `false`  | React Component with `T` as props   |\n\nOrder of deciding which of these nodes to renders is as follows:\n\n- If the flag is `truthy`:\n  - render `children` if defined\n  - call `render` with `T` if defined _or_\n  - call `component` with `{flags: T}` if defined _else_\n  - return `null`\n- If the flag is `falsy`:\n  - call `fallbackRender` with `T` if defined _or_\n  - call `fallbackComponent` with `{ flags: T }` if defined _else_\n  - return `null`\n\n```tsx\n<Flag\n  name={[\"features\", \"useMyCoolNewThing\"]}\n  render={() => <div>Rendered on truthy</div>}\n  fallbackRender={() => <div>Rendered on falsy</div>}\n/>\n```\n\n### useFlags\n\nReturned as part of `createFlags()`. A React hook that returns all of the flags. Must be used in side of `FlagsProvider`.\n\n```tsx\n// my-component.tsx\n\nimport { useFlags } from \"./flags\";\n\nconst MyComponent = () => {\n  const flags = useFlags();\n\n  return <div>The API url is \"{flags.config.apiUrl}\"</div>;\n};\n```\n\n### useFlag\n\nReturned as part of `createFlags()`. A React hook to return a single flag. Must be used in side of `FlagsProvider`.\n\n| Args      | Type       | Required | Description                     |\n| --------- | ---------- | -------- | ------------------------------- |\n| `keyPath` | `string[]` | `true`   | Must be a valid key path of `T` |\n\n```tsx\n// my-component.tsx\n\nimport { useFlags } from \"./flags\";\n\nconst MyComponent = () => {\n  const apiUrl = useFlag([\"config\", \"apiUrl\"]);\n\n  return <div>The API url is \"{apiUrl}\"</div>;\n};\n```\n\n## Redux API\n\n### createFlagsReducer\n\nReturned as part of `createReduxBindings(...)`. Creates a reducer to be used in your Redux stores.\n\n| Args    | Type | Required | Description                     |\n| ------- | ---- | -------- | ------------------------------- |\n| `flags` | `T`  | `true`   | The initial value of your flags |\n\n```tsx\n// reducer.ts\n\nimport { combineReducers } from \"redux\";\nimport { Computable } from \"flag\";\nimport { createFlagsReducer, MyFlags } from \"./flags\";\nimport { otherReducer } from \"./other-reducer\";\n\nconst flags: Computable<MyFlags> = {\n  // ...\n};\n\nexport default combineReducers({\n  // 👇 must use the \"flags\" key of your state\n  flags: createFlagsReducuer(flags),\n  other: otherReducer\n});\n```\n\n### ConnectedFlagsProvider\n\nReturned as part of `createReduxBindings(...)`. Wraps `FlagsProvider`, fetching the flags from Redux state.\n\n```tsx\nimport { Provider } from \"redux\";\nimport { MyApplication } from \"./app\";\nimport { ConnectedFlagsProvider } from \"./flags\";\nimport { store } from \"./store\";\n\nconst instance = (\n  <Provider store={store}>\n    <ConnectedFlagsProvider>\n      <MyApplication />\n    </ConnectedFlagsProvider>\n  </Provider>\n);\n\nReact.render(instance, document.querySelector(\"#app\"));\n```\n\n### setFlagsAction\n\nReturned as part of `createReduxBindings(...)`. A dispatchable action that sets flags. Merges a partial value of pre-computed flags with existing pre-computed flags.\n\n| Args    | Type            | Required | Description                |\n| ------- | --------------- | -------- | -------------------------- |\n| `flags` | `Computable<T>` | `true`   | Partial pre-computed flags |\n\n```tsx\nimport { Thunk } from \"redux-thunk\";\nimport { setFlagsAction } from \"./flags\";\n\nexport const someThunk: Thunk<any> = ({ dispatch }) => async () => {\n  const user = await fetchUser();\n\n  dispatch(setFlagsAction(user.flags));\n  // ...\n};\n```\n\n## License\n\nMPL-2.0\n","licenseText":"Copyright 2019 (c) Gabe Scholz\n\n# Mozilla Public License Version 2.0\n\n### 1. Definitions\n\n**1.1. “Contributor”**  \n means each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n**1.2. “Contributor Version”**  \n means the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n**1.3. “Contribution”**  \n means Covered Software of a particular Contributor.\n\n**1.4. “Covered Software”**  \n means Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n**1.5. “Incompatible With Secondary Licenses”**  \n means\n\n- **(a)** that the initial Contributor has attached the notice described\n  in Exhibit B to the Covered Software; or\n- **(b)** that the Covered Software was made available under the terms of\n  version 1.1 or earlier of the License, but not also under the\n  terms of a Secondary License.\n\n**1.6. “Executable Form”**  \n means any form of the work other than Source Code Form.\n\n**1.7. “Larger Work”**  \n means a work that combines Covered Software with other material, in\na separate file or files, that is not Covered Software.\n\n**1.8. “License”**  \n means this document.\n\n**1.9. “Licensable”**  \n means having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n**1.10. “Modifications”**  \n means any of the following:\n\n- **(a)** any file in Source Code Form that results from an addition to,\n  deletion from, or modification of the contents of Covered\n  Software; or\n- **(b)** any new file in Source Code Form that contains any Covered\n  Software.\n\n**1.11. “Patent Claims” of a Contributor**  \n means any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n**1.12. “Secondary License”**  \n means either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n**1.13. “Source Code Form”**  \n means the form of the work preferred for making modifications.\n\n**1.14. “You” (or “Your”)**  \n means an individual or a legal entity exercising rights under this\nLicense. For legal entities, “You” includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, “control” means **(a)** the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or **(b)** ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n### 2. License Grants and Conditions\n\n#### 2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n- **(a)** under intellectual property rights (other than patent or trademark)\n  Licensable by such Contributor to use, reproduce, make available,\n  modify, display, perform, distribute, and otherwise exploit its\n  Contributions, either on an unmodified basis, with Modifications, or\n  as part of a Larger Work; and\n- **(b)** under Patent Claims of such Contributor to make, use, sell, offer\n  for sale, have made, import, and otherwise transfer either its\n  Contributions or its Contributor Version.\n\n#### 2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n#### 2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n- **(a)** for any code that a Contributor has removed from Covered Software;\n  or\n- **(b)** for infringements caused by: **(i)** Your and any other third party's\n  modifications of Covered Software, or **(ii)** the combination of its\n  Contributions with other software (except as part of its Contributor\n  Version); or\n- **(c)** under Patent Claims infringed by Covered Software in the absence of\n  its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n#### 2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n#### 2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n#### 2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n#### 2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n### 3. Responsibilities\n\n#### 3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n#### 3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n- **(a)** such Covered Software must also be made available in Source Code\n  Form, as described in Section 3.1, and You must inform recipients of\n  the Executable Form how they can obtain a copy of such Source Code\n  Form by reasonable means in a timely manner, at a charge no more\n  than the cost of distribution to the recipient; and\n\n- **(b)** You may distribute such Executable Form under the terms of this\n  License, or sublicense it under different terms, provided that the\n  license for the Executable Form does not attempt to limit or alter\n  the recipients' rights in the Source Code Form under this License.\n\n#### 3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n#### 3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n#### 3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n### 4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: **(a)** comply with\nthe terms of this License to the maximum extent possible; and **(b)**\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n### 5. Termination\n\n**5.1.** The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated **(a)** provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and **(b)** on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n**5.2.** If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n### 6. Disclaimer of Warranty\n\n> Covered Software is provided under this License on an “as is”\n> basis, without warranty of any kind, either expressed, implied, or\n> statutory, including, without limitation, warranties that the\n> Covered Software is free of defects, merchantable, fit for a\n> particular purpose or non-infringing. The entire risk as to the\n> quality and performance of the Covered Software is with You.\n> Should any Covered Software prove defective in any respect, You\n> (not any Contributor) assume the cost of any necessary servicing,\n> repair, or correction. This disclaimer of warranty constitutes an\n> essential part of this License. No use of any Covered Software is\n> authorized under this License except under this disclaimer.\n\n### 7. Limitation of Liability\n\n> Under no circumstances and under no legal theory, whether tort\n> (including negligence), contract, or otherwise, shall any\n> Contributor, or anyone who distributes Covered Software as\n> permitted above, be liable to You for any direct, indirect,\n> special, incidental, or consequential damages of any character\n> including, without limitation, damages for lost profits, loss of\n> goodwill, work stoppage, computer failure or malfunction, or any\n> and all other commercial damages or losses, even if such party\n> shall have been informed of the possibility of such damages. This\n> limitation of liability shall not apply to liability for death or\n> personal injury resulting from such party's negligence to the\n> extent applicable law prohibits such limitation. Some\n> jurisdictions do not allow the exclusion or limitation of\n> incidental or consequential damages, so this exclusion and\n> limitation may not apply to You.\n\n### 8. Litigation\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n### 9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n### 10. Versions of the License\n\n#### 10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n#### 10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n#### 10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\n## Exhibit A - Source Code Form License Notice\n\n    This Source Code Form is subject to the terms of the Mozilla Public\n    License, v. 2.0. If a copy of the MPL was not distributed with this\n    file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\n## Exhibit B - “Incompatible With Secondary Licenses” Notice\n\n    This Source Code Form is \"Incompatible With Secondary Licenses\", as\n    defined by the Mozilla Public License, v. 2.0.\n","_id":"flag@4.0.0-1","dist":{"shasum":"fb498fccd5200039c48fceb4e1744534008cd0c9","tarball":"https://registry.npmjs.org/flag/-/flag-4.0.0-1.tgz","integrity":"sha512-kYwugx8DDr2fr0XjOTT/UciSFPkYxEPQwKwMlIUkZAY6IFnsv0pqQn3gbm1X9yb54ZyeCNs8EGWf08iki1R+mw==","fileCount":15,"unpackedSize":33266,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcu154CRA9TVsSAnZWagAA7aIP/3/7Mf2hPOu2F6nfTqyX\n6ErG0FDFPiuNb0Q/vjwEDnUyNbQ6Ac4SMqN26/0dbmc+Q2/wp5Mng8Kic3OR\nJk3LDQZVL/hJQMCkBFsQ/oHZHqLBSkLOIAtnFI+96IwcnYlbnmqRzAf2sHVF\ns1JNp0wYx8FOwGZ+D5cU9wHoHnnM9JcIIQuxBEF3CaJJsvj1DYUsWnNl8LqV\nooGUA9Lhw/CKMk5ZfPK4BCLC+XyoTXFBEPnDwQl0T2YHMUsabuxoiAx4Zu47\n/p1axm68UwqzVYULFId+iCsL/Zbs9bHAyNHZchZ+wAsnHXEGNS6Rsb6HYYpF\n6zYRq8vuqU4BhN2oSLAn3fcTBGnKhvJoYqEAUsh3oYzKLBZVNLjAaYrqT8wG\nW8VZchvUVHpit7/oWaLk1JoqeuyNibzhn0drBpMgioUz5xV/kYEyyAXllgyU\nkQocwqqmC5TIU9JHftDt0AGxkPrRUSDzwwuA4iLc/LVhx+5Dqp0Ymhf3NRyR\nDLrvXDDEPkmOyJKpkKMC0eKOV080tsJIFvs1nR4IFMIMI7s4Y/pIPc1Fixat\nGUTtFLnaO8Ao11dbge5WicApqsz9nusIcWYBwEAMsGrgOWCmj3qJA/dRIilp\njF+RKnSaUSf2gvssFrYhkK32I2WizsEHWUcZAvuVHHpYww1hV7xjYCrzRx2I\npDSh\r\n=5bf4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCU9/UHXoPO1LqUH4dGykBsE1yKItppL1KIOAmD9BdcBgIhAM5j2TzZYrxT06RIgWhNogC5Efz7NqT+cdNI3S1QBx+s"}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag_4.0.0-1_1555783287264_0.5388760932743994"},"_hasShrinkwrap":false},"4.0.0-2":{"name":"flag","version":"4.0.0-2","description":"Feature flagging made easy for React and Redux","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"https://github.com/garbles/flag"},"author":{"name":"Gabe Scholz"},"license":"MPL-2.0","devDependencies":{"@types/enzyme":"^3.9.1","@types/jest":"^24.0.11","@types/lodash":"^4.14.123","@types/shallowequal":"^1.1.1","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.12.1","jest":"^24.7.1","np":"^4.0.2","react":"^16.8.6","react-dom":"^16.8.6","ts-jest":"^24.0.1","typescript":"3.3.4000"},"dependencies":{"deep-computed":"^0.1.1","lodash":"^4.17.11","shallowequal":"^1.1.0","useful-types":"^0.2.1"},"peerDependencies":{"react":"^16.8.6","react-dom":"^16.8.6"},"optionalDependencies":{"@types/react":"^16.8.12","@types/react-dom":"^16.8.3","@types/react-redux":"^7.0.7","@types/redux":"^3.6.0","react-redux":"^7.0.2","redux":"^4.0.1"},"scripts":{"clean":"rm -rf build","build":"tsc","prepublish":"yarn clean && yarn build","test":"jest","pub":"np"},"readmeFilename":"README.md","readme":"# Flag\n\n_Feature flagging made easy for React and Redux_\n\n```\nyarn add flag@next\n```\n\n## Motivation\n\nFeature flagging is necessary for large client-side applications. They improve development speed\nand allow teams to test new features before they are stable. In order to **WANT** to use feature\nflags in an application, they should be **VERY** easy to add and remove. That means minimal\nboiler plate and no need to pass boolean props down through component hierarchy. Such a thing could be\ndone with global variables; however, they live outside of the React/Redux lifecycle, making them\nmore difficult to control. Instead, this library injects and then accesses feature flags directly\nfrom the React context without getting in your way.\n\nFlag allows you to declare flags as either plain values or as functions. If a flag is a function then it is referred to as a computed flag. The function accepts one argument which is the flags object itself. You do not have to use computed flags, but they can be very convenient. For example,\n\n```ts\nconst flags = {\n  // properties can be nested objects\n  features: {\n    // they can be boolean\n    useMyCoolNewThing: true\n  },\n  config: {\n    // they can be strings\n    apiUrl: \"www.example.com/api\"\n  },\n  // they can be numbers\n  cool: 1,\n  dude: 5,\n  // they can be computed\n  coolAndDude: flags => flags.cool + flags.dude,\n  // they can be computed from other computed properties.\n  // other computed properties are resolved for you, so that you do not\n  // need to call it as a function.\n  largeCoolAndDude: flags => flags.coolAndDude > 10\n};\n```\n\n## Getting Started\n\nThis library has strong TypeScript support as of v4. In order to get that support, you must\ninitialize the `flag` library before using it.\n\n### createFlags\n\nCreates React bindings for flags. **You should only initialize one instance of this API**. Does\nnot take any value arguments, but takes one type argument `T` which is the shape of your resolved\nflags.\n\n```ts\n// flags.ts\n\nimport createFlags from \"flag\";\n\nexport type MyFlags = {\n  features: {\n    useMyCoolNewThing: boolean;\n  };\n  config: {\n    apiUrl: string;\n  };\n  cool: number;\n  dude: number;\n  coolAndDude: number;\n  largeCoolAndDude: boolean;\n};\n\nconst { FlagsProvider, Flag, useFlag, useFlags } = createFlags<MyFlags>();\n\nexport { FlagsProvider, Flag, useFlag, useFlags };\n```\n\n### createReduxBindings\n\nYou can also add support for Redux by importing `createReduxBindings` from `flag/redux`.\n\n| Args       | Type               | Required | Description                       |\n| ---------- | ------------------ | -------- | --------------------------------- |\n| `provider` | `FlagsProvider<T>` | `true`   | Provider created by `createFlags` |\n\n```ts\n// flags.ts\n\n// ... the above\n\nimport createReduxBindings from \"flag/redux\";\n\nconst {\n  setFlagsAction,\n  createFlagsReducer,\n  ConnectedFlagsProvider\n} = createReduxBindings(FlagsProvider);\n\nexport { setFlagsAction, createFlagsReducer, ConnectedFlagsProvider };\n```\n\n## React API\n\nFor brevity, the type `T` in the section below refers to the shape of your resolved feature flags.\n\n### Computable\n\nGeneric type used to describe unresolved flags. Very useful when including functions are part of your flag definitions because function arguments can be inferred.\n\n```tsx\nimport { Computable } from \"flag\";\n\ntype MyFlags = {\n  a: boolean;\n  b: boolean;\n  c: boolean;\n};\n\nconst flags: Computable<MyFlags> = {\n  a: true,\n  b: false,\n  // 👇 `flags` type checks!\n  c: flags => flags.a && flags.b\n};\n```\n\n### FlagsProvider\n\nReturned as part of `createFlags()`. React component that makes flags available to children through the Context API.\n\n| Props      | Type            | Required | Description            |\n| ---------- | --------------- | -------- | ---------------------- |\n| `flags`    | `Computable<T>` | `true`   | All pre-computed flags |\n| `children` | `ReactNode`     | `true`   | React children         |\n\n```tsx\n// index.tsx\n\nimport { MyApplication } from \"./app\";\nimport { FlagsProvider, Flag } from \"./flags\";\n\nconst instance = (\n  <FlagsProvider flags={flags}>\n    <MyApplication />\n  </FlagsProvider>\n);\n\nReact.render(instance, document.querySelector(\"#app\"));\n```\n\n### Flag\n\nReturned as part of `createFlags()`. Renders a some UI based on whether a flag is truthy or falsy. It's a glorified if statement 😬. Must be used in side of `FlagsProvider`.\n\n| Props               | Type                          | Required | Description                         |\n| ------------------- | ----------------------------- | -------- | ----------------------------------- |\n| `name`              | `string[]`                    | `true`   | Must be a valid key path of `T`     |\n| `children`          | `ReactNode`                   | `false`  | React children                      |\n| `render`            | `(flags: T) => ReactNode`     | `false`  | Function that returns a `ReactNode` |\n| `fallbackRender`    | `(flags: T) => ReactNode`     | `false`  | Function that returns a `ReactNode` |\n| `component`         | `ComponentType<{ flags: T }>` | `false`  | React Component with `T` as props   |\n| `fallbackComponent` | `ComponentType<{ flags: T }>` | `false`  | React Component with `T` as props   |\n\nOrder of deciding which of these nodes to renders is as follows:\n\n- If the flag is `truthy`:\n  - render `children` if defined\n  - call `render` with `T` if defined _or_\n  - call `component` with `{flags: T}` if defined _else_\n  - return `null`\n- If the flag is `falsy`:\n  - call `fallbackRender` with `T` if defined _or_\n  - call `fallbackComponent` with `{ flags: T }` if defined _else_\n  - return `null`\n\n```tsx\n<Flag\n  name={[\"features\", \"useMyCoolNewThing\"]}\n  render={() => <div>Rendered on truthy</div>}\n  fallbackRender={() => <div>Rendered on falsy</div>}\n/>\n```\n\n### useFlags\n\nReturned as part of `createFlags()`. A React hook that returns all of the flags. Must be used in side of `FlagsProvider`.\n\n```tsx\n// my-component.tsx\n\nimport { useFlags } from \"./flags\";\n\nconst MyComponent = () => {\n  const flags = useFlags();\n\n  return <div>The API url is \"{flags.config.apiUrl}\"</div>;\n};\n```\n\n### useFlag\n\nReturned as part of `createFlags()`. A React hook to return a single flag. Must be used in side of `FlagsProvider`.\n\n| Args      | Type       | Required | Description                     |\n| --------- | ---------- | -------- | ------------------------------- |\n| `keyPath` | `string[]` | `true`   | Must be a valid key path of `T` |\n\n```tsx\n// my-component.tsx\n\nimport { useFlags } from \"./flags\";\n\nconst MyComponent = () => {\n  const apiUrl = useFlag([\"config\", \"apiUrl\"]);\n\n  return <div>The API url is \"{apiUrl}\"</div>;\n};\n```\n\n## Redux API\n\n### createFlagsReducer\n\nReturned as part of `createReduxBindings(...)`. Creates a reducer to be used in your Redux stores.\n\n| Args    | Type | Required | Description                     |\n| ------- | ---- | -------- | ------------------------------- |\n| `flags` | `T`  | `true`   | The initial value of your flags |\n\n```tsx\n// reducer.ts\n\nimport { combineReducers } from \"redux\";\nimport { Computable } from \"flag\";\nimport { createFlagsReducer, MyFlags } from \"./flags\";\nimport { otherReducer } from \"./other-reducer\";\n\nconst flags: Computable<MyFlags> = {\n  // ...\n};\n\nexport default combineReducers({\n  // 👇 must use the \"flags\" key of your state\n  flags: createFlagsReducuer(flags),\n  other: otherReducer\n});\n```\n\n### ConnectedFlagsProvider\n\nReturned as part of `createReduxBindings(...)`. Wraps `FlagsProvider`, fetching the flags from Redux state.\n\n```tsx\nimport { Provider } from \"redux\";\nimport { MyApplication } from \"./app\";\nimport { ConnectedFlagsProvider } from \"./flags\";\nimport { store } from \"./store\";\n\nconst instance = (\n  <Provider store={store}>\n    <ConnectedFlagsProvider>\n      <MyApplication />\n    </ConnectedFlagsProvider>\n  </Provider>\n);\n\nReact.render(instance, document.querySelector(\"#app\"));\n```\n\n### setFlagsAction\n\nReturned as part of `createReduxBindings(...)`. A dispatchable action that sets flags. Merges a partial value of pre-computed flags with existing pre-computed flags.\n\n| Args    | Type            | Required | Description                |\n| ------- | --------------- | -------- | -------------------------- |\n| `flags` | `Computable<T>` | `true`   | Partial pre-computed flags |\n\n```tsx\nimport { Thunk } from \"redux-thunk\";\nimport { setFlagsAction } from \"./flags\";\n\nexport const someThunk: Thunk<any> = ({ dispatch }) => async () => {\n  const user = await fetchUser();\n\n  dispatch(setFlagsAction(user.flags));\n  // ...\n};\n```\n\n## License\n\nMPL-2.0\n","licenseText":"Copyright 2019 (c) Gabe Scholz\n\n# Mozilla Public License Version 2.0\n\n### 1. Definitions\n\n**1.1. “Contributor”**  \n means each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n**1.2. “Contributor Version”**  \n means the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n**1.3. “Contribution”**  \n means Covered Software of a particular Contributor.\n\n**1.4. “Covered Software”**  \n means Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n**1.5. “Incompatible With Secondary Licenses”**  \n means\n\n- **(a)** that the initial Contributor has attached the notice described\n  in Exhibit B to the Covered Software; or\n- **(b)** that the Covered Software was made available under the terms of\n  version 1.1 or earlier of the License, but not also under the\n  terms of a Secondary License.\n\n**1.6. “Executable Form”**  \n means any form of the work other than Source Code Form.\n\n**1.7. “Larger Work”**  \n means a work that combines Covered Software with other material, in\na separate file or files, that is not Covered Software.\n\n**1.8. “License”**  \n means this document.\n\n**1.9. “Licensable”**  \n means having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n**1.10. “Modifications”**  \n means any of the following:\n\n- **(a)** any file in Source Code Form that results from an addition to,\n  deletion from, or modification of the contents of Covered\n  Software; or\n- **(b)** any new file in Source Code Form that contains any Covered\n  Software.\n\n**1.11. “Patent Claims” of a Contributor**  \n means any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n**1.12. “Secondary License”**  \n means either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n**1.13. “Source Code Form”**  \n means the form of the work preferred for making modifications.\n\n**1.14. “You” (or “Your”)**  \n means an individual or a legal entity exercising rights under this\nLicense. For legal entities, “You” includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, “control” means **(a)** the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or **(b)** ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n### 2. License Grants and Conditions\n\n#### 2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n- **(a)** under intellectual property rights (other than patent or trademark)\n  Licensable by such Contributor to use, reproduce, make available,\n  modify, display, perform, distribute, and otherwise exploit its\n  Contributions, either on an unmodified basis, with Modifications, or\n  as part of a Larger Work; and\n- **(b)** under Patent Claims of such Contributor to make, use, sell, offer\n  for sale, have made, import, and otherwise transfer either its\n  Contributions or its Contributor Version.\n\n#### 2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n#### 2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n- **(a)** for any code that a Contributor has removed from Covered Software;\n  or\n- **(b)** for infringements caused by: **(i)** Your and any other third party's\n  modifications of Covered Software, or **(ii)** the combination of its\n  Contributions with other software (except as part of its Contributor\n  Version); or\n- **(c)** under Patent Claims infringed by Covered Software in the absence of\n  its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n#### 2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n#### 2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n#### 2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n#### 2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n### 3. Responsibilities\n\n#### 3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n#### 3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n- **(a)** such Covered Software must also be made available in Source Code\n  Form, as described in Section 3.1, and You must inform recipients of\n  the Executable Form how they can obtain a copy of such Source Code\n  Form by reasonable means in a timely manner, at a charge no more\n  than the cost of distribution to the recipient; and\n\n- **(b)** You may distribute such Executable Form under the terms of this\n  License, or sublicense it under different terms, provided that the\n  license for the Executable Form does not attempt to limit or alter\n  the recipients' rights in the Source Code Form under this License.\n\n#### 3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n#### 3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n#### 3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n### 4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: **(a)** comply with\nthe terms of this License to the maximum extent possible; and **(b)**\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n### 5. Termination\n\n**5.1.** The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated **(a)** provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and **(b)** on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n**5.2.** If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n### 6. Disclaimer of Warranty\n\n> Covered Software is provided under this License on an “as is”\n> basis, without warranty of any kind, either expressed, implied, or\n> statutory, including, without limitation, warranties that the\n> Covered Software is free of defects, merchantable, fit for a\n> particular purpose or non-infringing. The entire risk as to the\n> quality and performance of the Covered Software is with You.\n> Should any Covered Software prove defective in any respect, You\n> (not any Contributor) assume the cost of any necessary servicing,\n> repair, or correction. This disclaimer of warranty constitutes an\n> essential part of this License. No use of any Covered Software is\n> authorized under this License except under this disclaimer.\n\n### 7. Limitation of Liability\n\n> Under no circumstances and under no legal theory, whether tort\n> (including negligence), contract, or otherwise, shall any\n> Contributor, or anyone who distributes Covered Software as\n> permitted above, be liable to You for any direct, indirect,\n> special, incidental, or consequential damages of any character\n> including, without limitation, damages for lost profits, loss of\n> goodwill, work stoppage, computer failure or malfunction, or any\n> and all other commercial damages or losses, even if such party\n> shall have been informed of the possibility of such damages. This\n> limitation of liability shall not apply to liability for death or\n> personal injury resulting from such party's negligence to the\n> extent applicable law prohibits such limitation. Some\n> jurisdictions do not allow the exclusion or limitation of\n> incidental or consequential damages, so this exclusion and\n> limitation may not apply to You.\n\n### 8. Litigation\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n### 9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n### 10. Versions of the License\n\n#### 10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n#### 10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n#### 10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\n## Exhibit A - Source Code Form License Notice\n\n    This Source Code Form is subject to the terms of the Mozilla Public\n    License, v. 2.0. If a copy of the MPL was not distributed with this\n    file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\n## Exhibit B - “Incompatible With Secondary Licenses” Notice\n\n    This Source Code Form is \"Incompatible With Secondary Licenses\", as\n    defined by the Mozilla Public License, v. 2.0.\n","_id":"flag@4.0.0-2","dist":{"shasum":"e211378a9dded402e361f9f0148d689ec349cf7b","tarball":"https://registry.npmjs.org/flag/-/flag-4.0.0-2.tgz","integrity":"sha512-fhy0p6nVcznsoFPNyMbUGK2pvCJSE4TCGa9U3LOTKocV40NS6ApRwQysueAGMxIEdd4GjT9s7D119qYqWvm3bA==","fileCount":15,"unpackedSize":33266,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcu5THCRA9TVsSAnZWagAAdRMP/RkI3pzv87L4dSgPkmDn\n5RzWRLvVRj6o6IlbFriaGK1coVZmQLlLLEv8cYyZe1b1VPt7m0hWGF74LsvE\nxMTrreoCzOYMxsEWqZPFirxFx0fACUK3zXyBlgXDG+w5q+Cs+l03gIEJy3uP\nv/+YZvWx8yKXKvp03f5AnBdiwIK+Xa/M5e4ZWPeJ7gAAoZ8T98o1MI/8OtTJ\nlgnY13bp4Vr8zafeqHQWyFiqmpDBbcRaJaLYNWfxLtEdt5R7J5rvBT6xuujj\nTixoJ1bJ9dry6KY/W2vRQ5Y3iOJqSZucXvGaq4ywrbIhDl3Rg1d2nnUJK+Of\nCCXoX8r5+ttPTtmvm+oL98XtswbKKuCtI1Mkr0JBGkAezGYiiSYod9rzG9Is\ndnZPQTSy5M8YRJkRphmldGRpP0E3sQQCRiBv9yddHw323lIyFiKuFk0rpcUU\nOxll+R1jly3S1UpZh2KQBvdUiSk4o4VTV0RxCUxgO3lyNIxwlpnB94vtU9nq\nDc1FsQRWt+xPlGDSPB4AeJtaIMmdnnCk/1CPs34IdsEcrmTBLB3lJOcvek7X\nP8tI6TRM6iXKZlC21elGnuvW4nM/ysRWnfm+MmQSjghrcOCEwdFV0XHfLkBm\nSaNuHOMzTKJ9KARMhTSHy+sSK83FNJls7k0TYHZNLy4I8FjczsobZlXBRx2q\n/tRR\r\n=Jxc3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICwRSXrz8vYp0aa3qjWqJMW5mEv5cp74feG05WeQknEeAiAFJq9VGQZE+7nKp1Hr8L39iQs+7Kt2d5POy3Zglds/5Q=="}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag_4.0.0-2_1555797190348_0.20754520439179536"},"_hasShrinkwrap":false},"4.0.0-3":{"name":"flag","version":"4.0.0-3","description":"Feature flagging made easy for React and Redux","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"https://github.com/garbles/flag"},"author":{"name":"Gabe Scholz"},"license":"MPL-2.0","devDependencies":{"@types/enzyme":"^3.9.1","@types/jest":"^24.0.11","@types/lodash":"^4.14.123","@types/shallowequal":"^1.1.1","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.12.1","jest":"^24.7.1","np":"^4.0.2","react":"^16.8.6","react-dom":"^16.8.6","ts-jest":"^24.0.1","typescript":"3.3.4000"},"dependencies":{"deep-computed":"^0.1.1","lodash":"^4.17.11","shallowequal":"^1.1.0","useful-types":"^0.2.1"},"peerDependencies":{"react":"^16.8.6","react-dom":"^16.8.6"},"optionalDependencies":{"@types/react":"^16.8.12","@types/react-dom":"^16.8.3","@types/react-redux":"^7.0.7","@types/redux":"^3.6.0","react-redux":"^7.0.2","redux":"^4.0.1"},"scripts":{"clean":"rm -rf build","build":"tsc","prepublish":"yarn clean && yarn build","test":"jest","pub":"np"},"readmeFilename":"README.md","readme":"# Flag\n\n_Feature flagging made easy for React and Redux_\n\n```\nyarn add flag@next\n```\n\n## Motivation\n\nFeature flagging is necessary for large client-side applications. They improve development speed\nand allow teams to test new features before they are stable. In order to **WANT** to use feature\nflags in an application, they should be **VERY** easy to add and remove. That means minimal\nboiler plate and no need to pass boolean props down through component hierarchy. Such a thing could be\ndone with global variables; however, they live outside of the React/Redux lifecycle, making them\nmore difficult to control. Instead, this library injects and then accesses feature flags directly\nfrom the React context without getting in your way.\n\nFlag allows you to declare flags as either plain values or as functions. If a flag is a function then it is referred to as a computed flag. The function accepts one argument which is the flags object itself. You do not have to use computed flags, but they can be very convenient. For example,\n\n```ts\nconst flags = {\n  // properties can be nested objects\n  features: {\n    // they can be boolean\n    useMyCoolNewThing: true\n  },\n  config: {\n    // they can be strings\n    apiUrl: \"www.example.com/api\"\n  },\n  // they can be numbers\n  cool: 1,\n  dude: 5,\n  // they can be computed\n  coolAndDude: flags => flags.cool + flags.dude,\n  // they can be computed from other computed properties.\n  // other computed properties are resolved for you, so that you do not\n  // need to call it as a function.\n  largeCoolAndDude: flags => flags.coolAndDude > 10\n};\n```\n\n## Getting Started\n\nThis library has strong TypeScript support as of v4. In order to get that support, you must\ninitialize the `flag` library before using it.\n\n### createFlags\n\nCreates React bindings for flags. **You should only initialize one instance of this API**. Does\nnot take any value arguments, but takes one type argument `T` which is the shape of your resolved\nflags.\n\n```ts\n// flags.ts\n\nimport createFlags from \"flag\";\n\nexport type MyFlags = {\n  features: {\n    useMyCoolNewThing: boolean;\n  };\n  config: {\n    apiUrl: string;\n  };\n  cool: number;\n  dude: number;\n  coolAndDude: number;\n  largeCoolAndDude: boolean;\n};\n\nconst { FlagsProvider, Flag, useFlag, useFlags } = createFlags<MyFlags>();\n\nexport { FlagsProvider, Flag, useFlag, useFlags };\n```\n\n### createReduxBindings\n\nYou can also add support for Redux by importing `createReduxBindings` from `flag/redux`.\n\n| Args       | Type               | Required | Description                       |\n| ---------- | ------------------ | -------- | --------------------------------- |\n| `provider` | `FlagsProvider<T>` | `true`   | Provider created by `createFlags` |\n\n```ts\n// flags.ts\n\n// ... the above\n\nimport createReduxBindings from \"flag/redux\";\n\nconst {\n  setFlagsAction,\n  createFlagsReducer,\n  ConnectedFlagsProvider\n} = createReduxBindings(FlagsProvider);\n\nexport { setFlagsAction, createFlagsReducer, ConnectedFlagsProvider };\n```\n\n## React API\n\nFor brevity, the type `T` in the section below refers to the shape of your resolved feature flags.\n\n### Computable\n\nGeneric type used to describe unresolved flags. Very useful when including functions are part of your flag definitions because function arguments can be inferred.\n\n```tsx\nimport { Computable } from \"flag\";\n\ntype MyFlags = {\n  a: boolean;\n  b: boolean;\n  c: boolean;\n};\n\nconst flags: Computable<MyFlags> = {\n  a: true,\n  b: false,\n  // 👇 `flags` type checks!\n  c: flags => flags.a && flags.b\n};\n```\n\n### FlagsProvider\n\nReturned as part of `createFlags()`. React component that makes flags available to children through the Context API.\n\n| Props      | Type            | Required | Description            |\n| ---------- | --------------- | -------- | ---------------------- |\n| `flags`    | `Computable<T>` | `true`   | All pre-computed flags |\n| `children` | `ReactNode`     | `true`   | React children         |\n\n```tsx\n// index.tsx\n\nimport { MyApplication } from \"./app\";\nimport { FlagsProvider, Flag } from \"./flags\";\n\nconst instance = (\n  <FlagsProvider flags={flags}>\n    <MyApplication />\n  </FlagsProvider>\n);\n\nReact.render(instance, document.querySelector(\"#app\"));\n```\n\n### Flag\n\nReturned as part of `createFlags()`. Renders a some UI based on whether a flag is truthy or falsy. It's a glorified if statement 😬. Must be used in side of `FlagsProvider`.\n\n| Props               | Type                          | Required | Description                         |\n| ------------------- | ----------------------------- | -------- | ----------------------------------- |\n| `name`              | `string[]`                    | `true`   | Must be a valid key path of `T`     |\n| `children`          | `ReactNode`                   | `false`  | React children                      |\n| `render`            | `(flags: T) => ReactNode`     | `false`  | Function that returns a `ReactNode` |\n| `fallbackRender`    | `(flags: T) => ReactNode`     | `false`  | Function that returns a `ReactNode` |\n| `component`         | `ComponentType<{ flags: T }>` | `false`  | React Component with `T` as props   |\n| `fallbackComponent` | `ComponentType<{ flags: T }>` | `false`  | React Component with `T` as props   |\n\nOrder of deciding which of these nodes to renders is as follows:\n\n- If the flag is `truthy`:\n  - render `children` if defined\n  - call `render` with `T` if defined _or_\n  - call `component` with `{flags: T}` if defined _else_\n  - return `null`\n- If the flag is `falsy`:\n  - call `fallbackRender` with `T` if defined _or_\n  - call `fallbackComponent` with `{ flags: T }` if defined _else_\n  - return `null`\n\n```tsx\n<Flag\n  name={[\"features\", \"useMyCoolNewThing\"]}\n  render={() => <div>Rendered on truthy</div>}\n  fallbackRender={() => <div>Rendered on falsy</div>}\n/>\n```\n\n### useFlags\n\nReturned as part of `createFlags()`. A React hook that returns all of the flags. Must be used in side of `FlagsProvider`.\n\n```tsx\n// my-component.tsx\n\nimport { useFlags } from \"./flags\";\n\nconst MyComponent = () => {\n  const flags = useFlags();\n\n  return <div>The API url is \"{flags.config.apiUrl}\"</div>;\n};\n```\n\n### useFlag\n\nReturned as part of `createFlags()`. A React hook to return a single flag. Must be used in side of `FlagsProvider`.\n\n| Args      | Type       | Required | Description                     |\n| --------- | ---------- | -------- | ------------------------------- |\n| `keyPath` | `string[]` | `true`   | Must be a valid key path of `T` |\n\n```tsx\n// my-component.tsx\n\nimport { useFlags } from \"./flags\";\n\nconst MyComponent = () => {\n  const apiUrl = useFlag([\"config\", \"apiUrl\"]);\n\n  return <div>The API url is \"{apiUrl}\"</div>;\n};\n```\n\n## Redux API\n\n### createFlagsReducer\n\nReturned as part of `createReduxBindings(...)`. Creates a reducer to be used in your Redux stores.\n\n| Args    | Type | Required | Description                     |\n| ------- | ---- | -------- | ------------------------------- |\n| `flags` | `T`  | `true`   | The initial value of your flags |\n\n```tsx\n// reducer.ts\n\nimport { combineReducers } from \"redux\";\nimport { Computable } from \"flag\";\nimport { createFlagsReducer, MyFlags } from \"./flags\";\nimport { otherReducer } from \"./other-reducer\";\n\nconst flags: Computable<MyFlags> = {\n  // ...\n};\n\nexport default combineReducers({\n  // 👇 must use the \"flags\" key of your state\n  flags: createFlagsReducuer(flags),\n  other: otherReducer\n});\n```\n\n### ConnectedFlagsProvider\n\nReturned as part of `createReduxBindings(...)`. Wraps `FlagsProvider`, fetching the flags from Redux state.\n\n```tsx\nimport { Provider } from \"redux\";\nimport { MyApplication } from \"./app\";\nimport { ConnectedFlagsProvider } from \"./flags\";\nimport { store } from \"./store\";\n\nconst instance = (\n  <Provider store={store}>\n    <ConnectedFlagsProvider>\n      <MyApplication />\n    </ConnectedFlagsProvider>\n  </Provider>\n);\n\nReact.render(instance, document.querySelector(\"#app\"));\n```\n\n### setFlagsAction\n\nReturned as part of `createReduxBindings(...)`. A dispatchable action that sets flags. Merges a partial value of pre-computed flags with existing pre-computed flags.\n\n| Args    | Type            | Required | Description                |\n| ------- | --------------- | -------- | -------------------------- |\n| `flags` | `Computable<T>` | `true`   | Partial pre-computed flags |\n\n```tsx\nimport { Thunk } from \"redux-thunk\";\nimport { setFlagsAction } from \"./flags\";\n\nexport const someThunk: Thunk<any> = ({ dispatch }) => async () => {\n  const user = await fetchUser();\n\n  dispatch(setFlagsAction(user.flags));\n  // ...\n};\n```\n\n## License\n\nMPL-2.0\n","licenseText":"Copyright 2019 (c) Gabe Scholz\n\n# Mozilla Public License Version 2.0\n\n### 1. Definitions\n\n**1.1. “Contributor”**  \n means each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n**1.2. “Contributor Version”**  \n means the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n**1.3. “Contribution”**  \n means Covered Software of a particular Contributor.\n\n**1.4. “Covered Software”**  \n means Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n**1.5. “Incompatible With Secondary Licenses”**  \n means\n\n- **(a)** that the initial Contributor has attached the notice described\n  in Exhibit B to the Covered Software; or\n- **(b)** that the Covered Software was made available under the terms of\n  version 1.1 or earlier of the License, but not also under the\n  terms of a Secondary License.\n\n**1.6. “Executable Form”**  \n means any form of the work other than Source Code Form.\n\n**1.7. “Larger Work”**  \n means a work that combines Covered Software with other material, in\na separate file or files, that is not Covered Software.\n\n**1.8. “License”**  \n means this document.\n\n**1.9. “Licensable”**  \n means having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n**1.10. “Modifications”**  \n means any of the following:\n\n- **(a)** any file in Source Code Form that results from an addition to,\n  deletion from, or modification of the contents of Covered\n  Software; or\n- **(b)** any new file in Source Code Form that contains any Covered\n  Software.\n\n**1.11. “Patent Claims” of a Contributor**  \n means any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n**1.12. “Secondary License”**  \n means either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n**1.13. “Source Code Form”**  \n means the form of the work preferred for making modifications.\n\n**1.14. “You” (or “Your”)**  \n means an individual or a legal entity exercising rights under this\nLicense. For legal entities, “You” includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, “control” means **(a)** the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or **(b)** ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n### 2. License Grants and Conditions\n\n#### 2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n- **(a)** under intellectual property rights (other than patent or trademark)\n  Licensable by such Contributor to use, reproduce, make available,\n  modify, display, perform, distribute, and otherwise exploit its\n  Contributions, either on an unmodified basis, with Modifications, or\n  as part of a Larger Work; and\n- **(b)** under Patent Claims of such Contributor to make, use, sell, offer\n  for sale, have made, import, and otherwise transfer either its\n  Contributions or its Contributor Version.\n\n#### 2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n#### 2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n- **(a)** for any code that a Contributor has removed from Covered Software;\n  or\n- **(b)** for infringements caused by: **(i)** Your and any other third party's\n  modifications of Covered Software, or **(ii)** the combination of its\n  Contributions with other software (except as part of its Contributor\n  Version); or\n- **(c)** under Patent Claims infringed by Covered Software in the absence of\n  its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n#### 2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n#### 2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n#### 2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n#### 2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n### 3. Responsibilities\n\n#### 3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n#### 3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n- **(a)** such Covered Software must also be made available in Source Code\n  Form, as described in Section 3.1, and You must inform recipients of\n  the Executable Form how they can obtain a copy of such Source Code\n  Form by reasonable means in a timely manner, at a charge no more\n  than the cost of distribution to the recipient; and\n\n- **(b)** You may distribute such Executable Form under the terms of this\n  License, or sublicense it under different terms, provided that the\n  license for the Executable Form does not attempt to limit or alter\n  the recipients' rights in the Source Code Form under this License.\n\n#### 3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n#### 3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n#### 3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n### 4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: **(a)** comply with\nthe terms of this License to the maximum extent possible; and **(b)**\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n### 5. Termination\n\n**5.1.** The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated **(a)** provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and **(b)** on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n**5.2.** If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n### 6. Disclaimer of Warranty\n\n> Covered Software is provided under this License on an “as is”\n> basis, without warranty of any kind, either expressed, implied, or\n> statutory, including, without limitation, warranties that the\n> Covered Software is free of defects, merchantable, fit for a\n> particular purpose or non-infringing. The entire risk as to the\n> quality and performance of the Covered Software is with You.\n> Should any Covered Software prove defective in any respect, You\n> (not any Contributor) assume the cost of any necessary servicing,\n> repair, or correction. This disclaimer of warranty constitutes an\n> essential part of this License. No use of any Covered Software is\n> authorized under this License except under this disclaimer.\n\n### 7. Limitation of Liability\n\n> Under no circumstances and under no legal theory, whether tort\n> (including negligence), contract, or otherwise, shall any\n> Contributor, or anyone who distributes Covered Software as\n> permitted above, be liable to You for any direct, indirect,\n> special, incidental, or consequential damages of any character\n> including, without limitation, damages for lost profits, loss of\n> goodwill, work stoppage, computer failure or malfunction, or any\n> and all other commercial damages or losses, even if such party\n> shall have been informed of the possibility of such damages. This\n> limitation of liability shall not apply to liability for death or\n> personal injury resulting from such party's negligence to the\n> extent applicable law prohibits such limitation. Some\n> jurisdictions do not allow the exclusion or limitation of\n> incidental or consequential damages, so this exclusion and\n> limitation may not apply to You.\n\n### 8. Litigation\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n### 9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n### 10. Versions of the License\n\n#### 10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n#### 10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n#### 10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\n## Exhibit A - Source Code Form License Notice\n\n    This Source Code Form is subject to the terms of the Mozilla Public\n    License, v. 2.0. If a copy of the MPL was not distributed with this\n    file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\n## Exhibit B - “Incompatible With Secondary Licenses” Notice\n\n    This Source Code Form is \"Incompatible With Secondary Licenses\", as\n    defined by the Mozilla Public License, v. 2.0.\n","_id":"flag@4.0.0-3","dist":{"shasum":"90a4d354ae2b8343582f089193f195a27ab3d58a","tarball":"https://registry.npmjs.org/flag/-/flag-4.0.0-3.tgz","integrity":"sha512-qKLEuFsRvqqfS8Rw0BzVpSX7Jmhoi3GtQa55LwDeRRrArHTnlW3TZ3+jslk5veSzWSiPKD/IBokR7BKKAkAS7A==","fileCount":22,"unpackedSize":45739,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJczLlFCRA9TVsSAnZWagAAfjEP/19Tes13iUFeE91vRgZv\n7CNbDW1Jft+NPp+eAqzBYeA4UqvocW84+XG6eFKjjcN1tG8/d71l8bo2x6iX\ncxup9QrMYeyDGdNFkwB1UVGjnGrf2ln2XOgGng3bDhXO0ql09iRPHu/eq72b\nnCQWG7p4Exic0oMQ+LpoxT37X1ppYShZJxmgADdfbdkATxhNH6euAbkafusF\n+qcsDetIodMYFcajyLiDT0EOd9V7AmDbixdSJi54r72zWhz1mqilN2kITzQZ\nF/ocvmGnA5d9OyOJjOa9aYOPskp7KjxW5YkozaEB9OxwhqVrZOnHOO+Y9vyc\nHIpFE0Y0NqvuCOkBtA333DL61a1R507b3Z839ueqniaex5n7CdrjXxnWF8Fc\nCU7s2shQrK+AeVG2MrQ9L7720oDc0upUJpAyMUR8LbeHScd0YicESvj9rPkz\n005FSub0guFJWo2o28Zt0L0OBVpsL8BQAptcfmLoDl2M/tnfGY4wTte+C08f\nCXx1kP3mPW1Y9ak7kce+lMguu6HAk3TgeHtbX6vdrZYPhSjU47S3URPwPAU9\neCPGHiL1QaEeMhxI2UQrNtd5ofOlThUzlSyXPmYByoJ3aAi2SW2704iFAftS\nHChb22UtxsCHaLkZ7nOjoglnFLrJLhNLnzWaxnD7ooM+EgjVzDWnJu8/2NNl\nJ+gC\r\n=q1A4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2yw7cOoUu1bAca973QQFbEDYGKBF509wipjn2/PNrbQIhAKOhqpV09p/pSpwev+p7booO+pm2xNM036pqx70/I2Tj"}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag_4.0.0-3_1556920644277_0.3805525999584085"},"_hasShrinkwrap":false},"4.0.0-4":{"name":"flag","version":"4.0.0-4","description":"Feature flagging made easy for React and Redux","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"https://github.com/garbles/flag"},"author":{"name":"Gabe Scholz"},"license":"MPL-2.0","devDependencies":{"@types/enzyme":"^3.9.1","@types/jest":"^24.0.11","@types/lodash":"^4.14.123","@types/shallowequal":"^1.1.1","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.12.1","jest":"^24.7.1","np":"^4.0.2","react":"^16.8.6","react-dom":"^16.8.6","ts-jest":"^24.0.1","typescript":"3.3.4000"},"dependencies":{"deep-computed":"^0.1.2","lodash":"^4.17.11","shallowequal":"^1.1.0","useful-types":"^0.2.1"},"peerDependencies":{"react":"^16.8.6","react-dom":"^16.8.6"},"optionalDependencies":{"@types/react":"^16.8.12","@types/react-dom":"^16.8.3","@types/react-redux":"^7.0.7","@types/redux":"^3.6.0","react-redux":"^7.0.2","redux":"^4.0.1"},"scripts":{"clean":"rm -rf build","build":"tsc","prepublish":"yarn clean && yarn build","test":"jest","pub":"np"},"readmeFilename":"README.md","readme":"# Flag\n\n_Feature flagging made easy for React and Redux_\n\n```\nyarn add flag@next\n```\n\n## Motivation\n\nFeature flagging is necessary for large client-side applications. They improve development speed\nand allow teams to test new features before they are stable. In order to **WANT** to use feature\nflags in an application, they should be **VERY** easy to add and remove. That means minimal\nboiler plate and no need to pass boolean props down through component hierarchy. Such a thing could be\ndone with global variables; however, they live outside of the React/Redux lifecycle, making them\nmore difficult to control. Instead, this library injects and then accesses feature flags directly\nfrom the React context without getting in your way.\n\nFlag allows you to declare flags as either plain values or as functions. If a flag is a function then it is referred to as a computed flag. The function accepts one argument which is the flags object itself. You do not have to use computed flags, but they can be very convenient. For example,\n\n```ts\nconst flags = {\n  // properties can be nested objects\n  features: {\n    // they can be boolean\n    useMyCoolNewThing: true\n  },\n  config: {\n    // they can be strings\n    apiUrl: \"www.example.com/api\"\n  },\n  // they can be numbers\n  cool: 1,\n  dude: 5,\n  // they can be computed\n  coolAndDude: flags => flags.cool + flags.dude,\n  // they can be computed from other computed properties.\n  // other computed properties are resolved for you, so that you do not\n  // need to call it as a function.\n  largeCoolAndDude: flags => flags.coolAndDude > 10\n};\n```\n\n## Getting Started\n\nThis library has strong TypeScript support as of v4. In order to get that support, you must\ninitialize the `flag` library before using it.\n\n### createFlags\n\nCreates React bindings for flags. **You should only initialize one instance of this API**. Does\nnot take any value arguments, but takes one type argument `T` which is the shape of your resolved\nflags.\n\n```ts\n// flags.ts\n\nimport createFlags from \"flag\";\n\nexport type MyFlags = {\n  features: {\n    useMyCoolNewThing: boolean;\n  };\n  config: {\n    apiUrl: string;\n  };\n  cool: number;\n  dude: number;\n  coolAndDude: number;\n  largeCoolAndDude: boolean;\n};\n\nconst { FlagsProvider, Flag, useFlag, useFlags } = createFlags<MyFlags>();\n\nexport { FlagsProvider, Flag, useFlag, useFlags };\n```\n\n### createReduxBindings\n\nYou can also add support for Redux by importing `createReduxBindings` from `flag/redux`.\n\n| Args       | Type               | Required | Description                       |\n| ---------- | ------------------ | -------- | --------------------------------- |\n| `provider` | `FlagsProvider<T>` | `true`   | Provider created by `createFlags` |\n\n```ts\n// flags.ts\n\n// ... the above\n\nimport createReduxBindings from \"flag/redux\";\n\nconst {\n  setFlagsAction,\n  createFlagsReducer,\n  ConnectedFlagsProvider\n} = createReduxBindings(FlagsProvider);\n\nexport { setFlagsAction, createFlagsReducer, ConnectedFlagsProvider };\n```\n\n## React API\n\nFor brevity, the type `T` in the section below refers to the shape of your resolved feature flags.\n\n### Computable\n\nGeneric type used to describe unresolved flags. Very useful when including functions are part of your flag definitions because function arguments can be inferred.\n\n```tsx\nimport { Computable } from \"flag\";\n\ntype MyFlags = {\n  a: boolean;\n  b: boolean;\n  c: boolean;\n};\n\nconst flags: Computable<MyFlags> = {\n  a: true,\n  b: false,\n  // 👇 `flags` type checks!\n  c: flags => flags.a && flags.b\n};\n```\n\n### FlagsProvider\n\nReturned as part of `createFlags()`. React component that makes flags available to children through the Context API.\n\n| Props      | Type            | Required | Description            |\n| ---------- | --------------- | -------- | ---------------------- |\n| `flags`    | `Computable<T>` | `true`   | All pre-computed flags |\n| `children` | `ReactNode`     | `true`   | React children         |\n\n```tsx\n// index.tsx\n\nimport { MyApplication } from \"./app\";\nimport { FlagsProvider, Flag } from \"./flags\";\n\nconst instance = (\n  <FlagsProvider flags={flags}>\n    <MyApplication />\n  </FlagsProvider>\n);\n\nReact.render(instance, document.querySelector(\"#app\"));\n```\n\n### Flag\n\nReturned as part of `createFlags()`. Renders a some UI based on whether a flag is truthy or falsy. It's a glorified if statement 😬. Must be used in side of `FlagsProvider`.\n\n| Props               | Type                          | Required | Description                         |\n| ------------------- | ----------------------------- | -------- | ----------------------------------- |\n| `name`              | `string[]`                    | `true`   | Must be a valid key path of `T`     |\n| `children`          | `ReactNode`                   | `false`  | React children                      |\n| `render`            | `(flags: T) => ReactNode`     | `false`  | Function that returns a `ReactNode` |\n| `fallbackRender`    | `(flags: T) => ReactNode`     | `false`  | Function that returns a `ReactNode` |\n| `component`         | `ComponentType<{ flags: T }>` | `false`  | React Component with `T` as props   |\n| `fallbackComponent` | `ComponentType<{ flags: T }>` | `false`  | React Component with `T` as props   |\n\nOrder of deciding which of these nodes to renders is as follows:\n\n- If the flag is `truthy`:\n  - render `children` if defined\n  - call `render` with `T` if defined _or_\n  - call `component` with `{flags: T}` if defined _else_\n  - return `null`\n- If the flag is `falsy`:\n  - call `fallbackRender` with `T` if defined _or_\n  - call `fallbackComponent` with `{ flags: T }` if defined _else_\n  - return `null`\n\n```tsx\n<Flag\n  name={[\"features\", \"useMyCoolNewThing\"]}\n  render={() => <div>Rendered on truthy</div>}\n  fallbackRender={() => <div>Rendered on falsy</div>}\n/>\n```\n\n### useFlags\n\nReturned as part of `createFlags()`. A React hook that returns all of the flags. Must be used in side of `FlagsProvider`.\n\n```tsx\n// my-component.tsx\n\nimport { useFlags } from \"./flags\";\n\nconst MyComponent = () => {\n  const flags = useFlags();\n\n  return <div>The API url is \"{flags.config.apiUrl}\"</div>;\n};\n```\n\n### useFlag\n\nReturned as part of `createFlags()`. A React hook to return a single flag. Must be used in side of `FlagsProvider`.\n\n| Args      | Type       | Required | Description                     |\n| --------- | ---------- | -------- | ------------------------------- |\n| `keyPath` | `string[]` | `true`   | Must be a valid key path of `T` |\n\n```tsx\n// my-component.tsx\n\nimport { useFlags } from \"./flags\";\n\nconst MyComponent = () => {\n  const apiUrl = useFlag([\"config\", \"apiUrl\"]);\n\n  return <div>The API url is \"{apiUrl}\"</div>;\n};\n```\n\n## Redux API\n\n### createFlagsReducer\n\nReturned as part of `createReduxBindings(...)`. Creates a reducer to be used in your Redux stores.\n\n| Args    | Type | Required | Description                     |\n| ------- | ---- | -------- | ------------------------------- |\n| `flags` | `T`  | `true`   | The initial value of your flags |\n\n```tsx\n// reducer.ts\n\nimport { combineReducers } from \"redux\";\nimport { Computable } from \"flag\";\nimport { createFlagsReducer, MyFlags } from \"./flags\";\nimport { otherReducer } from \"./other-reducer\";\n\nconst flags: Computable<MyFlags> = {\n  // ...\n};\n\nexport default combineReducers({\n  // 👇 must use the \"flags\" key of your state\n  flags: createFlagsReducuer(flags),\n  other: otherReducer\n});\n```\n\n### ConnectedFlagsProvider\n\nReturned as part of `createReduxBindings(...)`. Wraps `FlagsProvider`, fetching the flags from Redux state.\n\n```tsx\nimport { Provider } from \"redux\";\nimport { MyApplication } from \"./app\";\nimport { ConnectedFlagsProvider } from \"./flags\";\nimport { store } from \"./store\";\n\nconst instance = (\n  <Provider store={store}>\n    <ConnectedFlagsProvider>\n      <MyApplication />\n    </ConnectedFlagsProvider>\n  </Provider>\n);\n\nReact.render(instance, document.querySelector(\"#app\"));\n```\n\n### setFlagsAction\n\nReturned as part of `createReduxBindings(...)`. A dispatchable action that sets flags. Merges a partial value of pre-computed flags with existing pre-computed flags.\n\n| Args    | Type            | Required | Description                |\n| ------- | --------------- | -------- | -------------------------- |\n| `flags` | `Computable<T>` | `true`   | Partial pre-computed flags |\n\n```tsx\nimport { Thunk } from \"redux-thunk\";\nimport { setFlagsAction } from \"./flags\";\n\nexport const someThunk: Thunk<any> = ({ dispatch }) => async () => {\n  const user = await fetchUser();\n\n  dispatch(setFlagsAction(user.flags));\n  // ...\n};\n```\n\n## License\n\nMPL-2.0\n","licenseText":"Copyright 2019 (c) Gabe Scholz\n\n# Mozilla Public License Version 2.0\n\n### 1. Definitions\n\n**1.1. “Contributor”**  \n means each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n**1.2. “Contributor Version”**  \n means the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n**1.3. “Contribution”**  \n means Covered Software of a particular Contributor.\n\n**1.4. “Covered Software”**  \n means Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n**1.5. “Incompatible With Secondary Licenses”**  \n means\n\n- **(a)** that the initial Contributor has attached the notice described\n  in Exhibit B to the Covered Software; or\n- **(b)** that the Covered Software was made available under the terms of\n  version 1.1 or earlier of the License, but not also under the\n  terms of a Secondary License.\n\n**1.6. “Executable Form”**  \n means any form of the work other than Source Code Form.\n\n**1.7. “Larger Work”**  \n means a work that combines Covered Software with other material, in\na separate file or files, that is not Covered Software.\n\n**1.8. “License”**  \n means this document.\n\n**1.9. “Licensable”**  \n means having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n**1.10. “Modifications”**  \n means any of the following:\n\n- **(a)** any file in Source Code Form that results from an addition to,\n  deletion from, or modification of the contents of Covered\n  Software; or\n- **(b)** any new file in Source Code Form that contains any Covered\n  Software.\n\n**1.11. “Patent Claims” of a Contributor**  \n means any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n**1.12. “Secondary License”**  \n means either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n**1.13. “Source Code Form”**  \n means the form of the work preferred for making modifications.\n\n**1.14. “You” (or “Your”)**  \n means an individual or a legal entity exercising rights under this\nLicense. For legal entities, “You” includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, “control” means **(a)** the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or **(b)** ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n### 2. License Grants and Conditions\n\n#### 2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n- **(a)** under intellectual property rights (other than patent or trademark)\n  Licensable by such Contributor to use, reproduce, make available,\n  modify, display, perform, distribute, and otherwise exploit its\n  Contributions, either on an unmodified basis, with Modifications, or\n  as part of a Larger Work; and\n- **(b)** under Patent Claims of such Contributor to make, use, sell, offer\n  for sale, have made, import, and otherwise transfer either its\n  Contributions or its Contributor Version.\n\n#### 2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n#### 2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n- **(a)** for any code that a Contributor has removed from Covered Software;\n  or\n- **(b)** for infringements caused by: **(i)** Your and any other third party's\n  modifications of Covered Software, or **(ii)** the combination of its\n  Contributions with other software (except as part of its Contributor\n  Version); or\n- **(c)** under Patent Claims infringed by Covered Software in the absence of\n  its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n#### 2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n#### 2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n#### 2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n#### 2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n### 3. Responsibilities\n\n#### 3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n#### 3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n- **(a)** such Covered Software must also be made available in Source Code\n  Form, as described in Section 3.1, and You must inform recipients of\n  the Executable Form how they can obtain a copy of such Source Code\n  Form by reasonable means in a timely manner, at a charge no more\n  than the cost of distribution to the recipient; and\n\n- **(b)** You may distribute such Executable Form under the terms of this\n  License, or sublicense it under different terms, provided that the\n  license for the Executable Form does not attempt to limit or alter\n  the recipients' rights in the Source Code Form under this License.\n\n#### 3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n#### 3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n#### 3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n### 4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: **(a)** comply with\nthe terms of this License to the maximum extent possible; and **(b)**\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n### 5. Termination\n\n**5.1.** The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated **(a)** provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and **(b)** on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n**5.2.** If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n### 6. Disclaimer of Warranty\n\n> Covered Software is provided under this License on an “as is”\n> basis, without warranty of any kind, either expressed, implied, or\n> statutory, including, without limitation, warranties that the\n> Covered Software is free of defects, merchantable, fit for a\n> particular purpose or non-infringing. The entire risk as to the\n> quality and performance of the Covered Software is with You.\n> Should any Covered Software prove defective in any respect, You\n> (not any Contributor) assume the cost of any necessary servicing,\n> repair, or correction. This disclaimer of warranty constitutes an\n> essential part of this License. No use of any Covered Software is\n> authorized under this License except under this disclaimer.\n\n### 7. Limitation of Liability\n\n> Under no circumstances and under no legal theory, whether tort\n> (including negligence), contract, or otherwise, shall any\n> Contributor, or anyone who distributes Covered Software as\n> permitted above, be liable to You for any direct, indirect,\n> special, incidental, or consequential damages of any character\n> including, without limitation, damages for lost profits, loss of\n> goodwill, work stoppage, computer failure or malfunction, or any\n> and all other commercial damages or losses, even if such party\n> shall have been informed of the possibility of such damages. This\n> limitation of liability shall not apply to liability for death or\n> personal injury resulting from such party's negligence to the\n> extent applicable law prohibits such limitation. Some\n> jurisdictions do not allow the exclusion or limitation of\n> incidental or consequential damages, so this exclusion and\n> limitation may not apply to You.\n\n### 8. Litigation\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n### 9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n### 10. Versions of the License\n\n#### 10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n#### 10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n#### 10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\n## Exhibit A - Source Code Form License Notice\n\n    This Source Code Form is subject to the terms of the Mozilla Public\n    License, v. 2.0. If a copy of the MPL was not distributed with this\n    file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\n## Exhibit B - “Incompatible With Secondary Licenses” Notice\n\n    This Source Code Form is \"Incompatible With Secondary Licenses\", as\n    defined by the Mozilla Public License, v. 2.0.\n","_id":"flag@4.0.0-4","dist":{"shasum":"cabeb387c88d1eee994c8da818a30a8c0ea79da1","tarball":"https://registry.npmjs.org/flag/-/flag-4.0.0-4.tgz","integrity":"sha512-+XPwaNu2SsU8wovkjWEeKJ1CYH3wWiKA4T6kN+hqEvVyAttX4jbswd9xzPEJZ64Kj1NTAF0LNHd0xCrbjVbexA==","fileCount":22,"unpackedSize":45739,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJczLpsCRA9TVsSAnZWagAA77MQAKRvBmfX969cor33TuTn\nrmVCITwjynY8Yy1NUzAvn5sWdFJ22FxiTNw7GnvASBJ+IeOnVHkrY7F0ye00\nSnBztPibdoJPW5B+j4C5SJYvPfexZiTeapr0Hnr3f3Jej6r4Od+OwCVE02WI\nqwflD50Z/FuZZUR7VEgJmpBETYZHuXKpbKNZN4aqmWL2AFFYD3ph7yv3eG5V\nN76xm+nLFsTPZwE/M8nQoeF50pD4M6Qu5rWUzOgS8+LEQrk5DT/LROT8i45A\n3diX3Fupyary0JTldenWmnXMDib/Ag5lelbBYqmhjhb7a/XOH+tyj2lvb6au\nNBsczfrWrp82Y6yMDqmoYFbyqlE+nmjMajc4woCx1kmOtn9sihUZLEJRGoXu\n9z7z3ODwgoH0wpFD6oJ2Ao4P7jRv3VHkTIfrjiLpuk+Uj/K3GawzncbMU1Hj\nflAe6hhlOy4ke1Dvmv3FNW9WefjsPwSMlW51A6X3YmPu4swcQzfPX9um4T0D\nIq9sBMo8guYk9uQ9w7WN64hiDKsjt42J2IFkTERr1F2J34RuL8FWwitlJjK5\noqRbdsnD6do+uiTEpfhBNuzdDFb8ecJ+onTDI7UdRp+lumSMbBuj8zRa66tQ\nlR41RJ6IEP2td4+8CuYaflXwUME8qHwOQb7NdzsYmMB67952C6B7XYxAAojH\nVf9w\r\n=YtBe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHpzW25oy9+/q1v8rF+rogEwyZoWbmi7cy9SjmKb77OeAiATX6EtZdFt7/rkKzbmUAl6K2aFJKWfT4JUnJbi3i+d+g=="}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag_4.0.0-4_1556920939317_0.6402544179756613"},"_hasShrinkwrap":false},"4.0.0":{"name":"flag","version":"4.0.0","description":"Feature flagging made easy for React and Redux","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"https://github.com/garbles/flag"},"author":{"name":"Gabe Scholz"},"license":"MPL-2.0","devDependencies":{"@types/enzyme":"^3.9.1","@types/jest":"^24.0.11","@types/lodash":"^4.14.123","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.12.1","jest":"^24.7.1","np":"^4.0.2","react":"^16.8.6","react-dom":"^16.8.6","ts-jest":"^24.0.1","typescript":"3.3.4000"},"dependencies":{"deep-computed":"^0.1.2","lodash":"^4.17.11","useful-types":"^0.2.1"},"peerDependencies":{"react":"^16.8.6","react-dom":"^16.8.6"},"optionalDependencies":{"@types/react":"^16.8.12","@types/react-dom":"^16.8.3","@types/react-redux":"^7.0.7","@types/redux":"^3.6.0","react-redux":"^7.0.2","redux":"^4.0.1"},"scripts":{"clean":"rm -rf build","build":"tsc","prepublish":"yarn clean && yarn build","test":"jest","pub":"np"},"licenseText":"Copyright 2019 (c) Gabe Scholz\n\n# Mozilla Public License Version 2.0\n\n### 1. Definitions\n\n**1.1. “Contributor”**  \n means each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n**1.2. “Contributor Version”**  \n means the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n**1.3. “Contribution”**  \n means Covered Software of a particular Contributor.\n\n**1.4. “Covered Software”**  \n means Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n**1.5. “Incompatible With Secondary Licenses”**  \n means\n\n- **(a)** that the initial Contributor has attached the notice described\n  in Exhibit B to the Covered Software; or\n- **(b)** that the Covered Software was made available under the terms of\n  version 1.1 or earlier of the License, but not also under the\n  terms of a Secondary License.\n\n**1.6. “Executable Form”**  \n means any form of the work other than Source Code Form.\n\n**1.7. “Larger Work”**  \n means a work that combines Covered Software with other material, in\na separate file or files, that is not Covered Software.\n\n**1.8. “License”**  \n means this document.\n\n**1.9. “Licensable”**  \n means having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n**1.10. “Modifications”**  \n means any of the following:\n\n- **(a)** any file in Source Code Form that results from an addition to,\n  deletion from, or modification of the contents of Covered\n  Software; or\n- **(b)** any new file in Source Code Form that contains any Covered\n  Software.\n\n**1.11. “Patent Claims” of a Contributor**  \n means any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n**1.12. “Secondary License”**  \n means either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n**1.13. “Source Code Form”**  \n means the form of the work preferred for making modifications.\n\n**1.14. “You” (or “Your”)**  \n means an individual or a legal entity exercising rights under this\nLicense. For legal entities, “You” includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, “control” means **(a)** the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or **(b)** ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n### 2. License Grants and Conditions\n\n#### 2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n- **(a)** under intellectual property rights (other than patent or trademark)\n  Licensable by such Contributor to use, reproduce, make available,\n  modify, display, perform, distribute, and otherwise exploit its\n  Contributions, either on an unmodified basis, with Modifications, or\n  as part of a Larger Work; and\n- **(b)** under Patent Claims of such Contributor to make, use, sell, offer\n  for sale, have made, import, and otherwise transfer either its\n  Contributions or its Contributor Version.\n\n#### 2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n#### 2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n- **(a)** for any code that a Contributor has removed from Covered Software;\n  or\n- **(b)** for infringements caused by: **(i)** Your and any other third party's\n  modifications of Covered Software, or **(ii)** the combination of its\n  Contributions with other software (except as part of its Contributor\n  Version); or\n- **(c)** under Patent Claims infringed by Covered Software in the absence of\n  its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n#### 2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n#### 2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n#### 2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n#### 2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n### 3. Responsibilities\n\n#### 3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n#### 3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n- **(a)** such Covered Software must also be made available in Source Code\n  Form, as described in Section 3.1, and You must inform recipients of\n  the Executable Form how they can obtain a copy of such Source Code\n  Form by reasonable means in a timely manner, at a charge no more\n  than the cost of distribution to the recipient; and\n\n- **(b)** You may distribute such Executable Form under the terms of this\n  License, or sublicense it under different terms, provided that the\n  license for the Executable Form does not attempt to limit or alter\n  the recipients' rights in the Source Code Form under this License.\n\n#### 3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n#### 3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n#### 3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n### 4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: **(a)** comply with\nthe terms of this License to the maximum extent possible; and **(b)**\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n### 5. Termination\n\n**5.1.** The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated **(a)** provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and **(b)** on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n**5.2.** If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n### 6. Disclaimer of Warranty\n\n> Covered Software is provided under this License on an “as is”\n> basis, without warranty of any kind, either expressed, implied, or\n> statutory, including, without limitation, warranties that the\n> Covered Software is free of defects, merchantable, fit for a\n> particular purpose or non-infringing. The entire risk as to the\n> quality and performance of the Covered Software is with You.\n> Should any Covered Software prove defective in any respect, You\n> (not any Contributor) assume the cost of any necessary servicing,\n> repair, or correction. This disclaimer of warranty constitutes an\n> essential part of this License. No use of any Covered Software is\n> authorized under this License except under this disclaimer.\n\n### 7. Limitation of Liability\n\n> Under no circumstances and under no legal theory, whether tort\n> (including negligence), contract, or otherwise, shall any\n> Contributor, or anyone who distributes Covered Software as\n> permitted above, be liable to You for any direct, indirect,\n> special, incidental, or consequential damages of any character\n> including, without limitation, damages for lost profits, loss of\n> goodwill, work stoppage, computer failure or malfunction, or any\n> and all other commercial damages or losses, even if such party\n> shall have been informed of the possibility of such damages. This\n> limitation of liability shall not apply to liability for death or\n> personal injury resulting from such party's negligence to the\n> extent applicable law prohibits such limitation. Some\n> jurisdictions do not allow the exclusion or limitation of\n> incidental or consequential damages, so this exclusion and\n> limitation may not apply to You.\n\n### 8. Litigation\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n### 9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n### 10. Versions of the License\n\n#### 10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n#### 10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n#### 10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\n## Exhibit A - Source Code Form License Notice\n\n    This Source Code Form is subject to the terms of the Mozilla Public\n    License, v. 2.0. If a copy of the MPL was not distributed with this\n    file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\n## Exhibit B - “Incompatible With Secondary Licenses” Notice\n\n    This Source Code Form is \"Incompatible With Secondary Licenses\", as\n    defined by the Mozilla Public License, v. 2.0.\n","_id":"flag@4.0.0","dist":{"shasum":"497b906bb1eb44802d8a7a939f2422892ca059d2","tarball":"https://registry.npmjs.org/flag/-/flag-4.0.0.tgz","integrity":"sha512-LuQYIPuTrWfXZWRnHc4YQoxriI7+fnGhh+lYUsNOuYmrxsBlC8QJH0jVCWTdTwYB1OA75dWlybBAVV4nq5z7nA==","fileCount":22,"unpackedSize":44307,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5eQ+CRA9TVsSAnZWagAAFhMP/i87MT5iV8j1C6PKXjLF\nuqfs9sjUzAgBBrz85KI9iBYDPdop/SlmLoi+9PywjuvueT7044vGEC2py/IO\nBOmU7InaKiNdVyfvrPI46ykVioez8QYLa8AcgCX+vBcXzAhojcXSXy+RLlUl\nOYjpUh6Mliiu4zqGuS0QEmNzvhoTwBCYi8E8hMNzFabT7vHb+4tHww9MpmO9\n8j8jw0gE2J8rv4df8GuLWCt8I503+emy3pqOXIp94y+QF8TociKWj2MOI5yH\naZK8JGWEE31bJqioIPZRtPBjFk1sdSKWc2EpTnDoHgWCFiOMfQHYZtQrtVZP\nfzcSG8DAAKryf3+X5A093k6K4v/E2TjnzlXJM2sI43jTJNe7FSysTxqAmaA+\nYmNiWIo8lTFYxWnijz2fkOM+7yBEy0jH8xurocOcmZMn/dQW2aoqg0YkWefz\nV5hXMEPLiFXXtg8AZ+fOzrfOl1Ng3Xe655kXZQhru1bAx1WclshrfJrOb4Mm\nLc1Cq1xfck1smvPG+JW+CJElgbbysKf1hShg5zmTfvlgt7yS666U8ai5VRMU\nu/gbJCe7Yft4BJ9VuIdYt0JjtcX86lhhzLXH2OZ1IOIDREYqEURAtbn0hONX\naPPpnZqbMFlhOx39H5raz/IXkNtMJ3jwtLvy2jhn6M4XQBIfDkrL7XRiItPg\neDCZ\r\n=snUX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiYlyx57yoNXWvs7bUnVRJCdUXbf77U75IQWQyjWEK5wIgWaWC/UeQzijInTpbyBwmqeM7YttgnGUce7AXRqrIX4U="}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag_4.0.0_1558570045886_0.7139435578492677"},"_hasShrinkwrap":false},"4.1.0-0":{"name":"flag","version":"4.1.0-0","description":"Feature flagging made easy for React and Redux","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"https://github.com/garbles/flag"},"author":{"name":"Gabe Scholz"},"license":"MPL-2.0","devDependencies":{"@types/enzyme":"^3.9.1","@types/jest":"^24.0.11","@types/lodash":"^4.14.123","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.12.1","jest":"^24.7.1","np":"^4.0.2","react":"^16.8.6","react-dom":"^16.8.6","ts-jest":"^24.0.1","typescript":"3.3.4000"},"dependencies":{"deep-computed":"^0.2.0","lodash":"^4.17.11","useful-types":"^0.2.1"},"peerDependencies":{"react":"^16.8.6","react-dom":"^16.8.6"},"optionalDependencies":{"@types/react":"^16.8.12","@types/react-dom":"^16.8.3","@types/react-redux":"^7.0.7","@types/redux":"^3.6.0","react-redux":"^7.0.2","redux":"^4.0.1"},"scripts":{"clean":"rm -rf build","build":"tsc","prepublish":"yarn clean && yarn build","test":"jest","pub":"np"},"readmeFilename":"README.md","readme":"# Flag\n\n_Feature flagging made easy for React and Redux_\n\n```\nyarn add flag\n```\n\n## Motivation\n\nFeature flagging is necessary for large client-side applications. They improve development speed\nand allow teams to test new features before they are stable. In order to **WANT** to use feature\nflags in an application, they should be **VERY** easy to add and remove. That means minimal\nboiler plate and no need to pass boolean props down through component hierarchy. Such a thing could be\ndone with global variables; however, they live outside of the React/Redux lifecycle, making them\nmore difficult to control. Instead, this library injects and then accesses feature flags directly\nfrom the React context without getting in your way.\n\nFlag allows you to declare flags as either plain values or as functions. If a flag is a function then it is referred to as a computed flag. The function accepts one argument which is the flags object itself. You do not have to use computed flags, but they can be very convenient. For example,\n\n```ts\nconst flags = {\n  // properties can be nested objects\n  features: {\n    // they can be boolean\n    useMyCoolNewThing: true\n  },\n  config: {\n    // they can be strings\n    apiUrl: \"www.example.com/api\"\n  },\n  // they can be numbers\n  cool: 1,\n  dude: 5,\n  // they can be computed\n  coolAndDude: flags => flags.cool + flags.dude,\n  // they can be computed from other computed properties.\n  // other computed properties are resolved for you, so that you do not\n  // need to call it as a function.\n  largeCoolAndDude: flags => flags.coolAndDude > 10\n};\n```\n\n## Getting Started\n\nThis library has strong TypeScript support as of v4. In order to get that support, you must\ninitialize the `flag` library before using it.\n\n### createFlags\n\nCreates React bindings for flags. **You should only initialize one instance of this API**. Does\nnot take any value arguments, but takes one type argument `T` which is the shape of your resolved\nflags.\n\n```ts\n// flags.ts\n\nimport createFlags from \"flag\";\n\nexport type MyFlags = {\n  features: {\n    useMyCoolNewThing: boolean;\n  };\n  config: {\n    apiUrl: string;\n  };\n  cool: number;\n  dude: number;\n  coolAndDude: number;\n  largeCoolAndDude: boolean;\n};\n\nconst { FlagsProvider, Flag, useFlag, useFlags } = createFlags<MyFlags>();\n\nexport { FlagsProvider, Flag, useFlag, useFlags };\n```\n\n### createReduxBindings\n\nYou can also add support for Redux by importing `createReduxBindings` from `flag/redux`.\n\n| Args       | Type               | Required | Description                       |\n| ---------- | ------------------ | -------- | --------------------------------- |\n| `provider` | `FlagsProvider<T>` | `true`   | Provider created by `createFlags` |\n\n```ts\n// flags.ts\n\n// ... the above\n\nimport createReduxBindings from \"flag/redux\";\n\nconst {\n  setFlagsAction,\n  getFlagsSelector,\n  createFlagsReducer,\n  ConnectedFlagsProvider\n} = createReduxBindings(FlagsProvider);\n\nexport {\n  setFlagsAction,\n  getFlagsSelector,\n  createFlagsReducer,\n  ConnectedFlagsProvider\n};\n```\n\n## React API\n\nFor brevity, the type `T` in the section below refers to the shape of your resolved feature flags.\n\n### Computable\n\nGeneric type used to describe unresolved flags. Very useful when including functions are part of your flag definitions because function arguments can be inferred.\n\n```tsx\nimport { Computable } from \"flag\";\n\ntype MyFlags = {\n  a: boolean;\n  b: boolean;\n  c: boolean;\n};\n\nconst flags: Computable<MyFlags> = {\n  a: true,\n  b: false,\n  // 👇 `flags` type checks!\n  c: flags => flags.a && flags.b\n};\n```\n\n### FlagsProvider\n\nReturned as part of `createFlags()`. React component that makes flags available to children through the Context API.\n\n| Props      | Type            | Required | Description            |\n| ---------- | --------------- | -------- | ---------------------- |\n| `flags`    | `Computable<T>` | `true`   | All pre-computed flags |\n| `children` | `ReactNode`     | `true`   | React children         |\n\n```tsx\n// index.tsx\n\nimport { MyApplication } from \"./app\";\nimport { FlagsProvider, Flag } from \"./flags\";\n\nconst instance = (\n  <FlagsProvider flags={flags}>\n    <MyApplication />\n  </FlagsProvider>\n);\n\nReact.render(instance, document.querySelector(\"#app\"));\n```\n\n### Flag\n\nReturned as part of `createFlags()`. Renders a some UI based on whether a flag is truthy or falsy. It's a glorified if statement 😬. Must be used in side of `FlagsProvider`.\n\n| Props               | Type                          | Required | Description                         |\n| ------------------- | ----------------------------- | -------- | ----------------------------------- |\n| `name`              | `string[]`                    | `true`   | Must be a valid key path of `T`     |\n| `children`          | `ReactNode`                   | `false`  | React children                      |\n| `render`            | `(flags: T) => ReactNode`     | `false`  | Function that returns a `ReactNode` |\n| `fallbackRender`    | `(flags: T) => ReactNode`     | `false`  | Function that returns a `ReactNode` |\n| `component`         | `ComponentType<{ flags: T }>` | `false`  | React Component with `T` as props   |\n| `fallbackComponent` | `ComponentType<{ flags: T }>` | `false`  | React Component with `T` as props   |\n\nOrder of deciding which of these nodes to renders is as follows:\n\n- If the flag is `truthy`:\n  - render `children` if defined\n  - call `render` with `T` if defined _or_\n  - call `component` with `{flags: T}` if defined _else_\n  - return `null`\n- If the flag is `falsy`:\n  - call `fallbackRender` with `T` if defined _or_\n  - call `fallbackComponent` with `{ flags: T }` if defined _else_\n  - return `null`\n\n```tsx\n<Flag\n  name={[\"features\", \"useMyCoolNewThing\"]}\n  render={() => <div>Rendered on truthy</div>}\n  fallbackRender={() => <div>Rendered on falsy</div>}\n/>\n```\n\n### useFlags\n\nReturned as part of `createFlags()`. A React hook that returns all of the flags. Must be used in side of `FlagsProvider`.\n\n```tsx\n// my-component.tsx\n\nimport { useFlags } from \"./flags\";\n\nconst MyComponent = () => {\n  const flags = useFlags();\n\n  return <div>The API url is \"{flags.config.apiUrl}\"</div>;\n};\n```\n\n### useFlag\n\nReturned as part of `createFlags()`. A React hook to return a single flag. Must be used in side of `FlagsProvider`.\n\n| Args      | Type       | Required | Description                     |\n| --------- | ---------- | -------- | ------------------------------- |\n| `keyPath` | `string[]` | `true`   | Must be a valid key path of `T` |\n\n```tsx\n// my-component.tsx\n\nimport { useFlags } from \"./flags\";\n\nconst MyComponent = () => {\n  const apiUrl = useFlag([\"config\", \"apiUrl\"]);\n\n  return <div>The API url is \"{apiUrl}\"</div>;\n};\n```\n\n## Redux API\n\n### createFlagsReducer\n\nReturned as part of `createReduxBindings(...)`. Creates a reducer to be used in your Redux stores.\n\n| Args    | Type | Required | Description                     |\n| ------- | ---- | -------- | ------------------------------- |\n| `flags` | `T`  | `true`   | The initial value of your flags |\n\n```tsx\n// reducer.ts\n\nimport { combineReducers } from \"redux\";\nimport { Computable } from \"flag\";\nimport { createFlagsReducer, MyFlags } from \"./flags\";\nimport { otherReducer } from \"./other-reducer\";\n\nconst flags: Computable<MyFlags> = {\n  // ...\n};\n\nexport default combineReducers({\n  // 👇 must use the \"flags\" key of your state\n  flags: createFlagsReducer(flags),\n  other: otherReducer\n});\n```\n\n### getFlagsSelector\n\nA selector to retrieve _computed_ flags from Redux state. It is not enough to say `state.flags` because `createFlagsReducer` does not eagerly evaluate computable flags.\n(Though I suppose if you don't use any computable flags, then you don't necessarily need this 🤷‍♂️.)\n\n```tsx\n// reducer.ts\n\nimport { getFlagsSelector, MyFlags } from \"./flags\";\n\ntype State = {\n  flags: MyFlags;\n  // ...\n};\n\n// ...\n\nexport const getFlags = (state: State) => getFlagsSelector(state);\n```\n\n### ConnectedFlagsProvider\n\nReturned as part of `createReduxBindings(...)`. Wraps `FlagsProvider`, fetching the flags from Redux state.\n\n```tsx\nimport { Provider } from \"redux\";\nimport { MyApplication } from \"./app\";\nimport { ConnectedFlagsProvider } from \"./flags\";\nimport { store } from \"./store\";\n\nconst instance = (\n  <Provider store={store}>\n    <ConnectedFlagsProvider>\n      <MyApplication />\n    </ConnectedFlagsProvider>\n  </Provider>\n);\n\nReact.render(instance, document.querySelector(\"#app\"));\n```\n\n### setFlagsAction\n\nReturned as part of `createReduxBindings(...)`. A dispatchable action that sets flags. Merges a partial value of pre-computed flags with existing pre-computed flags.\n\n| Args    | Type            | Required | Description                |\n| ------- | --------------- | -------- | -------------------------- |\n| `flags` | `Computable<T>` | `true`   | Partial pre-computed flags |\n\n```tsx\nimport { Thunk } from \"redux-thunk\";\nimport { setFlagsAction } from \"./flags\";\n\nexport const someThunk: Thunk<any> = ({ dispatch }) => async () => {\n  const user = await fetchUser();\n\n  dispatch(setFlagsAction(user.flags));\n  // ...\n};\n```\n\n## License\n\nMPL-2.0\n","licenseText":"Copyright 2019 (c) Gabe Scholz\n\n# Mozilla Public License Version 2.0\n\n### 1. Definitions\n\n**1.1. “Contributor”**  \n means each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n**1.2. “Contributor Version”**  \n means the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n**1.3. “Contribution”**  \n means Covered Software of a particular Contributor.\n\n**1.4. “Covered Software”**  \n means Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n**1.5. “Incompatible With Secondary Licenses”**  \n means\n\n- **(a)** that the initial Contributor has attached the notice described\n  in Exhibit B to the Covered Software; or\n- **(b)** that the Covered Software was made available under the terms of\n  version 1.1 or earlier of the License, but not also under the\n  terms of a Secondary License.\n\n**1.6. “Executable Form”**  \n means any form of the work other than Source Code Form.\n\n**1.7. “Larger Work”**  \n means a work that combines Covered Software with other material, in\na separate file or files, that is not Covered Software.\n\n**1.8. “License”**  \n means this document.\n\n**1.9. “Licensable”**  \n means having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n**1.10. “Modifications”**  \n means any of the following:\n\n- **(a)** any file in Source Code Form that results from an addition to,\n  deletion from, or modification of the contents of Covered\n  Software; or\n- **(b)** any new file in Source Code Form that contains any Covered\n  Software.\n\n**1.11. “Patent Claims” of a Contributor**  \n means any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n**1.12. “Secondary License”**  \n means either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n**1.13. “Source Code Form”**  \n means the form of the work preferred for making modifications.\n\n**1.14. “You” (or “Your”)**  \n means an individual or a legal entity exercising rights under this\nLicense. For legal entities, “You” includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, “control” means **(a)** the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or **(b)** ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n### 2. License Grants and Conditions\n\n#### 2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n- **(a)** under intellectual property rights (other than patent or trademark)\n  Licensable by such Contributor to use, reproduce, make available,\n  modify, display, perform, distribute, and otherwise exploit its\n  Contributions, either on an unmodified basis, with Modifications, or\n  as part of a Larger Work; and\n- **(b)** under Patent Claims of such Contributor to make, use, sell, offer\n  for sale, have made, import, and otherwise transfer either its\n  Contributions or its Contributor Version.\n\n#### 2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n#### 2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n- **(a)** for any code that a Contributor has removed from Covered Software;\n  or\n- **(b)** for infringements caused by: **(i)** Your and any other third party's\n  modifications of Covered Software, or **(ii)** the combination of its\n  Contributions with other software (except as part of its Contributor\n  Version); or\n- **(c)** under Patent Claims infringed by Covered Software in the absence of\n  its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n#### 2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n#### 2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n#### 2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n#### 2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n### 3. Responsibilities\n\n#### 3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n#### 3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n- **(a)** such Covered Software must also be made available in Source Code\n  Form, as described in Section 3.1, and You must inform recipients of\n  the Executable Form how they can obtain a copy of such Source Code\n  Form by reasonable means in a timely manner, at a charge no more\n  than the cost of distribution to the recipient; and\n\n- **(b)** You may distribute such Executable Form under the terms of this\n  License, or sublicense it under different terms, provided that the\n  license for the Executable Form does not attempt to limit or alter\n  the recipients' rights in the Source Code Form under this License.\n\n#### 3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n#### 3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n#### 3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n### 4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: **(a)** comply with\nthe terms of this License to the maximum extent possible; and **(b)**\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n### 5. Termination\n\n**5.1.** The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated **(a)** provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and **(b)** on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n**5.2.** If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n### 6. Disclaimer of Warranty\n\n> Covered Software is provided under this License on an “as is”\n> basis, without warranty of any kind, either expressed, implied, or\n> statutory, including, without limitation, warranties that the\n> Covered Software is free of defects, merchantable, fit for a\n> particular purpose or non-infringing. The entire risk as to the\n> quality and performance of the Covered Software is with You.\n> Should any Covered Software prove defective in any respect, You\n> (not any Contributor) assume the cost of any necessary servicing,\n> repair, or correction. This disclaimer of warranty constitutes an\n> essential part of this License. No use of any Covered Software is\n> authorized under this License except under this disclaimer.\n\n### 7. Limitation of Liability\n\n> Under no circumstances and under no legal theory, whether tort\n> (including negligence), contract, or otherwise, shall any\n> Contributor, or anyone who distributes Covered Software as\n> permitted above, be liable to You for any direct, indirect,\n> special, incidental, or consequential damages of any character\n> including, without limitation, damages for lost profits, loss of\n> goodwill, work stoppage, computer failure or malfunction, or any\n> and all other commercial damages or losses, even if such party\n> shall have been informed of the possibility of such damages. This\n> limitation of liability shall not apply to liability for death or\n> personal injury resulting from such party's negligence to the\n> extent applicable law prohibits such limitation. Some\n> jurisdictions do not allow the exclusion or limitation of\n> incidental or consequential damages, so this exclusion and\n> limitation may not apply to You.\n\n### 8. Litigation\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n### 9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n### 10. Versions of the License\n\n#### 10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n#### 10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n#### 10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\n## Exhibit A - Source Code Form License Notice\n\n    This Source Code Form is subject to the terms of the Mozilla Public\n    License, v. 2.0. If a copy of the MPL was not distributed with this\n    file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\n## Exhibit B - “Incompatible With Secondary Licenses” Notice\n\n    This Source Code Form is \"Incompatible With Secondary Licenses\", as\n    defined by the Mozilla Public License, v. 2.0.\n","_id":"flag@4.1.0-0","dist":{"shasum":"f05c4892c6c0de2651bfe6302af275bfef80c6ae","tarball":"https://registry.npmjs.org/flag/-/flag-4.1.0-0.tgz","integrity":"sha512-85yLeFFw7WkEjpb/6sf1awtc6PWveMcg3uoKjlyXPl+ZptC7sSyllAED2DJmhuhHxGYqKw6PZjHXraWa3LHPbw==","fileCount":22,"unpackedSize":47299,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7fi7CRA9TVsSAnZWagAAJ40QAJpOAC28Wrpq1VKnHoN5\npP1GxqaG0dXHcPCD0C8wLG+GmC8rGwJVMcjQAJCBM3qQNmADdkCNo2ia8xlW\nGx445P2aZPsJ+UyJTid7fsCdfBxBfbz2aDi28FuCK9Ytj8WzPHenguspWz9a\nL3Ecy+NX4y/r65S6rodgZJrOuf0gurGAsq/NprAP/ZnzRs4OwUFAQ99JMn+n\n6skO+SL6aEW6+YPzjNML+5VWxWQSg/kNoNj4ZIEj/DLOrejB/JzPZZcVMsJY\n3N0BpDmme/DYC34CiX4oRX8n+0KqOjcI41aAyjGDqzxgpxseww69KwqKTwIr\nDXOPZQPTzwn5BbSKzkw+Byx3KwnRS24u6USQUaiSxDky8XAb2OVADaxAHXtm\nLCy3b9CGmqluHr7NRwhzu6WP1w2puYKf6Je5ecy+0FHNBuhdCQxmI8gyQx1q\nImvsmxQQ5y7M0wBnw/uT53tFq5UkYXLej1gP9KgaVR0MDrXvNRZk6hQLcb5n\nyuzmqDs0SZPF2T/TKHEFkUXUybiG4i7I+HmTZ5MlOCMDk5ZcHmURHiWvJlWx\nFgWcea+8zMxz77n8uZi6pa5izSRWo4QlMX9kuR2z3uz+7QLxV4As6geJsWZA\nZQ3t0LXTNK8UPbCxDRYtQWDrX4/nzy+2N5eVhVawcg0wOzJCO1VXcIIp8qDM\nj4my\r\n=+qJy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAwz6qn5xXD54eylSaLT4FVTkpDGaKLHAECxDSqvktuIAiAIa9izPPWjPEBYpSIG7XVTMrF+GyZ6+b6V9Q3nfwJdug=="}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag_4.1.0-0_1559099578461_0.25071092438594356"},"_hasShrinkwrap":false},"4.1.0":{"name":"flag","version":"4.1.0","description":"Feature flagging made easy for React and Redux","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"https://github.com/garbles/flag"},"author":{"name":"Gabe Scholz"},"license":"MPL-2.0","devDependencies":{"@types/enzyme":"^3.9.1","@types/jest":"^24.0.11","@types/lodash":"^4.14.123","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.12.1","jest":"^24.7.1","np":"^4.0.2","react":"^16.8.6","react-dom":"^16.8.6","ts-jest":"^24.0.1","typescript":"3.3.4000"},"dependencies":{"deep-computed":"^0.2.0","lodash":"^4.17.11","useful-types":"^0.2.1"},"peerDependencies":{"react":"^16.8.6","react-dom":"^16.8.6"},"optionalDependencies":{"@types/react":"^16.8.12","@types/react-dom":"^16.8.3","@types/react-redux":"^7.0.7","@types/redux":"^3.6.0","react-redux":"^7.0.2","redux":"^4.0.1"},"scripts":{"clean":"rm -rf build","build":"tsc","prepublish":"yarn clean && yarn build","test":"jest","pub":"np"},"licenseText":"Copyright 2019 (c) Gabe Scholz\n\n# Mozilla Public License Version 2.0\n\n### 1. Definitions\n\n**1.1. “Contributor”**  \n means each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n**1.2. “Contributor Version”**  \n means the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n**1.3. “Contribution”**  \n means Covered Software of a particular Contributor.\n\n**1.4. “Covered Software”**  \n means Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n**1.5. “Incompatible With Secondary Licenses”**  \n means\n\n- **(a)** that the initial Contributor has attached the notice described\n  in Exhibit B to the Covered Software; or\n- **(b)** that the Covered Software was made available under the terms of\n  version 1.1 or earlier of the License, but not also under the\n  terms of a Secondary License.\n\n**1.6. “Executable Form”**  \n means any form of the work other than Source Code Form.\n\n**1.7. “Larger Work”**  \n means a work that combines Covered Software with other material, in\na separate file or files, that is not Covered Software.\n\n**1.8. “License”**  \n means this document.\n\n**1.9. “Licensable”**  \n means having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n**1.10. “Modifications”**  \n means any of the following:\n\n- **(a)** any file in Source Code Form that results from an addition to,\n  deletion from, or modification of the contents of Covered\n  Software; or\n- **(b)** any new file in Source Code Form that contains any Covered\n  Software.\n\n**1.11. “Patent Claims” of a Contributor**  \n means any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n**1.12. “Secondary License”**  \n means either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n**1.13. “Source Code Form”**  \n means the form of the work preferred for making modifications.\n\n**1.14. “You” (or “Your”)**  \n means an individual or a legal entity exercising rights under this\nLicense. For legal entities, “You” includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, “control” means **(a)** the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or **(b)** ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n### 2. License Grants and Conditions\n\n#### 2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n- **(a)** under intellectual property rights (other than patent or trademark)\n  Licensable by such Contributor to use, reproduce, make available,\n  modify, display, perform, distribute, and otherwise exploit its\n  Contributions, either on an unmodified basis, with Modifications, or\n  as part of a Larger Work; and\n- **(b)** under Patent Claims of such Contributor to make, use, sell, offer\n  for sale, have made, import, and otherwise transfer either its\n  Contributions or its Contributor Version.\n\n#### 2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n#### 2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n- **(a)** for any code that a Contributor has removed from Covered Software;\n  or\n- **(b)** for infringements caused by: **(i)** Your and any other third party's\n  modifications of Covered Software, or **(ii)** the combination of its\n  Contributions with other software (except as part of its Contributor\n  Version); or\n- **(c)** under Patent Claims infringed by Covered Software in the absence of\n  its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n#### 2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n#### 2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n#### 2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n#### 2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n### 3. Responsibilities\n\n#### 3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n#### 3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n- **(a)** such Covered Software must also be made available in Source Code\n  Form, as described in Section 3.1, and You must inform recipients of\n  the Executable Form how they can obtain a copy of such Source Code\n  Form by reasonable means in a timely manner, at a charge no more\n  than the cost of distribution to the recipient; and\n\n- **(b)** You may distribute such Executable Form under the terms of this\n  License, or sublicense it under different terms, provided that the\n  license for the Executable Form does not attempt to limit or alter\n  the recipients' rights in the Source Code Form under this License.\n\n#### 3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n#### 3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n#### 3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n### 4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: **(a)** comply with\nthe terms of this License to the maximum extent possible; and **(b)**\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n### 5. Termination\n\n**5.1.** The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated **(a)** provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and **(b)** on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n**5.2.** If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n### 6. Disclaimer of Warranty\n\n> Covered Software is provided under this License on an “as is”\n> basis, without warranty of any kind, either expressed, implied, or\n> statutory, including, without limitation, warranties that the\n> Covered Software is free of defects, merchantable, fit for a\n> particular purpose or non-infringing. The entire risk as to the\n> quality and performance of the Covered Software is with You.\n> Should any Covered Software prove defective in any respect, You\n> (not any Contributor) assume the cost of any necessary servicing,\n> repair, or correction. This disclaimer of warranty constitutes an\n> essential part of this License. No use of any Covered Software is\n> authorized under this License except under this disclaimer.\n\n### 7. Limitation of Liability\n\n> Under no circumstances and under no legal theory, whether tort\n> (including negligence), contract, or otherwise, shall any\n> Contributor, or anyone who distributes Covered Software as\n> permitted above, be liable to You for any direct, indirect,\n> special, incidental, or consequential damages of any character\n> including, without limitation, damages for lost profits, loss of\n> goodwill, work stoppage, computer failure or malfunction, or any\n> and all other commercial damages or losses, even if such party\n> shall have been informed of the possibility of such damages. This\n> limitation of liability shall not apply to liability for death or\n> personal injury resulting from such party's negligence to the\n> extent applicable law prohibits such limitation. Some\n> jurisdictions do not allow the exclusion or limitation of\n> incidental or consequential damages, so this exclusion and\n> limitation may not apply to You.\n\n### 8. Litigation\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n### 9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n### 10. Versions of the License\n\n#### 10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n#### 10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n#### 10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\n## Exhibit A - Source Code Form License Notice\n\n    This Source Code Form is subject to the terms of the Mozilla Public\n    License, v. 2.0. If a copy of the MPL was not distributed with this\n    file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\n## Exhibit B - “Incompatible With Secondary Licenses” Notice\n\n    This Source Code Form is \"Incompatible With Secondary Licenses\", as\n    defined by the Mozilla Public License, v. 2.0.\n","_id":"flag@4.1.0","dist":{"shasum":"b65e01b685737b2463219559234c833fd091fccc","tarball":"https://registry.npmjs.org/flag/-/flag-4.1.0.tgz","integrity":"sha512-jRTqvaq2c6Kuzt/sOAK5iWdn/h4Okv9MPhiO7756/z+7Y8cxrVpapRdY0PFzvEYI6lH58Kh1zOjRsQ1fzc07wg==","fileCount":22,"unpackedSize":47297,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8gvjCRA9TVsSAnZWagAA5CAP/36S1T2cbiE+9QkvHsR1\ntVGYCRupci3lAqxyM/KXSgD0JFQ9gEZLCRJFKkRCAT6Wh8ovk8lDex39Gv0h\nmgpciHZvTmcPikaBI8zls+AAfvi2ojOPHh0dKo2PgaAoHrBTwN4yYlG1ZVFh\n9KtHidJzdbY4zXSpb+S0TOf+7mEpSJnK0rSHtcahc9qvkrDUwIVCXPVon894\ne20s1SqUaCgaW6mUDSe/Jx79vdYkK2obn6bqUOuEWoXeE5MoQXbVu4fZ7daU\nA8necmPnwrhJucNPQRpUXqJxkql2YI/Zbs+QOjItc9Qv6c3x5pf9WrMgKd3X\nscKZqIMaDPI3Om4Qqn+Mxw3q3VmOYapEvOJ6foZr1ZLjROnLnU6M4XD+r3nA\nFN67Og1/pwCp8BlvSuRHRjtYy7TAM0TR1XKs93RGEcocVkYD6Xwsn/uXwx/G\nTf89C4rLc60a1ccfGYY7pwf2cgRi0kWda+iKEe/qp5FgCP29Ca55ULNV/KzH\npK+GHqCSw59Ig9vlehP2jdMxcO+o1+21pRfZT5zg48Ug150evl0LSQj1RW3q\nq9/syEeAS9I0PHK/jLuyJnNxwDN5n+s6I8/fms+Rge8UTgTNIhRbTlykgl4n\nb8P5Rf/mazLotDPME+q8uTQxaZX2yquUBE5lBK0y0fQbfzrFwAEdqWRUKUcs\nPuTV\r\n=mc56\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuzCfGMMgx3qZu03PSFaVwWL5tsjLNMpmgOhTO5TgEXAIhAODBUeKCHqP0bBJx6HLDT9WbCrUASs5xpaZE9biAs3UC"}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag_4.1.0_1559366627072_0.7957209772399467"},"_hasShrinkwrap":false},"4.2.0-0":{"name":"flag","version":"4.2.0-0","description":"Feature flagging made easy for React and Redux","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"https://github.com/garbles/flag"},"author":{"name":"Gabe Scholz"},"license":"MPL-2.0","devDependencies":{"@types/enzyme":"^3.9.1","@types/jest":"^24.0.11","@types/lodash":"^4.14.123","@types/react":"^16.8.12","@types/react-dom":"^16.8.3","@types/react-redux":"^7.0.7","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.12.1","jest":"^24.7.1","np":"^4.0.2","react":"^16.8.6","react-dom":"^16.8.6","react-redux":"^7.0.2","ts-jest":"^24.0.1","typescript":"3.3.4000"},"dependencies":{"deep-computed":"^0.2.0","lodash":"^4.17.11","useful-types":"^0.2.1"},"peerDependencies":{"@types/react":"^16.8.0","@types/react-dom":"^16.8.0","react":"^16.8.0","react-dom":"^16.8.0","react-redux":"^5.0.0 || ^6.0.0 || ^7.0.0","redux":"^4.0.0"},"scripts":{"clean":"rm -rf build","build":"tsc","prepublish":"yarn clean && yarn build","test":"jest","pub":"np"},"readmeFilename":"README.md","readme":"# Flag\n\n_Feature flagging made easy for React and Redux_\n\n```\nyarn add flag\n```\n\n## Motivation\n\nFeature flagging is necessary for large client-side applications. They improve development speed\nand allow teams to test new features before they are stable. In order to **WANT** to use feature\nflags in an application, they should be **VERY** easy to add and remove. That means minimal\nboiler plate and no need to pass boolean props down through component hierarchy. Such a thing could be\ndone with global variables; however, they live outside of the React/Redux lifecycle, making them\nmore difficult to control. Instead, this library injects and then accesses feature flags directly\nfrom the React context without getting in your way.\n\nFlag allows you to declare flags as either plain values or as functions. If a flag is a function then it is referred to as a computed flag. The function accepts one argument which is the flags object itself. You do not have to use computed flags, but they can be very convenient. For example,\n\n```ts\nconst flags = {\n  // properties can be nested objects\n  features: {\n    // they can be boolean\n    useMyCoolNewThing: true\n  },\n  config: {\n    // they can be strings\n    apiUrl: \"www.example.com/api\"\n  },\n  // they can be numbers\n  cool: 1,\n  dude: 5,\n  // they can be computed\n  coolAndDude: flags => flags.cool + flags.dude,\n  // they can be computed from other computed properties.\n  // other computed properties are resolved for you, so that you do not\n  // need to call it as a function.\n  largeCoolAndDude: flags => flags.coolAndDude > 10\n};\n```\n\n## Getting Started\n\nThis library has strong TypeScript support as of v4. In order to get that support, you must\ninitialize the `flag` library before using it.\n\n### createFlags\n\nCreates React bindings for flags. **You should only initialize one instance of this API**. Does\nnot take any value arguments, but takes one type argument `T` which is the shape of your resolved\nflags.\n\n```ts\n// flags.ts\n\nimport createFlags from \"flag\";\n\nexport type MyFlags = {\n  features: {\n    useMyCoolNewThing: boolean;\n  };\n  config: {\n    apiUrl: string;\n  };\n  cool: number;\n  dude: number;\n  coolAndDude: number;\n  largeCoolAndDude: boolean;\n};\n\nconst { FlagsProvider, Flag, useFlag, useFlags } = createFlags<MyFlags>();\n\nexport { FlagsProvider, Flag, useFlag, useFlags };\n```\n\n### createReduxBindings\n\nYou can also add support for Redux by importing `createReduxBindings` from `flag/redux`.\n\n| Args       | Type               | Required | Description                       |\n| ---------- | ------------------ | -------- | --------------------------------- |\n| `provider` | `FlagsProvider<T>` | `true`   | Provider created by `createFlags` |\n\n```ts\n// flags.ts\n\n// ... the above\n\nimport createReduxBindings from \"flag/redux\";\n\nconst {\n  setFlagsAction,\n  getFlagsSelector,\n  createFlagsReducer,\n  ConnectedFlagsProvider\n} = createReduxBindings(FlagsProvider);\n\nexport {\n  setFlagsAction,\n  getFlagsSelector,\n  createFlagsReducer,\n  ConnectedFlagsProvider\n};\n```\n\n## React API\n\nFor brevity, the type `T` in the section below refers to the shape of your resolved feature flags.\n\n### Computable\n\nGeneric type used to describe unresolved flags. Very useful when including functions are part of your flag definitions because function arguments can be inferred.\n\n```tsx\nimport { Computable } from \"flag\";\n\ntype MyFlags = {\n  a: boolean;\n  b: boolean;\n  c: boolean;\n};\n\nconst flags: Computable<MyFlags> = {\n  a: true,\n  b: false,\n  // 👇 `flags` type checks!\n  c: flags => flags.a && flags.b\n};\n```\n\n### FlagsProvider\n\nReturned as part of `createFlags()`. React component that makes flags available to children through the Context API.\n\n| Props      | Type            | Required | Description            |\n| ---------- | --------------- | -------- | ---------------------- |\n| `flags`    | `Computable<T>` | `true`   | All pre-computed flags |\n| `children` | `ReactNode`     | `true`   | React children         |\n\n```tsx\n// index.tsx\n\nimport { MyApplication } from \"./app\";\nimport { FlagsProvider, Flag } from \"./flags\";\n\nconst instance = (\n  <FlagsProvider flags={flags}>\n    <MyApplication />\n  </FlagsProvider>\n);\n\nReact.render(instance, document.querySelector(\"#app\"));\n```\n\n### Flag\n\nReturned as part of `createFlags()`. Renders a some UI based on whether a flag is truthy or falsy. It's a glorified if statement 😬. Must be used in side of `FlagsProvider`.\n\n| Props               | Type                          | Required | Description                         |\n| ------------------- | ----------------------------- | -------- | ----------------------------------- |\n| `name`              | `string[]`                    | `true`   | Must be a valid key path of `T`     |\n| `children`          | `ReactNode`                   | `false`  | React children                      |\n| `render`            | `(flags: T) => ReactNode`     | `false`  | Function that returns a `ReactNode` |\n| `fallbackRender`    | `(flags: T) => ReactNode`     | `false`  | Function that returns a `ReactNode` |\n| `component`         | `ComponentType<{ flags: T }>` | `false`  | React Component with `T` as props   |\n| `fallbackComponent` | `ComponentType<{ flags: T }>` | `false`  | React Component with `T` as props   |\n\nOrder of deciding which of these nodes to renders is as follows:\n\n- If the flag is `truthy`:\n  - render `children` if defined\n  - call `render` with `T` if defined _or_\n  - call `component` with `{flags: T}` if defined _else_\n  - return `null`\n- If the flag is `falsy`:\n  - call `fallbackRender` with `T` if defined _or_\n  - call `fallbackComponent` with `{ flags: T }` if defined _else_\n  - return `null`\n\n```tsx\n<Flag\n  name={[\"features\", \"useMyCoolNewThing\"]}\n  render={() => <div>Rendered on truthy</div>}\n  fallbackRender={() => <div>Rendered on falsy</div>}\n/>\n```\n\n### useFlags\n\nReturned as part of `createFlags()`. A React hook that returns all of the flags. Must be used in side of `FlagsProvider`.\n\n```tsx\n// my-component.tsx\n\nimport { useFlags } from \"./flags\";\n\nconst MyComponent = () => {\n  const flags = useFlags();\n\n  return <div>The API url is \"{flags.config.apiUrl}\"</div>;\n};\n```\n\n### useFlag\n\nReturned as part of `createFlags()`. A React hook to return a single flag. Must be used in side of `FlagsProvider`.\n\n| Args      | Type       | Required | Description                     |\n| --------- | ---------- | -------- | ------------------------------- |\n| `keyPath` | `string[]` | `true`   | Must be a valid key path of `T` |\n\n```tsx\n// my-component.tsx\n\nimport { useFlags } from \"./flags\";\n\nconst MyComponent = () => {\n  const apiUrl = useFlag([\"config\", \"apiUrl\"]);\n\n  return <div>The API url is \"{apiUrl}\"</div>;\n};\n```\n\n## Redux API\n\n### createFlagsReducer\n\nReturned as part of `createReduxBindings(...)`. Creates a reducer to be used in your Redux stores.\n\n| Args    | Type | Required | Description                     |\n| ------- | ---- | -------- | ------------------------------- |\n| `flags` | `T`  | `true`   | The initial value of your flags |\n\n```tsx\n// reducer.ts\n\nimport { combineReducers } from \"redux\";\nimport { Computable } from \"flag\";\nimport { createFlagsReducer, MyFlags } from \"./flags\";\nimport { otherReducer } from \"./other-reducer\";\n\nconst flags: Computable<MyFlags> = {\n  // ...\n};\n\nexport default combineReducers({\n  // 👇 must use the \"flags\" key of your state\n  flags: createFlagsReducer(flags),\n  other: otherReducer\n});\n```\n\n### getFlagsSelector\n\nA selector to retrieve _computed_ flags from Redux state. It is not enough to say `state.flags` because `createFlagsReducer` does not eagerly evaluate computable flags.\n(Though I suppose if you don't use any computable flags, then you don't necessarily need this 🤷‍♂️.)\n\n```tsx\n// reducer.ts\n\nimport { getFlagsSelector, MyFlags } from \"./flags\";\n\ntype State = {\n  flags: MyFlags;\n  // ...\n};\n\n// ...\n\nexport const getFlags = (state: State) => getFlagsSelector(state);\n```\n\n### ConnectedFlagsProvider\n\nReturned as part of `createReduxBindings(...)`. Wraps `FlagsProvider`, fetching the flags from Redux state.\n\n```tsx\nimport { Provider } from \"redux\";\nimport { MyApplication } from \"./app\";\nimport { ConnectedFlagsProvider } from \"./flags\";\nimport { store } from \"./store\";\n\nconst instance = (\n  <Provider store={store}>\n    <ConnectedFlagsProvider>\n      <MyApplication />\n    </ConnectedFlagsProvider>\n  </Provider>\n);\n\nReact.render(instance, document.querySelector(\"#app\"));\n```\n\n### setFlagsAction\n\nReturned as part of `createReduxBindings(...)`. A dispatchable action that sets flags. Merges a partial value of pre-computed flags with existing pre-computed flags.\n\n| Args    | Type            | Required | Description                |\n| ------- | --------------- | -------- | -------------------------- |\n| `flags` | `Computable<T>` | `true`   | Partial pre-computed flags |\n\n```tsx\nimport { Thunk } from \"redux-thunk\";\nimport { setFlagsAction } from \"./flags\";\n\nexport const someThunk: Thunk<any> = ({ dispatch }) => async () => {\n  const user = await fetchUser();\n\n  dispatch(setFlagsAction(user.flags));\n  // ...\n};\n```\n\n## License\n\nMPL-2.0\n","licenseText":"Copyright 2019 (c) Gabe Scholz\n\n# Mozilla Public License Version 2.0\n\n### 1. Definitions\n\n**1.1. “Contributor”**  \n means each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n**1.2. “Contributor Version”**  \n means the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n**1.3. “Contribution”**  \n means Covered Software of a particular Contributor.\n\n**1.4. “Covered Software”**  \n means Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n**1.5. “Incompatible With Secondary Licenses”**  \n means\n\n- **(a)** that the initial Contributor has attached the notice described\n  in Exhibit B to the Covered Software; or\n- **(b)** that the Covered Software was made available under the terms of\n  version 1.1 or earlier of the License, but not also under the\n  terms of a Secondary License.\n\n**1.6. “Executable Form”**  \n means any form of the work other than Source Code Form.\n\n**1.7. “Larger Work”**  \n means a work that combines Covered Software with other material, in\na separate file or files, that is not Covered Software.\n\n**1.8. “License”**  \n means this document.\n\n**1.9. “Licensable”**  \n means having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n**1.10. “Modifications”**  \n means any of the following:\n\n- **(a)** any file in Source Code Form that results from an addition to,\n  deletion from, or modification of the contents of Covered\n  Software; or\n- **(b)** any new file in Source Code Form that contains any Covered\n  Software.\n\n**1.11. “Patent Claims” of a Contributor**  \n means any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n**1.12. “Secondary License”**  \n means either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n**1.13. “Source Code Form”**  \n means the form of the work preferred for making modifications.\n\n**1.14. “You” (or “Your”)**  \n means an individual or a legal entity exercising rights under this\nLicense. For legal entities, “You” includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, “control” means **(a)** the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or **(b)** ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n### 2. License Grants and Conditions\n\n#### 2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n- **(a)** under intellectual property rights (other than patent or trademark)\n  Licensable by such Contributor to use, reproduce, make available,\n  modify, display, perform, distribute, and otherwise exploit its\n  Contributions, either on an unmodified basis, with Modifications, or\n  as part of a Larger Work; and\n- **(b)** under Patent Claims of such Contributor to make, use, sell, offer\n  for sale, have made, import, and otherwise transfer either its\n  Contributions or its Contributor Version.\n\n#### 2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n#### 2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n- **(a)** for any code that a Contributor has removed from Covered Software;\n  or\n- **(b)** for infringements caused by: **(i)** Your and any other third party's\n  modifications of Covered Software, or **(ii)** the combination of its\n  Contributions with other software (except as part of its Contributor\n  Version); or\n- **(c)** under Patent Claims infringed by Covered Software in the absence of\n  its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n#### 2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n#### 2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n#### 2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n#### 2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n### 3. Responsibilities\n\n#### 3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n#### 3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n- **(a)** such Covered Software must also be made available in Source Code\n  Form, as described in Section 3.1, and You must inform recipients of\n  the Executable Form how they can obtain a copy of such Source Code\n  Form by reasonable means in a timely manner, at a charge no more\n  than the cost of distribution to the recipient; and\n\n- **(b)** You may distribute such Executable Form under the terms of this\n  License, or sublicense it under different terms, provided that the\n  license for the Executable Form does not attempt to limit or alter\n  the recipients' rights in the Source Code Form under this License.\n\n#### 3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n#### 3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n#### 3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n### 4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: **(a)** comply with\nthe terms of this License to the maximum extent possible; and **(b)**\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n### 5. Termination\n\n**5.1.** The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated **(a)** provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and **(b)** on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n**5.2.** If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n### 6. Disclaimer of Warranty\n\n> Covered Software is provided under this License on an “as is”\n> basis, without warranty of any kind, either expressed, implied, or\n> statutory, including, without limitation, warranties that the\n> Covered Software is free of defects, merchantable, fit for a\n> particular purpose or non-infringing. The entire risk as to the\n> quality and performance of the Covered Software is with You.\n> Should any Covered Software prove defective in any respect, You\n> (not any Contributor) assume the cost of any necessary servicing,\n> repair, or correction. This disclaimer of warranty constitutes an\n> essential part of this License. No use of any Covered Software is\n> authorized under this License except under this disclaimer.\n\n### 7. Limitation of Liability\n\n> Under no circumstances and under no legal theory, whether tort\n> (including negligence), contract, or otherwise, shall any\n> Contributor, or anyone who distributes Covered Software as\n> permitted above, be liable to You for any direct, indirect,\n> special, incidental, or consequential damages of any character\n> including, without limitation, damages for lost profits, loss of\n> goodwill, work stoppage, computer failure or malfunction, or any\n> and all other commercial damages or losses, even if such party\n> shall have been informed of the possibility of such damages. This\n> limitation of liability shall not apply to liability for death or\n> personal injury resulting from such party's negligence to the\n> extent applicable law prohibits such limitation. Some\n> jurisdictions do not allow the exclusion or limitation of\n> incidental or consequential damages, so this exclusion and\n> limitation may not apply to You.\n\n### 8. Litigation\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n### 9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n### 10. Versions of the License\n\n#### 10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n#### 10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n#### 10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\n## Exhibit A - Source Code Form License Notice\n\n    This Source Code Form is subject to the terms of the Mozilla Public\n    License, v. 2.0. If a copy of the MPL was not distributed with this\n    file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\n## Exhibit B - “Incompatible With Secondary Licenses” Notice\n\n    This Source Code Form is \"Incompatible With Secondary Licenses\", as\n    defined by the Mozilla Public License, v. 2.0.\n","_id":"flag@4.2.0-0","dist":{"shasum":"a833481f7e063e0207448281ecadf2968beb70e8","tarball":"https://registry.npmjs.org/flag/-/flag-4.2.0-0.tgz","integrity":"sha512-b4axOyVqCOmCMry90uC2np1NXMfeJg+hRuCwhOEvVB9ZjilAGGnqdCtAFv+S/pRpr/U/MEnd0L1nP354/4Nglw==","fileCount":22,"unpackedSize":47190,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHoKDCRA9TVsSAnZWagAAvxQP/jGfoGWb0QH06lr3Er6C\nfc1L1KnzeL983nQdVSEhxUrWsFV5tudQp2M25xNFqTVTn7YPyNXv0Jf1rRLt\n8u9hOO3/MCG6rG3U9a+0tMCXFAgZrSvevUkNvApjynkW4Y7QCEUt8oCDopmg\nRx04YdhWOMhD3bSdPOzdYPpOfnaZflleEHx/eopSCNxX4BBdLkJD0wy+wCMC\nAz9u/bUkT3Zum7ntJYY49uY4+gAgPqYoTgTbknll2n5KE/XsXAUUeF5FQdpv\n82ymXZqnf6OF1XUnTR3g+DfFpu+XeGZafr+YFf9T+Y/QX2NrvWHT8Y0f+mD8\nWGtCTTHeVFr5RB4hYF+Fl0+iuT4AK7ctQaqAi4w56UApI9Dyf0esAYyw7gFt\nNCLSt/KlpZ34QkorcqHmAkLxqfNAmVNrWgqyrVgo3JvzsLewCwsnEg3ifPH7\nq1N4KDh6BMn4u0FRUFJRdM5eOop5Ofq8GHCZhYjOcP5LvkxFXutJlXTMZqD2\nOpAFL667Z0f2AD2tcaAIOEKJ8kiOKGixMN+O7rtZg+gnlIDP3KPWyZIikOKc\n9DuwZvdZtKX2Eao0y/BOh5uRCRskoBEQyaS/ciAw3sX/DQIdKrl8d82ts1YQ\nySakvpjJQiZeoxxnUv16Tl0DW8H13MVMopJZQB/cVUy6VvEu0iyQIDcRSuxs\ny7DR\r\n=1/0d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBNEEry7O+ie6Vx2UzrlCLgbuHbpqajrCZUQm6c/cd9RAiEAlrWEkwI3hW1rKTf7+EGXU4lv9nlgadUPkWGBvwuUdlg="}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag_4.2.0-0_1562280579144_0.055006681691938564"},"_hasShrinkwrap":false},"4.2.0":{"name":"flag","version":"4.2.0","description":"Feature flagging made easy for React and Redux","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"https://github.com/garbles/flag"},"author":{"name":"Gabe Scholz"},"license":"MPL-2.0","devDependencies":{"@types/enzyme":"^3.9.1","@types/jest":"^24.0.11","@types/lodash":"^4.14.123","@types/react":"^16.8.12","@types/react-dom":"^16.8.3","@types/react-redux":"^7.0.7","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.12.1","jest":"^24.7.1","np":"^4.0.2","react":"^16.8.6","react-dom":"^16.8.6","react-redux":"^7.0.2","ts-jest":"^24.0.1","typescript":"3.3.4000"},"dependencies":{"deep-computed":"^0.2.0","lodash":"^4.17.11","useful-types":"^0.2.1"},"peerDependencies":{"@types/react":"^16.8.0","@types/react-dom":"^16.8.0","react":"^16.8.0","react-dom":"^16.8.0","react-redux":"^5.0.0 || ^6.0.0 || ^7.0.0","redux":"^4.0.0"},"scripts":{"clean":"rm -rf build","build":"tsc","prepublish":"yarn clean && yarn build","test":"jest","pub":"np"},"licenseText":"Copyright 2019 (c) Gabe Scholz\n\n# Mozilla Public License Version 2.0\n\n### 1. Definitions\n\n**1.1. “Contributor”**  \n means each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n**1.2. “Contributor Version”**  \n means the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n**1.3. “Contribution”**  \n means Covered Software of a particular Contributor.\n\n**1.4. “Covered Software”**  \n means Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n**1.5. “Incompatible With Secondary Licenses”**  \n means\n\n- **(a)** that the initial Contributor has attached the notice described\n  in Exhibit B to the Covered Software; or\n- **(b)** that the Covered Software was made available under the terms of\n  version 1.1 or earlier of the License, but not also under the\n  terms of a Secondary License.\n\n**1.6. “Executable Form”**  \n means any form of the work other than Source Code Form.\n\n**1.7. “Larger Work”**  \n means a work that combines Covered Software with other material, in\na separate file or files, that is not Covered Software.\n\n**1.8. “License”**  \n means this document.\n\n**1.9. “Licensable”**  \n means having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n**1.10. “Modifications”**  \n means any of the following:\n\n- **(a)** any file in Source Code Form that results from an addition to,\n  deletion from, or modification of the contents of Covered\n  Software; or\n- **(b)** any new file in Source Code Form that contains any Covered\n  Software.\n\n**1.11. “Patent Claims” of a Contributor**  \n means any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n**1.12. “Secondary License”**  \n means either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n**1.13. “Source Code Form”**  \n means the form of the work preferred for making modifications.\n\n**1.14. “You” (or “Your”)**  \n means an individual or a legal entity exercising rights under this\nLicense. For legal entities, “You” includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, “control” means **(a)** the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or **(b)** ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n### 2. License Grants and Conditions\n\n#### 2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n- **(a)** under intellectual property rights (other than patent or trademark)\n  Licensable by such Contributor to use, reproduce, make available,\n  modify, display, perform, distribute, and otherwise exploit its\n  Contributions, either on an unmodified basis, with Modifications, or\n  as part of a Larger Work; and\n- **(b)** under Patent Claims of such Contributor to make, use, sell, offer\n  for sale, have made, import, and otherwise transfer either its\n  Contributions or its Contributor Version.\n\n#### 2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n#### 2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n- **(a)** for any code that a Contributor has removed from Covered Software;\n  or\n- **(b)** for infringements caused by: **(i)** Your and any other third party's\n  modifications of Covered Software, or **(ii)** the combination of its\n  Contributions with other software (except as part of its Contributor\n  Version); or\n- **(c)** under Patent Claims infringed by Covered Software in the absence of\n  its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n#### 2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n#### 2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n#### 2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n#### 2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n### 3. Responsibilities\n\n#### 3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n#### 3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n- **(a)** such Covered Software must also be made available in Source Code\n  Form, as described in Section 3.1, and You must inform recipients of\n  the Executable Form how they can obtain a copy of such Source Code\n  Form by reasonable means in a timely manner, at a charge no more\n  than the cost of distribution to the recipient; and\n\n- **(b)** You may distribute such Executable Form under the terms of this\n  License, or sublicense it under different terms, provided that the\n  license for the Executable Form does not attempt to limit or alter\n  the recipients' rights in the Source Code Form under this License.\n\n#### 3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n#### 3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n#### 3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n### 4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: **(a)** comply with\nthe terms of this License to the maximum extent possible; and **(b)**\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n### 5. Termination\n\n**5.1.** The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated **(a)** provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and **(b)** on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n**5.2.** If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n### 6. Disclaimer of Warranty\n\n> Covered Software is provided under this License on an “as is”\n> basis, without warranty of any kind, either expressed, implied, or\n> statutory, including, without limitation, warranties that the\n> Covered Software is free of defects, merchantable, fit for a\n> particular purpose or non-infringing. The entire risk as to the\n> quality and performance of the Covered Software is with You.\n> Should any Covered Software prove defective in any respect, You\n> (not any Contributor) assume the cost of any necessary servicing,\n> repair, or correction. This disclaimer of warranty constitutes an\n> essential part of this License. No use of any Covered Software is\n> authorized under this License except under this disclaimer.\n\n### 7. Limitation of Liability\n\n> Under no circumstances and under no legal theory, whether tort\n> (including negligence), contract, or otherwise, shall any\n> Contributor, or anyone who distributes Covered Software as\n> permitted above, be liable to You for any direct, indirect,\n> special, incidental, or consequential damages of any character\n> including, without limitation, damages for lost profits, loss of\n> goodwill, work stoppage, computer failure or malfunction, or any\n> and all other commercial damages or losses, even if such party\n> shall have been informed of the possibility of such damages. This\n> limitation of liability shall not apply to liability for death or\n> personal injury resulting from such party's negligence to the\n> extent applicable law prohibits such limitation. Some\n> jurisdictions do not allow the exclusion or limitation of\n> incidental or consequential damages, so this exclusion and\n> limitation may not apply to You.\n\n### 8. Litigation\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n### 9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n### 10. Versions of the License\n\n#### 10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n#### 10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n#### 10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\n## Exhibit A - Source Code Form License Notice\n\n    This Source Code Form is subject to the terms of the Mozilla Public\n    License, v. 2.0. If a copy of the MPL was not distributed with this\n    file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\n## Exhibit B - “Incompatible With Secondary Licenses” Notice\n\n    This Source Code Form is \"Incompatible With Secondary Licenses\", as\n    defined by the Mozilla Public License, v. 2.0.\n","_id":"flag@4.2.0","dist":{"shasum":"f97593e0f6aedfebdf4e0957203510bea2f50a0c","tarball":"https://registry.npmjs.org/flag/-/flag-4.2.0.tgz","integrity":"sha512-A5sgJoWxlGh6c4SNHj1YtbxgwgdWCIvTCaEtSV+qZncQ+J19rfq6M6OAmggcrA6Gp82NaBcRFTlNtWyRGg44UQ==","fileCount":22,"unpackedSize":47188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdI3QoCRA9TVsSAnZWagAA8zkP/3Gcjp60wKN5JPvb5NR/\nTFeQWCMEgtZs/uw2BN1dezcHwjwHcmRTBNcAM1CknelAojcUIudwywB8qh5R\nUj5CmWBsRr1AlGMVcwiTCLkZn08Qu98fZo35/lCZVjkPt3TC1rjlXE9WPpB/\ndnNzbB2UjK+zFtxK7GIaB7sx5KILbCeyvPy2zEN2jYbJhcvLe0SqqUbxgxge\nkxWi8+JWpb6EqpdL0nCnKl32sHDRZE2ukPElpxfd7LMLu7eswmiTRCf08ZbA\nAvnnLB6RAmQ/BZjqpIUJUgzpjByyeP0//9YTYtdicVPbXe7vxlWXqTOLhYRs\np1dawXXyx1SokyAYTBHP/HgcIAHwQlwT0xGjV82ihTfP5B4zvEKw+Lin2j5/\nZwfQAoCunvVhbTVk7ldaa1Y1Ecgn0hqa0mQ4VWfYF/d3m4PpTEHIZaCoKNcX\nZkHkwGTo5Uzsp/7j60KqhhoRT2S4DLhk3qjDo08kjq/ZdLRtgokl7E/SdfMS\nmQK80nFsIpSkW2w+QBEZG8hvsFFPn09rMOKu+qVIVO9y/Eiykpx645+9Dz2A\n1FGO5cSzQPEccKE87/JqVjDW1MmRFBPd4BvE3QRchgocpZs0SaLOp5GXc4Lj\nas8qknyBIGiVQlahaGGdfg2R1ul0mRJi0GiLNNn3QMXhxDZKRIkjntZq9saI\nbOHO\r\n=ZRYM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICMY09t2YosA3CDDtPU1m2Rf+0H4jwHB7XY2bmoS/RCBAiA0PVSns+0aAMA5Xkvl+giU7Dv7FYJK0rl/y6ilv18FjA=="}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag_4.2.0_1562604583498_0.9929243940961263"},"_hasShrinkwrap":false},"4.2.1":{"name":"flag","version":"4.2.1","description":"Feature flagging made easy for React and Redux","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"https://github.com/garbles/flag"},"author":{"name":"Gabe Scholz"},"license":"MPL-2.0","devDependencies":{"@types/enzyme":"^3.9.1","@types/jest":"^24.0.11","@types/lodash":"^4.14.123","@types/react":"^16.8.12","@types/react-dom":"^16.8.3","@types/react-redux":"^7.0.7","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.12.1","jest":"^24.7.1","np":"^4.0.2","react":"^16.8.6","react-dom":"^16.8.6","react-redux":"^7.0.2","ts-jest":"^24.0.1","typescript":"3.3.4000"},"dependencies":{"deep-computed":"^0.2.0","lodash":"^4.17.11","useful-types":"^0.2.1"},"peerDependencies":{"@types/react":"^16.8.0","@types/react-dom":"^16.8.0","react":"^16.8.0","react-dom":"^16.8.0","react-redux":"^5.0.0 || ^6.0.0 || ^7.0.0","redux":"^4.0.0"},"scripts":{"clean":"rm -rf build","build":"tsc","prepublish":"yarn clean && yarn build","test":"jest","pub":"np"},"licenseText":"Copyright 2019 (c) Gabe Scholz\n\n# Mozilla Public License Version 2.0\n\n### 1. Definitions\n\n**1.1. “Contributor”**  \n means each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n**1.2. “Contributor Version”**  \n means the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n**1.3. “Contribution”**  \n means Covered Software of a particular Contributor.\n\n**1.4. “Covered Software”**  \n means Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n**1.5. “Incompatible With Secondary Licenses”**  \n means\n\n- **(a)** that the initial Contributor has attached the notice described\n  in Exhibit B to the Covered Software; or\n- **(b)** that the Covered Software was made available under the terms of\n  version 1.1 or earlier of the License, but not also under the\n  terms of a Secondary License.\n\n**1.6. “Executable Form”**  \n means any form of the work other than Source Code Form.\n\n**1.7. “Larger Work”**  \n means a work that combines Covered Software with other material, in\na separate file or files, that is not Covered Software.\n\n**1.8. “License”**  \n means this document.\n\n**1.9. “Licensable”**  \n means having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n**1.10. “Modifications”**  \n means any of the following:\n\n- **(a)** any file in Source Code Form that results from an addition to,\n  deletion from, or modification of the contents of Covered\n  Software; or\n- **(b)** any new file in Source Code Form that contains any Covered\n  Software.\n\n**1.11. “Patent Claims” of a Contributor**  \n means any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n**1.12. “Secondary License”**  \n means either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n**1.13. “Source Code Form”**  \n means the form of the work preferred for making modifications.\n\n**1.14. “You” (or “Your”)**  \n means an individual or a legal entity exercising rights under this\nLicense. For legal entities, “You” includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, “control” means **(a)** the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or **(b)** ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n### 2. License Grants and Conditions\n\n#### 2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n- **(a)** under intellectual property rights (other than patent or trademark)\n  Licensable by such Contributor to use, reproduce, make available,\n  modify, display, perform, distribute, and otherwise exploit its\n  Contributions, either on an unmodified basis, with Modifications, or\n  as part of a Larger Work; and\n- **(b)** under Patent Claims of such Contributor to make, use, sell, offer\n  for sale, have made, import, and otherwise transfer either its\n  Contributions or its Contributor Version.\n\n#### 2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n#### 2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n- **(a)** for any code that a Contributor has removed from Covered Software;\n  or\n- **(b)** for infringements caused by: **(i)** Your and any other third party's\n  modifications of Covered Software, or **(ii)** the combination of its\n  Contributions with other software (except as part of its Contributor\n  Version); or\n- **(c)** under Patent Claims infringed by Covered Software in the absence of\n  its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n#### 2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n#### 2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n#### 2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n#### 2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n### 3. Responsibilities\n\n#### 3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n#### 3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n- **(a)** such Covered Software must also be made available in Source Code\n  Form, as described in Section 3.1, and You must inform recipients of\n  the Executable Form how they can obtain a copy of such Source Code\n  Form by reasonable means in a timely manner, at a charge no more\n  than the cost of distribution to the recipient; and\n\n- **(b)** You may distribute such Executable Form under the terms of this\n  License, or sublicense it under different terms, provided that the\n  license for the Executable Form does not attempt to limit or alter\n  the recipients' rights in the Source Code Form under this License.\n\n#### 3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n#### 3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n#### 3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n### 4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: **(a)** comply with\nthe terms of this License to the maximum extent possible; and **(b)**\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n### 5. Termination\n\n**5.1.** The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated **(a)** provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and **(b)** on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n**5.2.** If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n### 6. Disclaimer of Warranty\n\n> Covered Software is provided under this License on an “as is”\n> basis, without warranty of any kind, either expressed, implied, or\n> statutory, including, without limitation, warranties that the\n> Covered Software is free of defects, merchantable, fit for a\n> particular purpose or non-infringing. The entire risk as to the\n> quality and performance of the Covered Software is with You.\n> Should any Covered Software prove defective in any respect, You\n> (not any Contributor) assume the cost of any necessary servicing,\n> repair, or correction. This disclaimer of warranty constitutes an\n> essential part of this License. No use of any Covered Software is\n> authorized under this License except under this disclaimer.\n\n### 7. Limitation of Liability\n\n> Under no circumstances and under no legal theory, whether tort\n> (including negligence), contract, or otherwise, shall any\n> Contributor, or anyone who distributes Covered Software as\n> permitted above, be liable to You for any direct, indirect,\n> special, incidental, or consequential damages of any character\n> including, without limitation, damages for lost profits, loss of\n> goodwill, work stoppage, computer failure or malfunction, or any\n> and all other commercial damages or losses, even if such party\n> shall have been informed of the possibility of such damages. This\n> limitation of liability shall not apply to liability for death or\n> personal injury resulting from such party's negligence to the\n> extent applicable law prohibits such limitation. Some\n> jurisdictions do not allow the exclusion or limitation of\n> incidental or consequential damages, so this exclusion and\n> limitation may not apply to You.\n\n### 8. Litigation\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n### 9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n### 10. Versions of the License\n\n#### 10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n#### 10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n#### 10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\n## Exhibit A - Source Code Form License Notice\n\n    This Source Code Form is subject to the terms of the Mozilla Public\n    License, v. 2.0. If a copy of the MPL was not distributed with this\n    file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\n## Exhibit B - “Incompatible With Secondary Licenses” Notice\n\n    This Source Code Form is \"Incompatible With Secondary Licenses\", as\n    defined by the Mozilla Public License, v. 2.0.\n","_id":"flag@4.2.1","dist":{"shasum":"1bcf74a54fac637bbc9247f4e17e5de3077cdb16","tarball":"https://registry.npmjs.org/flag/-/flag-4.2.1.tgz","integrity":"sha512-/hF0mD0AEJbJF8rEfF6yUlz0p6ZjAKe6I4LCapq7BU1grR9+ccbeyy11FS58Lu/ao903kmN7Y4Gzua+iyZQClA==","fileCount":22,"unpackedSize":47188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdKURjCRA9TVsSAnZWagAAqtAQAIQiRqa203+y456dUqXd\nsOqW94exn6/65DiJITD8ROXfWCttTRFCS9WGqsGOmnlIzjrzNZDrjDhcCuX/\nS2jfiLTyWaMZM2IkOCc3MvNp5QuiWXVGSeXyDbXnz0MNNmQiEWEIZzCcCfcL\nXkr0Y6VpuQFJZd+1EDN9Bvn0dO2p3O6Wvhb6W/tGQWGYAMEQyjliz3yVsony\nrBXLm1FY4wdsolOBmczsQZjcHFd4MmLXXhDgdsCGz1Vta1sWvfyJoflUXB41\neLd/44ycpl23XoPCNSgLoFPXo4ch8jEZjHyxnO/vp7dYSj79EL4poPUVDVbf\nvo/gYhkVTzRF7A1BZFH4dT85Ny1XuS+3+opkKHEUvpa736BlQ4FQmAI9PxQN\n9+2fTlp+OwX5PrYNdQ4Vjp+91Fb6hIPqOZnDJ9TE/4oehBVsJaH+1Ox80HRt\nebmRffcu9+RaBV5QBXdIu45kzFN6zFEbXkYLJLuL4CSwqzQkJU8slXZ0YjYz\nfh5cePj4zj/zRjl33H+d4QI14ctChOF/lT7tHz60gpK7xOs507r+C6BDHzQ+\njcTHMDY5yaLsiwn7U+lEE8TNwqj/NYv0ZLCDY+Xas5Q3UpXw9dihgEG/JCwk\nr83vkypVeWjN33ZPKF1HvZpG2Y0wpXksFstHxWLXQpcGjzuSZzC6+cqBNhnm\nAbow\r\n=tMKI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF5Aqw0Kbvf2mugcb5hm3ZEmHz/7DSQV4rs0ZOWgoGTbAiEA+eq+kn5xU5zFNK/gJjmj+29o2RMsmumvVUzqcrmu9vI="}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag_4.2.1_1562985571043_0.7352944483362895"},"_hasShrinkwrap":false},"4.3.0-0":{"name":"flag","version":"4.3.0-0","description":"Feature flagging made easy for React and Redux","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"https://github.com/garbles/flag"},"author":{"name":"Gabe Scholz"},"license":"MPL-2.0","devDependencies":{"@types/enzyme":"^3.9.1","@types/jest":"^24.0.11","@types/lodash":"^4.14.123","@types/react":"^16.8.12","@types/react-dom":"^16.8.3","@types/react-redux":"^7.0.7","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.12.1","jest":"^24.7.1","np":"^4.0.2","react":"^16.8.6","react-dom":"^16.8.6","react-redux":"^7.0.2","ts-jest":"^24.0.1","typescript":"^3.5.3"},"dependencies":{"deep-computed":"^0.2.0","lodash":"^4.17.11","useful-types":"^0.4.0"},"peerDependencies":{"@types/react":"^16.8.0","@types/react-dom":"^16.8.0","react":"^16.8.0","react-dom":"^16.8.0","react-redux":"^5.0.0 || ^6.0.0 || ^7.0.0","redux":"^4.0.0"},"scripts":{"clean":"rm -rf build","build":"tsc","prepublish":"yarn clean && yarn build","test":"jest","pub":"np"},"readmeFilename":"README.md","readme":"# Flag\n\n_Feature flagging made easy for React and Redux_\n\n```\nyarn add flag\n```\n\n## Motivation\n\nFeature flagging is necessary for large client-side applications. They improve development speed\nand allow teams to test new features before they are stable. In order to **WANT** to use feature\nflags in an application, they should be **VERY** easy to add and remove. That means minimal\nboiler plate and no need to pass boolean props down through component hierarchy. Such a thing could be\ndone with global variables; however, they live outside of the React/Redux lifecycle, making them\nmore difficult to control. Instead, this library injects and then accesses feature flags directly\nfrom the React context without getting in your way.\n\nFlag allows you to declare flags as either plain values or as functions. If a flag is a function then it is referred to as a computed flag. The function accepts one argument which is the flags object itself. You do not have to use computed flags, but they can be very convenient. For example,\n\n```ts\nconst flags = {\n  // properties can be nested objects\n  features: {\n    // they can be boolean\n    useMyCoolNewThing: true\n  },\n  config: {\n    // they can be strings\n    apiUrl: \"www.example.com/api\"\n  },\n  // they can be numbers\n  cool: 1,\n  dude: 5,\n  // they can be computed\n  coolAndDude: flags => flags.cool + flags.dude,\n  // they can be computed from other computed properties.\n  // other computed properties are resolved for you, so that you do not\n  // need to call it as a function.\n  largeCoolAndDude: flags => flags.coolAndDude > 10\n};\n```\n\n## Getting Started\n\nThis library has strong TypeScript support as of v4. In order to get that support, you must\ninitialize the `flag` library before using it.\n\n### createFlags\n\nCreates React bindings for flags. **You should only initialize one instance of this API**. Does\nnot take any value arguments, but takes one type argument `T` which is the shape of your resolved\nflags.\n\n```ts\n// flags.ts\n\nimport createFlags from \"flag\";\n\nexport type MyFlags = {\n  features: {\n    useMyCoolNewThing: boolean;\n  };\n  config: {\n    apiUrl: string;\n  };\n  cool: number;\n  dude: number;\n  coolAndDude: number;\n  largeCoolAndDude: boolean;\n};\n\nconst { FlagsProvider, Flag, useFlag, useFlags } = createFlags<MyFlags>();\n\nexport { FlagsProvider, Flag, useFlag, useFlags };\n```\n\n### createReduxBindings\n\nYou can also add support for Redux by importing `createReduxBindings` from `flag/redux`.\n\n| Args       | Type               | Required | Description                       |\n| ---------- | ------------------ | -------- | --------------------------------- |\n| `provider` | `FlagsProvider<T>` | `true`   | Provider created by `createFlags` |\n\n```ts\n// flags.ts\n\n// ... the above\n\nimport createReduxBindings from \"flag/redux\";\n\nconst {\n  setFlagsAction,\n  getFlagsSelector,\n  createFlagsReducer,\n  ConnectedFlagsProvider\n} = createReduxBindings(FlagsProvider);\n\nexport {\n  setFlagsAction,\n  getFlagsSelector,\n  createFlagsReducer,\n  ConnectedFlagsProvider\n};\n```\n\n## React API\n\nFor brevity, the type `T` in the section below refers to the shape of your resolved feature flags.\n\n### Computable\n\nGeneric type used to describe unresolved flags. Very useful when including functions are part of your flag definitions because function arguments can be inferred.\n\n```tsx\nimport { Computable } from \"flag\";\n\ntype MyFlags = {\n  a: boolean;\n  b: boolean;\n  c: boolean;\n};\n\nconst flags: Computable<MyFlags> = {\n  a: true,\n  b: false,\n  // 👇 `flags` type checks!\n  c: flags => flags.a && flags.b\n};\n```\n\n### FlagsProvider\n\nReturned as part of `createFlags()`. React component that makes flags available to children through the Context API.\n\n| Props      | Type            | Required | Description            |\n| ---------- | --------------- | -------- | ---------------------- |\n| `flags`    | `Computable<T>` | `true`   | All pre-computed flags |\n| `children` | `ReactNode`     | `true`   | React children         |\n\n```tsx\n// index.tsx\n\nimport { MyApplication } from \"./app\";\nimport { FlagsProvider, Flag } from \"./flags\";\n\nconst instance = (\n  <FlagsProvider flags={flags}>\n    <MyApplication />\n  </FlagsProvider>\n);\n\nReact.render(instance, document.querySelector(\"#app\"));\n```\n\n### Flag\n\nReturned as part of `createFlags()`. Renders a some UI based on whether a flag is truthy or falsy. It's a glorified if statement 😬. Must be used in side of `FlagsProvider`.\n\n| Props               | Type                          | Required | Description                         |\n| ------------------- | ----------------------------- | -------- | ----------------------------------- |\n| `name`              | `string[]`                    | `true`   | Must be a valid key path of `T`     |\n| `children`          | `ReactNode`                   | `false`  | React children                      |\n| `render`            | `(flags: T) => ReactNode`     | `false`  | Function that returns a `ReactNode` |\n| `fallbackRender`    | `(flags: T) => ReactNode`     | `false`  | Function that returns a `ReactNode` |\n| `component`         | `ComponentType<{ flags: T }>` | `false`  | React Component with `T` as props   |\n| `fallbackComponent` | `ComponentType<{ flags: T }>` | `false`  | React Component with `T` as props   |\n\nOrder of deciding which of these nodes to renders is as follows:\n\n- If the flag is `truthy`:\n  - render `children` if defined\n  - call `render` with `T` if defined _or_\n  - call `component` with `{flags: T}` if defined _else_\n  - return `null`\n- If the flag is `falsy`:\n  - call `fallbackRender` with `T` if defined _or_\n  - call `fallbackComponent` with `{ flags: T }` if defined _else_\n  - return `null`\n\n```tsx\n<Flag\n  name={[\"features\", \"useMyCoolNewThing\"]}\n  render={() => <div>Rendered on truthy</div>}\n  fallbackRender={() => <div>Rendered on falsy</div>}\n/>\n```\n\n### useFlags\n\nReturned as part of `createFlags()`. A React hook that returns all of the flags. Must be used in side of `FlagsProvider`.\n\n```tsx\n// my-component.tsx\n\nimport { useFlags } from \"./flags\";\n\nconst MyComponent = () => {\n  const flags = useFlags();\n\n  return <div>The API url is \"{flags.config.apiUrl}\"</div>;\n};\n```\n\n### useFlag\n\nReturned as part of `createFlags()`. A React hook to return a single flag. Must be used in side of `FlagsProvider`.\n\n| Args      | Type       | Required | Description                     |\n| --------- | ---------- | -------- | ------------------------------- |\n| `keyPath` | `string[]` | `true`   | Must be a valid key path of `T` |\n\n```tsx\n// my-component.tsx\n\nimport { useFlags } from \"./flags\";\n\nconst MyComponent = () => {\n  const apiUrl = useFlag([\"config\", \"apiUrl\"]);\n\n  return <div>The API url is \"{apiUrl}\"</div>;\n};\n```\n\n## Redux API\n\n### createFlagsReducer\n\nReturned as part of `createReduxBindings(...)`. Creates a reducer to be used in your Redux stores.\n\n| Args    | Type | Required | Description                     |\n| ------- | ---- | -------- | ------------------------------- |\n| `flags` | `T`  | `true`   | The initial value of your flags |\n\n```tsx\n// reducer.ts\n\nimport { combineReducers } from \"redux\";\nimport { Computable } from \"flag\";\nimport { createFlagsReducer, MyFlags } from \"./flags\";\nimport { otherReducer } from \"./other-reducer\";\n\nconst flags: Computable<MyFlags> = {\n  // ...\n};\n\nexport default combineReducers({\n  // 👇 must use the \"flags\" key of your state\n  flags: createFlagsReducer(flags),\n  other: otherReducer\n});\n```\n\n### getFlagsSelector\n\nA selector to retrieve _computed_ flags from Redux state. It is not enough to say `state.flags` because `createFlagsReducer` does not eagerly evaluate computable flags.\n(Though I suppose if you don't use any computable flags, then you don't necessarily need this 🤷‍♂️.)\n\n```tsx\n// reducer.ts\n\nimport { getFlagsSelector, MyFlags } from \"./flags\";\n\ntype State = {\n  flags: MyFlags;\n  // ...\n};\n\n// ...\n\nexport const getFlags = (state: State) => getFlagsSelector(state);\n```\n\n### ConnectedFlagsProvider\n\nReturned as part of `createReduxBindings(...)`. Wraps `FlagsProvider`, fetching the flags from Redux state.\n\n```tsx\nimport { Provider } from \"redux\";\nimport { MyApplication } from \"./app\";\nimport { ConnectedFlagsProvider } from \"./flags\";\nimport { store } from \"./store\";\n\nconst instance = (\n  <Provider store={store}>\n    <ConnectedFlagsProvider>\n      <MyApplication />\n    </ConnectedFlagsProvider>\n  </Provider>\n);\n\nReact.render(instance, document.querySelector(\"#app\"));\n```\n\n### setFlagsAction\n\nReturned as part of `createReduxBindings(...)`. A dispatchable action that sets flags. Merges a partial value of pre-computed flags with existing pre-computed flags.\n\n| Args    | Type            | Required | Description                |\n| ------- | --------------- | -------- | -------------------------- |\n| `flags` | `Computable<T>` | `true`   | Partial pre-computed flags |\n\n```tsx\nimport { Thunk } from \"redux-thunk\";\nimport { setFlagsAction } from \"./flags\";\n\nexport const someThunk: Thunk<any> = ({ dispatch }) => async () => {\n  const user = await fetchUser();\n\n  dispatch(setFlagsAction(user.flags));\n  // ...\n};\n```\n\n## License\n\nMPL-2.0\n","licenseText":"Copyright 2019 (c) Gabe Scholz\n\n# Mozilla Public License Version 2.0\n\n### 1. Definitions\n\n**1.1. “Contributor”**  \n means each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n**1.2. “Contributor Version”**  \n means the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n**1.3. “Contribution”**  \n means Covered Software of a particular Contributor.\n\n**1.4. “Covered Software”**  \n means Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n**1.5. “Incompatible With Secondary Licenses”**  \n means\n\n- **(a)** that the initial Contributor has attached the notice described\n  in Exhibit B to the Covered Software; or\n- **(b)** that the Covered Software was made available under the terms of\n  version 1.1 or earlier of the License, but not also under the\n  terms of a Secondary License.\n\n**1.6. “Executable Form”**  \n means any form of the work other than Source Code Form.\n\n**1.7. “Larger Work”**  \n means a work that combines Covered Software with other material, in\na separate file or files, that is not Covered Software.\n\n**1.8. “License”**  \n means this document.\n\n**1.9. “Licensable”**  \n means having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n**1.10. “Modifications”**  \n means any of the following:\n\n- **(a)** any file in Source Code Form that results from an addition to,\n  deletion from, or modification of the contents of Covered\n  Software; or\n- **(b)** any new file in Source Code Form that contains any Covered\n  Software.\n\n**1.11. “Patent Claims” of a Contributor**  \n means any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n**1.12. “Secondary License”**  \n means either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n**1.13. “Source Code Form”**  \n means the form of the work preferred for making modifications.\n\n**1.14. “You” (or “Your”)**  \n means an individual or a legal entity exercising rights under this\nLicense. For legal entities, “You” includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, “control” means **(a)** the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or **(b)** ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n### 2. License Grants and Conditions\n\n#### 2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n- **(a)** under intellectual property rights (other than patent or trademark)\n  Licensable by such Contributor to use, reproduce, make available,\n  modify, display, perform, distribute, and otherwise exploit its\n  Contributions, either on an unmodified basis, with Modifications, or\n  as part of a Larger Work; and\n- **(b)** under Patent Claims of such Contributor to make, use, sell, offer\n  for sale, have made, import, and otherwise transfer either its\n  Contributions or its Contributor Version.\n\n#### 2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n#### 2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n- **(a)** for any code that a Contributor has removed from Covered Software;\n  or\n- **(b)** for infringements caused by: **(i)** Your and any other third party's\n  modifications of Covered Software, or **(ii)** the combination of its\n  Contributions with other software (except as part of its Contributor\n  Version); or\n- **(c)** under Patent Claims infringed by Covered Software in the absence of\n  its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n#### 2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n#### 2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n#### 2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n#### 2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n### 3. Responsibilities\n\n#### 3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n#### 3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n- **(a)** such Covered Software must also be made available in Source Code\n  Form, as described in Section 3.1, and You must inform recipients of\n  the Executable Form how they can obtain a copy of such Source Code\n  Form by reasonable means in a timely manner, at a charge no more\n  than the cost of distribution to the recipient; and\n\n- **(b)** You may distribute such Executable Form under the terms of this\n  License, or sublicense it under different terms, provided that the\n  license for the Executable Form does not attempt to limit or alter\n  the recipients' rights in the Source Code Form under this License.\n\n#### 3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n#### 3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n#### 3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n### 4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: **(a)** comply with\nthe terms of this License to the maximum extent possible; and **(b)**\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n### 5. Termination\n\n**5.1.** The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated **(a)** provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and **(b)** on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n**5.2.** If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n### 6. Disclaimer of Warranty\n\n> Covered Software is provided under this License on an “as is”\n> basis, without warranty of any kind, either expressed, implied, or\n> statutory, including, without limitation, warranties that the\n> Covered Software is free of defects, merchantable, fit for a\n> particular purpose or non-infringing. The entire risk as to the\n> quality and performance of the Covered Software is with You.\n> Should any Covered Software prove defective in any respect, You\n> (not any Contributor) assume the cost of any necessary servicing,\n> repair, or correction. This disclaimer of warranty constitutes an\n> essential part of this License. No use of any Covered Software is\n> authorized under this License except under this disclaimer.\n\n### 7. Limitation of Liability\n\n> Under no circumstances and under no legal theory, whether tort\n> (including negligence), contract, or otherwise, shall any\n> Contributor, or anyone who distributes Covered Software as\n> permitted above, be liable to You for any direct, indirect,\n> special, incidental, or consequential damages of any character\n> including, without limitation, damages for lost profits, loss of\n> goodwill, work stoppage, computer failure or malfunction, or any\n> and all other commercial damages or losses, even if such party\n> shall have been informed of the possibility of such damages. This\n> limitation of liability shall not apply to liability for death or\n> personal injury resulting from such party's negligence to the\n> extent applicable law prohibits such limitation. Some\n> jurisdictions do not allow the exclusion or limitation of\n> incidental or consequential damages, so this exclusion and\n> limitation may not apply to You.\n\n### 8. Litigation\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n### 9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n### 10. Versions of the License\n\n#### 10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n#### 10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n#### 10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\n## Exhibit A - Source Code Form License Notice\n\n    This Source Code Form is subject to the terms of the Mozilla Public\n    License, v. 2.0. If a copy of the MPL was not distributed with this\n    file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\n## Exhibit B - “Incompatible With Secondary Licenses” Notice\n\n    This Source Code Form is \"Incompatible With Secondary Licenses\", as\n    defined by the Mozilla Public License, v. 2.0.\n","_id":"flag@4.3.0-0","dist":{"shasum":"2768d3efae2f974383331a5c463844732814107b","tarball":"https://registry.npmjs.org/flag/-/flag-4.3.0-0.tgz","integrity":"sha512-Cdx54EHjMDBe4+40RH33CJvAcWkn8uViX40OwaLcKp++y0qw4RPvwccx78tsmczSH/hfe2zpDo1dDy4maNiDlg==","fileCount":22,"unpackedSize":47188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQ8heCRA9TVsSAnZWagAAqxMP/2va+lkKdw2k9Pwv3yjf\nqYc7welsE+D8B7ULzbg9sB+9g+pY8PyyYkCCBuBFfEF0IQb521UIehi45xpq\n33shJeHUhJLAetRhk4CnkhnqPLswEnfsXsZTBf8HNIxSBXMIv5Gi/fnssgBd\nMxaN8t0QY81Klj9Iuemt1e7Kw5sCAVKymlEMdPnPbaRekpot6r85z3wQ+ceE\nRmWWK31kIIXS2BKBiMQ8+8jIKIZriNMVMv0kGlKs4056dZIODpRAic6txJVE\n/rt1xMEByv6ITR4GGiY/DAcDgn07s9o9D8y1XTzQ2R0t0yGcds4xcxPz2PH6\nGkw7XDvFHZFfdEP4SuCU3PdNxSltx1ydh64Nq6gtPJoL/L2AQ7hAm1Uq+m/x\ngNgUoKwSyN2SaVts3A/NwxWlodaiGabVYhrxnoWaldVG0rjnPa45xOivjlxR\nTrfrxiLEHd6Nd3+pHgvdaYUkSdrQVowPxFFx+9JG5gK7WEpEhkRTaxdLRj6x\nNpg9zZ7LofULHJ0XcZ2cAtWmol7UtPOkFTCFSlk2JzJB2gmk417ga6tPosEq\naQcyUvpvOImzjLHsQE9b7veOalJllHfIxyp3W7YE6YWh7UzGUYBO/GrQFk+a\ngSb7Pw2twEC2W3IiHB0af8bSDSsJLo7Gxk+TUJ0Q+CLXYIUBDbH00fjqYnkL\nohZr\r\n=Fm++\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFSFiKPLjOrq61Lcr5HeslpUgFCV7An3Zbfrm1gra4VeAiAwaukCVqY2JBSBAJayHp9lxp2/aAURIz9FwoYe4Se4AQ=="}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag_4.3.0-0_1564723293332_0.16678331685564407"},"_hasShrinkwrap":false},"4.3.0":{"name":"flag","version":"4.3.0","description":"Feature flagging made easy for React and Redux","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"https://github.com/garbles/flag"},"author":{"name":"Gabe Scholz"},"license":"MPL-2.0","devDependencies":{"@types/enzyme":"^3.9.1","@types/jest":"^24.0.11","@types/lodash":"^4.14.123","@types/react":"^16.8.12","@types/react-dom":"^16.8.3","@types/react-redux":"^7.0.7","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.12.1","jest":"^24.7.1","np":"^4.0.2","react":"^16.8.6","react-dom":"^16.8.6","react-redux":"^7.0.2","ts-jest":"^24.0.1","typescript":"^3.5.3"},"dependencies":{"deep-computed":"^0.2.0","lodash":"^4.17.11","useful-types":"^0.4.0"},"peerDependencies":{"@types/react":"^16.8.0","@types/react-dom":"^16.8.0","react":"^16.8.0","react-dom":"^16.8.0","react-redux":"^5.0.0 || ^6.0.0 || ^7.0.0","redux":"^4.0.0"},"scripts":{"clean":"rm -rf build","build":"tsc","prepublish":"yarn clean && yarn build","test":"jest","pub":"np"},"licenseText":"Copyright 2019 (c) Gabe Scholz\n\n# Mozilla Public License Version 2.0\n\n### 1. Definitions\n\n**1.1. “Contributor”**  \n means each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n**1.2. “Contributor Version”**  \n means the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n**1.3. “Contribution”**  \n means Covered Software of a particular Contributor.\n\n**1.4. “Covered Software”**  \n means Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n**1.5. “Incompatible With Secondary Licenses”**  \n means\n\n- **(a)** that the initial Contributor has attached the notice described\n  in Exhibit B to the Covered Software; or\n- **(b)** that the Covered Software was made available under the terms of\n  version 1.1 or earlier of the License, but not also under the\n  terms of a Secondary License.\n\n**1.6. “Executable Form”**  \n means any form of the work other than Source Code Form.\n\n**1.7. “Larger Work”**  \n means a work that combines Covered Software with other material, in\na separate file or files, that is not Covered Software.\n\n**1.8. “License”**  \n means this document.\n\n**1.9. “Licensable”**  \n means having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n**1.10. “Modifications”**  \n means any of the following:\n\n- **(a)** any file in Source Code Form that results from an addition to,\n  deletion from, or modification of the contents of Covered\n  Software; or\n- **(b)** any new file in Source Code Form that contains any Covered\n  Software.\n\n**1.11. “Patent Claims” of a Contributor**  \n means any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n**1.12. “Secondary License”**  \n means either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n**1.13. “Source Code Form”**  \n means the form of the work preferred for making modifications.\n\n**1.14. “You” (or “Your”)**  \n means an individual or a legal entity exercising rights under this\nLicense. For legal entities, “You” includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, “control” means **(a)** the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or **(b)** ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n### 2. License Grants and Conditions\n\n#### 2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n- **(a)** under intellectual property rights (other than patent or trademark)\n  Licensable by such Contributor to use, reproduce, make available,\n  modify, display, perform, distribute, and otherwise exploit its\n  Contributions, either on an unmodified basis, with Modifications, or\n  as part of a Larger Work; and\n- **(b)** under Patent Claims of such Contributor to make, use, sell, offer\n  for sale, have made, import, and otherwise transfer either its\n  Contributions or its Contributor Version.\n\n#### 2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n#### 2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n- **(a)** for any code that a Contributor has removed from Covered Software;\n  or\n- **(b)** for infringements caused by: **(i)** Your and any other third party's\n  modifications of Covered Software, or **(ii)** the combination of its\n  Contributions with other software (except as part of its Contributor\n  Version); or\n- **(c)** under Patent Claims infringed by Covered Software in the absence of\n  its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n#### 2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n#### 2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n#### 2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n#### 2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n### 3. Responsibilities\n\n#### 3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n#### 3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n- **(a)** such Covered Software must also be made available in Source Code\n  Form, as described in Section 3.1, and You must inform recipients of\n  the Executable Form how they can obtain a copy of such Source Code\n  Form by reasonable means in a timely manner, at a charge no more\n  than the cost of distribution to the recipient; and\n\n- **(b)** You may distribute such Executable Form under the terms of this\n  License, or sublicense it under different terms, provided that the\n  license for the Executable Form does not attempt to limit or alter\n  the recipients' rights in the Source Code Form under this License.\n\n#### 3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n#### 3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n#### 3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n### 4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: **(a)** comply with\nthe terms of this License to the maximum extent possible; and **(b)**\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n### 5. Termination\n\n**5.1.** The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated **(a)** provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and **(b)** on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n**5.2.** If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n### 6. Disclaimer of Warranty\n\n> Covered Software is provided under this License on an “as is”\n> basis, without warranty of any kind, either expressed, implied, or\n> statutory, including, without limitation, warranties that the\n> Covered Software is free of defects, merchantable, fit for a\n> particular purpose or non-infringing. The entire risk as to the\n> quality and performance of the Covered Software is with You.\n> Should any Covered Software prove defective in any respect, You\n> (not any Contributor) assume the cost of any necessary servicing,\n> repair, or correction. This disclaimer of warranty constitutes an\n> essential part of this License. No use of any Covered Software is\n> authorized under this License except under this disclaimer.\n\n### 7. Limitation of Liability\n\n> Under no circumstances and under no legal theory, whether tort\n> (including negligence), contract, or otherwise, shall any\n> Contributor, or anyone who distributes Covered Software as\n> permitted above, be liable to You for any direct, indirect,\n> special, incidental, or consequential damages of any character\n> including, without limitation, damages for lost profits, loss of\n> goodwill, work stoppage, computer failure or malfunction, or any\n> and all other commercial damages or losses, even if such party\n> shall have been informed of the possibility of such damages. This\n> limitation of liability shall not apply to liability for death or\n> personal injury resulting from such party's negligence to the\n> extent applicable law prohibits such limitation. Some\n> jurisdictions do not allow the exclusion or limitation of\n> incidental or consequential damages, so this exclusion and\n> limitation may not apply to You.\n\n### 8. Litigation\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n### 9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n### 10. Versions of the License\n\n#### 10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n#### 10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n#### 10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\n## Exhibit A - Source Code Form License Notice\n\n    This Source Code Form is subject to the terms of the Mozilla Public\n    License, v. 2.0. If a copy of the MPL was not distributed with this\n    file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\n## Exhibit B - “Incompatible With Secondary Licenses” Notice\n\n    This Source Code Form is \"Incompatible With Secondary Licenses\", as\n    defined by the Mozilla Public License, v. 2.0.\n","_id":"flag@4.3.0","dist":{"shasum":"0086f30fc8b6866e36ef5d507cc099a69b7df483","tarball":"https://registry.npmjs.org/flag/-/flag-4.3.0.tgz","integrity":"sha512-JlHEH8dRySUXMnxt6q26fHhfMLeSgcpxxPaHRepYYjqez3GmHyPKh/HpD3KrhO+gj5ZEwmh4tmAaYUcw5er6Vg==","fileCount":22,"unpackedSize":47186,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSGBiCRA9TVsSAnZWagAAXEMQAIKrNhCDpjqva5YKwugn\naKqRW4R55tbYi6dGDM6EPTnI2kYD5ybcAJihabnQKaVF0PmPS3zjlVoHPLXf\nHG08oUJSqjqIJ3HE9q60ozmd3MqvRjCmoS1oKY+2NlqKAAYWWpQQgzTXlpzM\nxJkFeJtfqrzf0oVe+tsLbfHuRDUENjfpsjfKp8LqTBvuc7xUH2Y636JIzf1z\nPSLI4KfQASRfKSSg1Fp1XJdmKDeOKg0/x2GFPunrN+jhx+KrpFoA+65w+af6\n3Hk4z6K+Og3VtH9awXm+mbjn4KzezMdzX/Y2+izpNVbNfU+KZpat4GYlQVqp\n78ViXHjX6mpNO8yTFKcRvM9HOZARoAiXIQUVhDN57Y9YG4u3UdCy4ty3KOEC\nH2SCp5Fc1Hg6Alsqfg3Dw4uZ2whNQTACDQezYZQxEzD6r64HPTFTL5zPWqLY\nM7X16jWubD3N1NDd/89sGNsZwZYgG3q6UszV/Sax3M2FG7kRsGoqF6t1uIcc\npxSUuZqxYm2+D7TVtrsQxAnX+xTNAjZC6zfA0Z5x/+Gy++1aGh9HENSm8qeW\nC0FFmr8LQ3pILGQ0Lj8Po6mJBJdGPKysGVnRUGg4eU0f3PjztPzgkODXpIE1\nFL/fXjmiMizS670pKC6i+Z5b3vBJJsxw5j1td279GC0iRg1PAVRvjoInd7c7\nv4H+\r\n=ZgOF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICXWs+diROm1ljwDNd/F9ucLKPNCRsRwo0n10nHjVePxAiBBpkrsOeprV1fouAFErERzhZKwdeuE4NpXGgwrI+8qWA=="}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag_4.3.0_1565024353294_0.06741854404924874"},"_hasShrinkwrap":false},"4.4.0-0":{"name":"flag","version":"4.4.0-0","description":"Feature flagging made easy for React and Redux","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"https://github.com/garbles/flag"},"author":{"name":"Gabe Scholz"},"license":"MPL-2.0","devDependencies":{"@types/enzyme":"^3.9.1","@types/invariant":"^2.2.30","@types/jest":"^24.0.11","@types/lodash":"^4.14.123","@types/react":"^16.8.12","@types/react-dom":"^16.8.3","@types/react-redux":"^7.0.7","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.12.1","jest":"^24.7.1","np":"^4.0.2","react":"^16.8.6","react-dom":"^16.8.6","react-redux":"^7.0.2","ts-jest":"^24.0.1","typescript":"^3.5.3"},"dependencies":{"deep-computed":"^0.2.0","invariant":"^2.2.4","lodash":"^4.17.11","useful-types":"^0.4.0"},"peerDependencies":{"@types/react":"^16.8.0","@types/react-dom":"^16.8.0","react":"^16.8.0","react-dom":"^16.8.0","react-redux":"^5.0.0 || ^6.0.0 || ^7.0.0","redux":"^2.0.0 || ^3.0.0 || ^4.0.0"},"scripts":{"clean":"rm -rf build","build":"tsc","prepublish":"yarn clean && yarn build","test":"jest","pub":"np"},"readmeFilename":"README.md","readme":"# Flag\n\n_Feature flagging made easy for React and Redux_\n\n```\nyarn add flag\n```\n\n## Motivation\n\nFeature flagging is necessary for large client-side applications. They improve development speed\nand allow teams to test new features before they are stable. In order to **WANT** to use feature\nflags in an application, they should be **VERY** easy to add and remove. That means minimal\nboiler plate and no need to pass boolean props down through component hierarchy. Such a thing could be\ndone with global variables; however, they live outside of the React/Redux lifecycle, making them\nmore difficult to control. Instead, this library injects and then accesses feature flags directly\nfrom the React context without getting in your way.\n\nFlag allows you to declare flags as either plain values or as functions. If a flag is a function then it is referred to as a computed flag. The function accepts one argument which is the flags object itself. You do not have to use computed flags, but they can be very convenient. For example,\n\n```ts\nconst flags = {\n  // properties can be nested objects\n  features: {\n    // they can be boolean\n    useMyCoolNewThing: true\n  },\n  config: {\n    // they can be strings\n    apiUrl: \"www.example.com/api\"\n  },\n  // they can be numbers\n  cool: 1,\n  dude: 5,\n  // they can be computed\n  coolAndDude: flags => flags.cool + flags.dude,\n  // they can be computed from other computed properties.\n  // other computed properties are resolved for you, so that you do not\n  // need to call it as a function.\n  largeCoolAndDude: flags => flags.coolAndDude > 10\n};\n```\n\n## Getting Started\n\nThis library has strong TypeScript support as of v4. In order to get that support, you must\ninitialize the `flag` library before using it.\n\n### createFlags\n\nCreates React bindings for flags. **You should only initialize one instance of this API**. Does\nnot take any value arguments, but takes one type argument `T` which is the shape of your resolved\nflags.\n\n```ts\n// flags.ts\n\nimport createFlags from \"flag\";\n\nexport type MyFlags = {\n  features: {\n    useMyCoolNewThing: boolean;\n  };\n  config: {\n    apiUrl: string;\n  };\n  cool: number;\n  dude: number;\n  coolAndDude: number;\n  largeCoolAndDude: boolean;\n};\n\nconst { FlagsProvider, Flag, useFlag, useFlags } = createFlags<MyFlags>();\n\nexport { FlagsProvider, Flag, useFlag, useFlags };\n```\n\n### createReduxBindings\n\nYou can also add support for Redux by importing `createReduxBindings` from `flag/redux`.\n\n| Args       | Type               | Required | Description                       |\n| ---------- | ------------------ | -------- | --------------------------------- |\n| `provider` | `FlagsProvider<T>` | `true`   | Provider created by `createFlags` |\n\n```ts\n// flags.ts\n\n// ... the above\n\nimport createReduxBindings from \"flag/redux\";\n\nconst {\n  setFlagsAction,\n  getFlagsSelector,\n  createFlagsReducer,\n  ConnectedFlagsProvider\n} = createReduxBindings(FlagsProvider);\n\nexport {\n  setFlagsAction,\n  getFlagsSelector,\n  createFlagsReducer,\n  ConnectedFlagsProvider\n};\n```\n\n## React API\n\nFor brevity, the type `T` in the section below refers to the shape of your resolved feature flags.\n\n### Computable\n\nGeneric type used to describe unresolved flags. Very useful when including functions are part of your flag definitions because function arguments can be inferred.\n\n```tsx\nimport { Computable } from \"flag\";\n\ntype MyFlags = {\n  a: boolean;\n  b: boolean;\n  c: boolean;\n};\n\nconst flags: Computable<MyFlags> = {\n  a: true,\n  b: false,\n  // 👇 `flags` type checks!\n  c: flags => flags.a && flags.b\n};\n```\n\n### FlagsProvider\n\nReturned as part of `createFlags()`. React component that makes flags available to children through the Context API.\n\n| Props      | Type            | Required | Description            |\n| ---------- | --------------- | -------- | ---------------------- |\n| `flags`    | `Computable<T>` | `true`   | All pre-computed flags |\n| `children` | `ReactNode`     | `true`   | React children         |\n\n```tsx\n// index.tsx\n\nimport { MyApplication } from \"./app\";\nimport { FlagsProvider, Flag } from \"./flags\";\n\nconst instance = (\n  <FlagsProvider flags={flags}>\n    <MyApplication />\n  </FlagsProvider>\n);\n\nReact.render(instance, document.querySelector(\"#app\"));\n```\n\n### Flag\n\nReturned as part of `createFlags()`. Renders a some UI based on whether a flag is truthy or falsy. It's a glorified if statement 😬. Must be used in side of `FlagsProvider`.\n\n| Props               | Type                          | Required | Description                         |\n| ------------------- | ----------------------------- | -------- | ----------------------------------- |\n| `name`              | `string[]`                    | `true`   | Must be a valid key path of `T`     |\n| `children`          | `ReactNode`                   | `false`  | React children                      |\n| `render`            | `(flags: T) => ReactNode`     | `false`  | Function that returns a `ReactNode` |\n| `fallbackRender`    | `(flags: T) => ReactNode`     | `false`  | Function that returns a `ReactNode` |\n| `component`         | `ComponentType<{ flags: T }>` | `false`  | React Component with `T` as props   |\n| `fallbackComponent` | `ComponentType<{ flags: T }>` | `false`  | React Component with `T` as props   |\n\nOrder of deciding which of these nodes to renders is as follows:\n\n- If the flag is `truthy`:\n  - render `children` if defined\n  - call `render` with `T` if defined _or_\n  - call `component` with `{flags: T}` if defined _else_\n  - return `null`\n- If the flag is `falsy`:\n  - call `fallbackRender` with `T` if defined _or_\n  - call `fallbackComponent` with `{ flags: T }` if defined _else_\n  - return `null`\n\n```tsx\n<Flag\n  name={[\"features\", \"useMyCoolNewThing\"]}\n  render={() => <div>Rendered on truthy</div>}\n  fallbackRender={() => <div>Rendered on falsy</div>}\n/>\n```\n\n### useFlags\n\nReturned as part of `createFlags()`. A React hook that returns all of the flags. Must be used in side of `FlagsProvider`.\n\n```tsx\n// my-component.tsx\n\nimport { useFlags } from \"./flags\";\n\nconst MyComponent = () => {\n  const flags = useFlags();\n\n  return <div>The API url is \"{flags.config.apiUrl}\"</div>;\n};\n```\n\n### useFlag\n\nReturned as part of `createFlags()`. A React hook to return a single flag. Must be used in side of `FlagsProvider`.\n\n| Args      | Type       | Required | Description                     |\n| --------- | ---------- | -------- | ------------------------------- |\n| `keyPath` | `string[]` | `true`   | Must be a valid key path of `T` |\n\n```tsx\n// my-component.tsx\n\nimport { useFlags } from \"./flags\";\n\nconst MyComponent = () => {\n  const apiUrl = useFlag([\"config\", \"apiUrl\"]);\n\n  return <div>The API url is \"{apiUrl}\"</div>;\n};\n```\n\n## Redux API\n\n### createFlagsReducer\n\nReturned as part of `createReduxBindings(...)`. Creates a reducer to be used in your Redux stores.\n\n| Args    | Type | Required | Description                     |\n| ------- | ---- | -------- | ------------------------------- |\n| `flags` | `T`  | `true`   | The initial value of your flags |\n\n```tsx\n// reducer.ts\n\nimport { combineReducers } from \"redux\";\nimport { Computable } from \"flag\";\nimport { createFlagsReducer, MyFlags } from \"./flags\";\nimport { otherReducer } from \"./other-reducer\";\n\nconst flags: Computable<MyFlags> = {\n  // ...\n};\n\nexport default combineReducers({\n  // 👇 must use the \"flags\" key of your state\n  flags: createFlagsReducer(flags),\n  other: otherReducer\n});\n```\n\n### getFlagsSelector\n\nA selector to retrieve _computed_ flags from Redux state. It is not enough to say `state.flags` because `createFlagsReducer` does not eagerly evaluate computable flags.\n(Though I suppose if you don't use any computable flags, then you don't necessarily need this 🤷‍♂️.)\n\n```tsx\n// reducer.ts\n\nimport { getFlagsSelector, MyFlags } from \"./flags\";\n\ntype State = {\n  flags: MyFlags;\n  // ...\n};\n\n// ...\n\nexport const getFlags = (state: State) => getFlagsSelector(state);\n```\n\n### ConnectedFlagsProvider\n\nReturned as part of `createReduxBindings(...)`. Wraps `FlagsProvider`, fetching the flags from Redux state.\n\n```tsx\nimport { Provider } from \"redux\";\nimport { MyApplication } from \"./app\";\nimport { ConnectedFlagsProvider } from \"./flags\";\nimport { store } from \"./store\";\n\nconst instance = (\n  <Provider store={store}>\n    <ConnectedFlagsProvider>\n      <MyApplication />\n    </ConnectedFlagsProvider>\n  </Provider>\n);\n\nReact.render(instance, document.querySelector(\"#app\"));\n```\n\n### setFlagsAction\n\nReturned as part of `createReduxBindings(...)`. A dispatchable action that sets flags. Merges a partial value of pre-computed flags with existing pre-computed flags.\n\n| Args    | Type            | Required | Description                |\n| ------- | --------------- | -------- | -------------------------- |\n| `flags` | `Computable<T>` | `true`   | Partial pre-computed flags |\n\n```tsx\nimport { Thunk } from \"redux-thunk\";\nimport { setFlagsAction } from \"./flags\";\n\nexport const someThunk: Thunk<any> = ({ dispatch }) => async () => {\n  const user = await fetchUser();\n\n  dispatch(setFlagsAction(user.flags));\n  // ...\n};\n```\n\n## License\n\nMPL-2.0\n","licenseText":"Copyright 2019 (c) Gabe Scholz\n\n# Mozilla Public License Version 2.0\n\n### 1. Definitions\n\n**1.1. “Contributor”**  \n means each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n**1.2. “Contributor Version”**  \n means the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n**1.3. “Contribution”**  \n means Covered Software of a particular Contributor.\n\n**1.4. “Covered Software”**  \n means Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n**1.5. “Incompatible With Secondary Licenses”**  \n means\n\n- **(a)** that the initial Contributor has attached the notice described\n  in Exhibit B to the Covered Software; or\n- **(b)** that the Covered Software was made available under the terms of\n  version 1.1 or earlier of the License, but not also under the\n  terms of a Secondary License.\n\n**1.6. “Executable Form”**  \n means any form of the work other than Source Code Form.\n\n**1.7. “Larger Work”**  \n means a work that combines Covered Software with other material, in\na separate file or files, that is not Covered Software.\n\n**1.8. “License”**  \n means this document.\n\n**1.9. “Licensable”**  \n means having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n**1.10. “Modifications”**  \n means any of the following:\n\n- **(a)** any file in Source Code Form that results from an addition to,\n  deletion from, or modification of the contents of Covered\n  Software; or\n- **(b)** any new file in Source Code Form that contains any Covered\n  Software.\n\n**1.11. “Patent Claims” of a Contributor**  \n means any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n**1.12. “Secondary License”**  \n means either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n**1.13. “Source Code Form”**  \n means the form of the work preferred for making modifications.\n\n**1.14. “You” (or “Your”)**  \n means an individual or a legal entity exercising rights under this\nLicense. For legal entities, “You” includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, “control” means **(a)** the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or **(b)** ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n### 2. License Grants and Conditions\n\n#### 2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n- **(a)** under intellectual property rights (other than patent or trademark)\n  Licensable by such Contributor to use, reproduce, make available,\n  modify, display, perform, distribute, and otherwise exploit its\n  Contributions, either on an unmodified basis, with Modifications, or\n  as part of a Larger Work; and\n- **(b)** under Patent Claims of such Contributor to make, use, sell, offer\n  for sale, have made, import, and otherwise transfer either its\n  Contributions or its Contributor Version.\n\n#### 2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n#### 2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n- **(a)** for any code that a Contributor has removed from Covered Software;\n  or\n- **(b)** for infringements caused by: **(i)** Your and any other third party's\n  modifications of Covered Software, or **(ii)** the combination of its\n  Contributions with other software (except as part of its Contributor\n  Version); or\n- **(c)** under Patent Claims infringed by Covered Software in the absence of\n  its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n#### 2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n#### 2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n#### 2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n#### 2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n### 3. Responsibilities\n\n#### 3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n#### 3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n- **(a)** such Covered Software must also be made available in Source Code\n  Form, as described in Section 3.1, and You must inform recipients of\n  the Executable Form how they can obtain a copy of such Source Code\n  Form by reasonable means in a timely manner, at a charge no more\n  than the cost of distribution to the recipient; and\n\n- **(b)** You may distribute such Executable Form under the terms of this\n  License, or sublicense it under different terms, provided that the\n  license for the Executable Form does not attempt to limit or alter\n  the recipients' rights in the Source Code Form under this License.\n\n#### 3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n#### 3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n#### 3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n### 4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: **(a)** comply with\nthe terms of this License to the maximum extent possible; and **(b)**\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n### 5. Termination\n\n**5.1.** The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated **(a)** provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and **(b)** on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n**5.2.** If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n### 6. Disclaimer of Warranty\n\n> Covered Software is provided under this License on an “as is”\n> basis, without warranty of any kind, either expressed, implied, or\n> statutory, including, without limitation, warranties that the\n> Covered Software is free of defects, merchantable, fit for a\n> particular purpose or non-infringing. The entire risk as to the\n> quality and performance of the Covered Software is with You.\n> Should any Covered Software prove defective in any respect, You\n> (not any Contributor) assume the cost of any necessary servicing,\n> repair, or correction. This disclaimer of warranty constitutes an\n> essential part of this License. No use of any Covered Software is\n> authorized under this License except under this disclaimer.\n\n### 7. Limitation of Liability\n\n> Under no circumstances and under no legal theory, whether tort\n> (including negligence), contract, or otherwise, shall any\n> Contributor, or anyone who distributes Covered Software as\n> permitted above, be liable to You for any direct, indirect,\n> special, incidental, or consequential damages of any character\n> including, without limitation, damages for lost profits, loss of\n> goodwill, work stoppage, computer failure or malfunction, or any\n> and all other commercial damages or losses, even if such party\n> shall have been informed of the possibility of such damages. This\n> limitation of liability shall not apply to liability for death or\n> personal injury resulting from such party's negligence to the\n> extent applicable law prohibits such limitation. Some\n> jurisdictions do not allow the exclusion or limitation of\n> incidental or consequential damages, so this exclusion and\n> limitation may not apply to You.\n\n### 8. Litigation\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n### 9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n### 10. Versions of the License\n\n#### 10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n#### 10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n#### 10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\n## Exhibit A - Source Code Form License Notice\n\n    This Source Code Form is subject to the terms of the Mozilla Public\n    License, v. 2.0. If a copy of the MPL was not distributed with this\n    file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\n## Exhibit B - “Incompatible With Secondary Licenses” Notice\n\n    This Source Code Form is \"Incompatible With Secondary Licenses\", as\n    defined by the Mozilla Public License, v. 2.0.\n","_id":"flag@4.4.0-0","dist":{"shasum":"98ddfa71a6368434f32b0b3bfa8de202dce980b7","tarball":"https://registry.npmjs.org/flag/-/flag-4.4.0-0.tgz","integrity":"sha512-vN7rTevo3fmI0VKy3Hx4cBWX6M96PLi3fSdFkOM8MyeigxtFXqfB1uc2ZGILVDZ/r2JaE48hlZSZ1fKwdJ6jOg==","fileCount":22,"unpackedSize":52220,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdU35LCRA9TVsSAnZWagAAFygQAIJOR7CpZ6xPebZJy6mM\n2HioWQii54/BrimxQLvqiDAtoIqVPxlz/o30LsAjB5CzC0MIYg83NIIwaYMu\n/bnBxRwCCrbNQnu8C7KByM4aN1IRWGsHT0608lFSBK8xCsk9dXEnIMpqy+bk\nTl1VreGKU36nC2gfkBrj4ikLDb86mOZSTdIf3YkLxUSIOHnww6npr4gLwP0G\npLZBxNSAFNMX/f+E/8vNqLQ4K9AOpLH4jwQhHTbd9BuOrIgSPGqSArgofoCO\nuyKazqwjWzKCpe+vv/3KY1Dr3BnE6evxpIrEFWC3N9fWrRV+O2/HNwBMTMmt\nluYermlGvRXxX3uIV6wKXu0delRYbewmqorHFQv0yzqcOeSalxIO5qBkIZbB\nHHiZFsw7CUwrwsd6C4i8ar1vFvdzBCtJVmkq5HPwRoRCi6F0oYaLnMKmqk0t\n8Qc0vnvPRvtAuxOGCXm2fXDI3SRe0WQaze5hGgJuRaF+1J1nFq9lK1IwbX9e\nlWkqtlGQGaNYVfyNHEBoghTmkEXLXx1KrlmMq6Dos/j6u0cWzZPMHhMNz0Aq\n0gIv2D+22E/3sfnvaQqrVpAKSuamIbFYOhsejKLmftOJMDgE2uHEUfmDRxwR\nVlyWE41DSNl8nBYCoFii+70DAQo3EBrULhedhuzjSaYDMNssvIQKg6FWPNi9\ncrpK\r\n=yMoa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBpZnWIE9ZtCAv20Gg8EJBsskydbxIc852OaDhZI973XAiBKp184XBCEHImkC0g9T7ZcqbPN0U4+kavQ2uVPg8lIoA=="}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag_4.4.0-0_1565752906764_0.02203302801321727"},"_hasShrinkwrap":false},"4.4.0":{"name":"flag","version":"4.4.0","description":"Feature flagging made easy for React and Redux","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"https://github.com/garbles/flag"},"author":{"name":"Gabe Scholz"},"license":"MPL-2.0","devDependencies":{"@types/enzyme":"^3.9.1","@types/invariant":"^2.2.30","@types/jest":"^24.0.11","@types/lodash":"^4.14.123","@types/react":"^16.8.12","@types/react-dom":"^16.8.3","@types/react-redux":"^7.0.7","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.12.1","jest":"^24.7.1","np":"^4.0.2","react":"^16.8.6","react-dom":"^16.8.6","react-redux":"^7.0.2","ts-jest":"^24.0.1","typescript":"^3.5.3"},"dependencies":{"deep-computed":"^0.2.0","invariant":"^2.2.4","lodash":"^4.17.11","useful-types":"^0.4.0"},"peerDependencies":{"@types/react":"^16.8.0","@types/react-dom":"^16.8.0","react":"^16.8.0","react-dom":"^16.8.0","react-redux":"^5.0.0 || ^6.0.0 || ^7.0.0","redux":"^2.0.0 || ^3.0.0 || ^4.0.0"},"scripts":{"clean":"rm -rf build","build":"tsc","prepublish":"yarn clean && yarn build","test":"jest","pub":"np"},"licenseText":"Copyright 2019 (c) Gabe Scholz\n\n# Mozilla Public License Version 2.0\n\n### 1. Definitions\n\n**1.1. “Contributor”**  \n means each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n**1.2. “Contributor Version”**  \n means the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n**1.3. “Contribution”**  \n means Covered Software of a particular Contributor.\n\n**1.4. “Covered Software”**  \n means Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n**1.5. “Incompatible With Secondary Licenses”**  \n means\n\n- **(a)** that the initial Contributor has attached the notice described\n  in Exhibit B to the Covered Software; or\n- **(b)** that the Covered Software was made available under the terms of\n  version 1.1 or earlier of the License, but not also under the\n  terms of a Secondary License.\n\n**1.6. “Executable Form”**  \n means any form of the work other than Source Code Form.\n\n**1.7. “Larger Work”**  \n means a work that combines Covered Software with other material, in\na separate file or files, that is not Covered Software.\n\n**1.8. “License”**  \n means this document.\n\n**1.9. “Licensable”**  \n means having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n**1.10. “Modifications”**  \n means any of the following:\n\n- **(a)** any file in Source Code Form that results from an addition to,\n  deletion from, or modification of the contents of Covered\n  Software; or\n- **(b)** any new file in Source Code Form that contains any Covered\n  Software.\n\n**1.11. “Patent Claims” of a Contributor**  \n means any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n**1.12. “Secondary License”**  \n means either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n**1.13. “Source Code Form”**  \n means the form of the work preferred for making modifications.\n\n**1.14. “You” (or “Your”)**  \n means an individual or a legal entity exercising rights under this\nLicense. For legal entities, “You” includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, “control” means **(a)** the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or **(b)** ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n### 2. License Grants and Conditions\n\n#### 2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n- **(a)** under intellectual property rights (other than patent or trademark)\n  Licensable by such Contributor to use, reproduce, make available,\n  modify, display, perform, distribute, and otherwise exploit its\n  Contributions, either on an unmodified basis, with Modifications, or\n  as part of a Larger Work; and\n- **(b)** under Patent Claims of such Contributor to make, use, sell, offer\n  for sale, have made, import, and otherwise transfer either its\n  Contributions or its Contributor Version.\n\n#### 2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n#### 2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n- **(a)** for any code that a Contributor has removed from Covered Software;\n  or\n- **(b)** for infringements caused by: **(i)** Your and any other third party's\n  modifications of Covered Software, or **(ii)** the combination of its\n  Contributions with other software (except as part of its Contributor\n  Version); or\n- **(c)** under Patent Claims infringed by Covered Software in the absence of\n  its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n#### 2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n#### 2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n#### 2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n#### 2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n### 3. Responsibilities\n\n#### 3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n#### 3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n- **(a)** such Covered Software must also be made available in Source Code\n  Form, as described in Section 3.1, and You must inform recipients of\n  the Executable Form how they can obtain a copy of such Source Code\n  Form by reasonable means in a timely manner, at a charge no more\n  than the cost of distribution to the recipient; and\n\n- **(b)** You may distribute such Executable Form under the terms of this\n  License, or sublicense it under different terms, provided that the\n  license for the Executable Form does not attempt to limit or alter\n  the recipients' rights in the Source Code Form under this License.\n\n#### 3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n#### 3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n#### 3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n### 4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: **(a)** comply with\nthe terms of this License to the maximum extent possible; and **(b)**\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n### 5. Termination\n\n**5.1.** The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated **(a)** provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and **(b)** on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n**5.2.** If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n### 6. Disclaimer of Warranty\n\n> Covered Software is provided under this License on an “as is”\n> basis, without warranty of any kind, either expressed, implied, or\n> statutory, including, without limitation, warranties that the\n> Covered Software is free of defects, merchantable, fit for a\n> particular purpose or non-infringing. The entire risk as to the\n> quality and performance of the Covered Software is with You.\n> Should any Covered Software prove defective in any respect, You\n> (not any Contributor) assume the cost of any necessary servicing,\n> repair, or correction. This disclaimer of warranty constitutes an\n> essential part of this License. No use of any Covered Software is\n> authorized under this License except under this disclaimer.\n\n### 7. Limitation of Liability\n\n> Under no circumstances and under no legal theory, whether tort\n> (including negligence), contract, or otherwise, shall any\n> Contributor, or anyone who distributes Covered Software as\n> permitted above, be liable to You for any direct, indirect,\n> special, incidental, or consequential damages of any character\n> including, without limitation, damages for lost profits, loss of\n> goodwill, work stoppage, computer failure or malfunction, or any\n> and all other commercial damages or losses, even if such party\n> shall have been informed of the possibility of such damages. This\n> limitation of liability shall not apply to liability for death or\n> personal injury resulting from such party's negligence to the\n> extent applicable law prohibits such limitation. Some\n> jurisdictions do not allow the exclusion or limitation of\n> incidental or consequential damages, so this exclusion and\n> limitation may not apply to You.\n\n### 8. Litigation\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n### 9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n### 10. Versions of the License\n\n#### 10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n#### 10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n#### 10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\n## Exhibit A - Source Code Form License Notice\n\n    This Source Code Form is subject to the terms of the Mozilla Public\n    License, v. 2.0. If a copy of the MPL was not distributed with this\n    file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\n## Exhibit B - “Incompatible With Secondary Licenses” Notice\n\n    This Source Code Form is \"Incompatible With Secondary Licenses\", as\n    defined by the Mozilla Public License, v. 2.0.\n","_id":"flag@4.4.0","dist":{"shasum":"03e4fc623348c4edf5db20c491b37e09fed0e125","tarball":"https://registry.npmjs.org/flag/-/flag-4.4.0.tgz","integrity":"sha512-dDqpnanBhtjcD+BLkYy4KDuv98MpIj1nU2CYHhh1c2FMRbiG3rqI7vfKE0jyJVsuN1HcduhwRhaqEgJjhvZvDw==","fileCount":22,"unpackedSize":52218,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgWZCCRA9TVsSAnZWagAAz+YP/1RsxGWr8YPQTlQnMRXU\n1sxLsOy7OV0b7/KvYoNoZPtvqFCCbbAnHSrk8lwPz0EmT/SkhNNAoInDrReD\nc4kWqpxPsDtuGvmrRC8Xh0owcFsxSpEoblbr1oY3z1M2zzP3Xm+SVLIbwf4p\nMyqoqY56GrOHWOaW+8GuUCVdcIDiupGowZFCmQSQtv0XI5HMiraSsa0q6sdv\nLSV++TUqF9ddHRU7TL289T7N7fzqbVBuNfYatHZ1qjPy4Hp0Gd/PyZNjUs1/\nk2kSPzpGdI5OCz33B0pZkWawk2yzU4o/Loe4dONyocfIcmrQkzLCMLt18jUV\n38vEuYH36ib8827WCI5eLw0SIAmeugLGz5uMd61pdAtvnuSYgn1xDGeQkYJt\nU8U9RXTIaPNGOfYiqiarMgkzpVYxXolDh6MebHzxxxdl8wj+LRfTQ+FBc97F\nulgz20o4lYJYmhB0SAXGfP3JtiNFdWNKRlT/DDD9fyRWj4+rC8jKtEJqMAEx\nGSbEezPz13XXiD3LPgL7pIxqkIgo389VLOcV7FtM494L8ObCvciMMI83nd/O\nMb2DNGTFy8Dkfeftn35M2EF8BqFUfsBYOiXSdopab5VbkjZ4dCYtvUsamaSH\nBExKvr9BP7VuaH9WtaRBplYlVKhq9U59XWBTLveFvQG4hwf6/HToxEHpB1FD\n91hP\r\n=TSky\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHWPN+HjYKve2t3RADn0pQ3crqrKNSXUvVih7b8KjaHBAiBs/NL+rF847yxb1JyJ1M9dLrwr+LJLehblthRUfF1VNQ=="}]},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag_4.4.0_1568761409463_0.5252444714715514"},"_hasShrinkwrap":false},"5.0.0-alpha.0":{"name":"flag","version":"5.0.0-alpha.0","description":"Strictly typed feature flagging for React","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","sideEffects":false,"repository":{"type":"git","url":"https://github.com/garbles/flag"},"author":{"name":"Gabe Scholz"},"license":"MPL-2.0","devDependencies":{"@testing-library/react":"^13.0.0","@types/jest":"^27.4.1","@types/node":"^17.0.23","jest":"^27.5.1","react":"^18.0.0","react-dom":"^18.0.0","ts-jest":"^27.1.4","tsup":"^5.12.5","typescript":"^4.6.3"},"dependencies":{"@types/react":"^18.0.5","async-ref":"^0.1.6"},"peerDependencies":{"react":"^18"},"scripts":{"test":"jest","build":"tsup","prepublishOnly":"jest && tsc && tsup"},"licenseText":"Copyright 2022 (c) Gabe Scholz\n\n# Mozilla Public License Version 2.0\n\n### 1. Definitions\n\n**1.1. “Contributor”**  \n means each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n**1.2. “Contributor Version”**  \n means the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n**1.3. “Contribution”**  \n means Covered Software of a particular Contributor.\n\n**1.4. “Covered Software”**  \n means Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n**1.5. “Incompatible With Secondary Licenses”**  \n means\n\n- **(a)** that the initial Contributor has attached the notice described\n  in Exhibit B to the Covered Software; or\n- **(b)** that the Covered Software was made available under the terms of\n  version 1.1 or earlier of the License, but not also under the\n  terms of a Secondary License.\n\n**1.6. “Executable Form”**  \n means any form of the work other than Source Code Form.\n\n**1.7. “Larger Work”**  \n means a work that combines Covered Software with other material, in\na separate file or files, that is not Covered Software.\n\n**1.8. “License”**  \n means this document.\n\n**1.9. “Licensable”**  \n means having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n**1.10. “Modifications”**  \n means any of the following:\n\n- **(a)** any file in Source Code Form that results from an addition to,\n  deletion from, or modification of the contents of Covered\n  Software; or\n- **(b)** any new file in Source Code Form that contains any Covered\n  Software.\n\n**1.11. “Patent Claims” of a Contributor**  \n means any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n**1.12. “Secondary License”**  \n means either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n**1.13. “Source Code Form”**  \n means the form of the work preferred for making modifications.\n\n**1.14. “You” (or “Your”)**  \n means an individual or a legal entity exercising rights under this\nLicense. For legal entities, “You” includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, “control” means **(a)** the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or **(b)** ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n### 2. License Grants and Conditions\n\n#### 2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n- **(a)** under intellectual property rights (other than patent or trademark)\n  Licensable by such Contributor to use, reproduce, make available,\n  modify, display, perform, distribute, and otherwise exploit its\n  Contributions, either on an unmodified basis, with Modifications, or\n  as part of a Larger Work; and\n- **(b)** under Patent Claims of such Contributor to make, use, sell, offer\n  for sale, have made, import, and otherwise transfer either its\n  Contributions or its Contributor Version.\n\n#### 2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n#### 2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n- **(a)** for any code that a Contributor has removed from Covered Software;\n  or\n- **(b)** for infringements caused by: **(i)** Your and any other third party's\n  modifications of Covered Software, or **(ii)** the combination of its\n  Contributions with other software (except as part of its Contributor\n  Version); or\n- **(c)** under Patent Claims infringed by Covered Software in the absence of\n  its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n#### 2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n#### 2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n#### 2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n#### 2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n### 3. Responsibilities\n\n#### 3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n#### 3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n- **(a)** such Covered Software must also be made available in Source Code\n  Form, as described in Section 3.1, and You must inform recipients of\n  the Executable Form how they can obtain a copy of such Source Code\n  Form by reasonable means in a timely manner, at a charge no more\n  than the cost of distribution to the recipient; and\n\n- **(b)** You may distribute such Executable Form under the terms of this\n  License, or sublicense it under different terms, provided that the\n  license for the Executable Form does not attempt to limit or alter\n  the recipients' rights in the Source Code Form under this License.\n\n#### 3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n#### 3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n#### 3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n### 4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: **(a)** comply with\nthe terms of this License to the maximum extent possible; and **(b)**\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n### 5. Termination\n\n**5.1.** The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated **(a)** provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and **(b)** on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n**5.2.** If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n### 6. Disclaimer of Warranty\n\n> Covered Software is provided under this License on an “as is”\n> basis, without warranty of any kind, either expressed, implied, or\n> statutory, including, without limitation, warranties that the\n> Covered Software is free of defects, merchantable, fit for a\n> particular purpose or non-infringing. The entire risk as to the\n> quality and performance of the Covered Software is with You.\n> Should any Covered Software prove defective in any respect, You\n> (not any Contributor) assume the cost of any necessary servicing,\n> repair, or correction. This disclaimer of warranty constitutes an\n> essential part of this License. No use of any Covered Software is\n> authorized under this License except under this disclaimer.\n\n### 7. Limitation of Liability\n\n> Under no circumstances and under no legal theory, whether tort\n> (including negligence), contract, or otherwise, shall any\n> Contributor, or anyone who distributes Covered Software as\n> permitted above, be liable to You for any direct, indirect,\n> special, incidental, or consequential damages of any character\n> including, without limitation, damages for lost profits, loss of\n> goodwill, work stoppage, computer failure or malfunction, or any\n> and all other commercial damages or losses, even if such party\n> shall have been informed of the possibility of such damages. This\n> limitation of liability shall not apply to liability for death or\n> personal injury resulting from such party's negligence to the\n> extent applicable law prohibits such limitation. Some\n> jurisdictions do not allow the exclusion or limitation of\n> incidental or consequential damages, so this exclusion and\n> limitation may not apply to You.\n\n### 8. Litigation\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n### 9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n### 10. Versions of the License\n\n#### 10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n#### 10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n#### 10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\n## Exhibit A - Source Code Form License Notice\n\n    This Source Code Form is subject to the terms of the Mozilla Public\n    License, v. 2.0. If a copy of the MPL was not distributed with this\n    file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\n## Exhibit B - “Incompatible With Secondary Licenses” Notice\n\n    This Source Code Form is \"Incompatible With Secondary Licenses\", as\n    defined by the Mozilla Public License, v. 2.0.\n","_id":"flag@5.0.0-alpha.0","dist":{"shasum":"ce2d7c33b47ef554953a2de41ad7e592cfc4404b","integrity":"sha512-mVO2ptr9WSHUX9d09bVibfq76MGlGXY09NtkGrU6Et14OEzck+JbKtpStQv4uwQ/9FmyKsNx/iz+7PyCupRWTA==","tarball":"https://registry.npmjs.org/flag/-/flag-5.0.0-alpha.0.tgz","fileCount":28,"unpackedSize":50317,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDuUluYoYEnECb7D+HUSDkxHJaHArRaCAuxpcB7p7s4GAiEAu/kp9Pe+V/VoSOp+vmgyaP5JNVXuJyxOcYtRNhTm2yc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiX7OuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo5NxAAjFTtWGCFiVwltyZwrSErCDW1l5RAl+A8if70r692H4445AZ/\r\nKZtinYGA4SoC3aXy1Q8Ro1PesKki4O4P4SUxUC6n9+3dmkIYqbzo3mp4qTaA\r\nn7R3f3DhYWUHFzLId2yCBuiIWCxUdrUOexVJk7Y+lgRbkL0QCI0d4DsQ2wEt\r\nVkWPEHx2Yg0NW4sX6wrNIj+FrX4wwvBSxM4E1XBxFATXZBluTVwtSKdpONqc\r\nAasysVEudCmw8gk2n+JPHiRo5JRa6r5d9ZOli8kkK0wZZPkg4j524GGf7oPB\r\nC3zSrcVm+omG/TAsslZp7c8jiVXESJP53Pa6wUlZU8bn0xttqurPMp2YpuNh\r\n0jxJb1XqUOI+M9oQx0kgtJMMW1mgI1qCQLpCaIvGs3hGlG3aFWU/OB5PtK83\r\n2sNrG3gJWig5dbNTALDwqgm0+4ci/4eggIEHEKHp2hsliBzaOuXbn09wJMIH\r\ngJ4szOk5/NIdcL++4/VtGwA7y2uGmpCSWtGybT6ZjrIM4hLr1AjrS6dUVeHA\r\nglFP2v+OjCvAn6BlLlMsLwRUVWe5rAZ+L2B//rNoq7EFb0Sj2XD8sFQl25YB\r\n5e94LAX8rQAKBCrNbLmtAYoM7XXFw6WDzRSuxsswbGFn/GBfrpvsWZ28ceBY\r\nAun2euAIePRhWR+eO3ni33/1RTpvkQNbfg0=\r\n=Jmsd\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"directories":{},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag_5.0.0-alpha.0_1650439085925_0.7977465576500764"},"_hasShrinkwrap":false},"5.0.0":{"name":"flag","version":"5.0.0","description":"Strictly typed feature flagging for React","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","sideEffects":false,"repository":{"type":"git","url":"https://github.com/garbles/flag"},"author":{"name":"Gabe Scholz"},"license":"MPL-2.0","devDependencies":{"@testing-library/react":"^13.0.0","@types/jest":"^27.4.1","@types/node":"^17.0.23","jest":"^27.5.1","react":"^18.0.0","react-dom":"^18.0.0","ts-jest":"^27.1.4","tsup":"^5.12.5","typescript":"^4.6.3"},"dependencies":{"@types/react":"^18.0.5","async-ref":"^0.1.6"},"peerDependencies":{"react":"^18"},"scripts":{"test":"jest","build":"tsup","prepublishOnly":"jest && tsc && tsup"},"licenseText":"Copyright 2022 (c) Gabe Scholz\n\n# Mozilla Public License Version 2.0\n\n### 1. Definitions\n\n**1.1. “Contributor”**  \n means each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n**1.2. “Contributor Version”**  \n means the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n**1.3. “Contribution”**  \n means Covered Software of a particular Contributor.\n\n**1.4. “Covered Software”**  \n means Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n**1.5. “Incompatible With Secondary Licenses”**  \n means\n\n- **(a)** that the initial Contributor has attached the notice described\n  in Exhibit B to the Covered Software; or\n- **(b)** that the Covered Software was made available under the terms of\n  version 1.1 or earlier of the License, but not also under the\n  terms of a Secondary License.\n\n**1.6. “Executable Form”**  \n means any form of the work other than Source Code Form.\n\n**1.7. “Larger Work”**  \n means a work that combines Covered Software with other material, in\na separate file or files, that is not Covered Software.\n\n**1.8. “License”**  \n means this document.\n\n**1.9. “Licensable”**  \n means having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n**1.10. “Modifications”**  \n means any of the following:\n\n- **(a)** any file in Source Code Form that results from an addition to,\n  deletion from, or modification of the contents of Covered\n  Software; or\n- **(b)** any new file in Source Code Form that contains any Covered\n  Software.\n\n**1.11. “Patent Claims” of a Contributor**  \n means any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n**1.12. “Secondary License”**  \n means either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n**1.13. “Source Code Form”**  \n means the form of the work preferred for making modifications.\n\n**1.14. “You” (or “Your”)**  \n means an individual or a legal entity exercising rights under this\nLicense. For legal entities, “You” includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, “control” means **(a)** the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or **(b)** ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n### 2. License Grants and Conditions\n\n#### 2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n- **(a)** under intellectual property rights (other than patent or trademark)\n  Licensable by such Contributor to use, reproduce, make available,\n  modify, display, perform, distribute, and otherwise exploit its\n  Contributions, either on an unmodified basis, with Modifications, or\n  as part of a Larger Work; and\n- **(b)** under Patent Claims of such Contributor to make, use, sell, offer\n  for sale, have made, import, and otherwise transfer either its\n  Contributions or its Contributor Version.\n\n#### 2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n#### 2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n- **(a)** for any code that a Contributor has removed from Covered Software;\n  or\n- **(b)** for infringements caused by: **(i)** Your and any other third party's\n  modifications of Covered Software, or **(ii)** the combination of its\n  Contributions with other software (except as part of its Contributor\n  Version); or\n- **(c)** under Patent Claims infringed by Covered Software in the absence of\n  its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n#### 2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n#### 2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n#### 2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n#### 2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n### 3. Responsibilities\n\n#### 3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n#### 3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n- **(a)** such Covered Software must also be made available in Source Code\n  Form, as described in Section 3.1, and You must inform recipients of\n  the Executable Form how they can obtain a copy of such Source Code\n  Form by reasonable means in a timely manner, at a charge no more\n  than the cost of distribution to the recipient; and\n\n- **(b)** You may distribute such Executable Form under the terms of this\n  License, or sublicense it under different terms, provided that the\n  license for the Executable Form does not attempt to limit or alter\n  the recipients' rights in the Source Code Form under this License.\n\n#### 3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n#### 3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n#### 3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n### 4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: **(a)** comply with\nthe terms of this License to the maximum extent possible; and **(b)**\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n### 5. Termination\n\n**5.1.** The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated **(a)** provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and **(b)** on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n**5.2.** If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n### 6. Disclaimer of Warranty\n\n> Covered Software is provided under this License on an “as is”\n> basis, without warranty of any kind, either expressed, implied, or\n> statutory, including, without limitation, warranties that the\n> Covered Software is free of defects, merchantable, fit for a\n> particular purpose or non-infringing. The entire risk as to the\n> quality and performance of the Covered Software is with You.\n> Should any Covered Software prove defective in any respect, You\n> (not any Contributor) assume the cost of any necessary servicing,\n> repair, or correction. This disclaimer of warranty constitutes an\n> essential part of this License. No use of any Covered Software is\n> authorized under this License except under this disclaimer.\n\n### 7. Limitation of Liability\n\n> Under no circumstances and under no legal theory, whether tort\n> (including negligence), contract, or otherwise, shall any\n> Contributor, or anyone who distributes Covered Software as\n> permitted above, be liable to You for any direct, indirect,\n> special, incidental, or consequential damages of any character\n> including, without limitation, damages for lost profits, loss of\n> goodwill, work stoppage, computer failure or malfunction, or any\n> and all other commercial damages or losses, even if such party\n> shall have been informed of the possibility of such damages. This\n> limitation of liability shall not apply to liability for death or\n> personal injury resulting from such party's negligence to the\n> extent applicable law prohibits such limitation. Some\n> jurisdictions do not allow the exclusion or limitation of\n> incidental or consequential damages, so this exclusion and\n> limitation may not apply to You.\n\n### 8. Litigation\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n### 9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n### 10. Versions of the License\n\n#### 10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n#### 10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n#### 10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\n## Exhibit A - Source Code Form License Notice\n\n    This Source Code Form is subject to the terms of the Mozilla Public\n    License, v. 2.0. If a copy of the MPL was not distributed with this\n    file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\n## Exhibit B - “Incompatible With Secondary Licenses” Notice\n\n    This Source Code Form is \"Incompatible With Secondary Licenses\", as\n    defined by the Mozilla Public License, v. 2.0.\n","_id":"flag@5.0.0","dist":{"shasum":"8467b3d8ffc269c8d68be568b1f136b35a6575c1","integrity":"sha512-FssUvWxwmP9hw7BWSTIvWm3nCFtRG1/dkYBKge42m6hR9wgj9WIAnYcn/6zfkGJ+mwZdU4QyORvmxEmwLh/Kug==","tarball":"https://registry.npmjs.org/flag/-/flag-5.0.0.tgz","fileCount":28,"unpackedSize":94279,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYDfjYUqBB6wB+n0MJObCuLvqpAoY1ApDT7yomWfAjQwIgYR9CgIzCjJs6lEwQJLdJLq+OyQw4TZGFfF5mj6On9Lk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYEvSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqplhAAi1RkKjHx8osOhgQBGPMr/3XRQyA0eYjKWHyId6a/E3KyOhmJ\r\nWDx5cwrLSkDOoxkGQVpUPqanQJ13ZV/z4nVWQ74MzNsjA6LajECKqGa3JtSm\r\nXJZkt2iwIk+GW98CiNi7l9lJs++/ZDpD2KlKGJ4tDWjXG031lsN8ePfBsX8b\r\nPVl4kvwXsdsQTn8ogEcgiMFazf+CRTgHwNEeHyacVTsoEfiXiLsasCU7CLZT\r\npjcJYhK8DSbVf4c6VFdhFAntWM13CdqLDceH0Jq7YqpCgA4EYeMtvCxsWYgW\r\nzpeNHEXb+YXOxiwL/1EuXKcvM1CVT62mqm34UyU3pQE9VKO7vZACizoBLb3m\r\nbC75fss13QTJzLB89bx9jbc8vkxY4NeNZ1nhmrmce2aiXopnPY29tjRe52eO\r\nvTWBXp1XJkO0uSoF33QRjF2moivCxmuzHnY+uhcGwToCtWZOncihE7zt2Nuz\r\njyU2f2pqJhCMAlpo1D8OoBcS3SuvYXNzWOHabPBjMwMQZWpaYUGvgOIIOrCh\r\nHi44cUr6juj/KcVXHo9c+VzD6PE8RglIJ/KF8RlFWg/6rDkJDXDic4wD0OwC\r\nBHVDSLAvCyFPhUybmPYoLvLpbc/NnbFxAN1P8Cae+NpXd3FhK6Ij0eneNiHt\r\nJxoWVhB2XdztuDeEm7DkVzNTIybRGA2JCrY=\r\n=luBu\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"directories":{},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag_5.0.0_1650478033940_0.7918619702248173"},"_hasShrinkwrap":false},"5.0.1":{"name":"flag","version":"5.0.1","description":"Strictly typed feature flagging for React","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","sideEffects":false,"repository":{"type":"git","url":"https://github.com/garbles/flag"},"author":{"name":"Gabe Scholz"},"license":"MPL-2.0","devDependencies":{"@testing-library/react":"^13.0.0","@types/jest":"^27.4.1","@types/node":"^17.0.23","jest":"^27.5.1","react":"^18.0.0","react-dom":"^18.0.0","ts-jest":"^27.1.4","tsup":"^5.12.5","typescript":"^4.6.3"},"dependencies":{"@types/react":"^18.0.5","async-ref":"^0.1.6"},"peerDependencies":{"react":"^18"},"scripts":{"test":"jest","build":"tsup","prepublishOnly":"jest && tsc && tsup"},"licenseText":"Copyright 2022 (c) Gabe Scholz\n\n# Mozilla Public License Version 2.0\n\n### 1. Definitions\n\n**1.1. “Contributor”**  \n means each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n**1.2. “Contributor Version”**  \n means the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n**1.3. “Contribution”**  \n means Covered Software of a particular Contributor.\n\n**1.4. “Covered Software”**  \n means Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n**1.5. “Incompatible With Secondary Licenses”**  \n means\n\n- **(a)** that the initial Contributor has attached the notice described\n  in Exhibit B to the Covered Software; or\n- **(b)** that the Covered Software was made available under the terms of\n  version 1.1 or earlier of the License, but not also under the\n  terms of a Secondary License.\n\n**1.6. “Executable Form”**  \n means any form of the work other than Source Code Form.\n\n**1.7. “Larger Work”**  \n means a work that combines Covered Software with other material, in\na separate file or files, that is not Covered Software.\n\n**1.8. “License”**  \n means this document.\n\n**1.9. “Licensable”**  \n means having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n**1.10. “Modifications”**  \n means any of the following:\n\n- **(a)** any file in Source Code Form that results from an addition to,\n  deletion from, or modification of the contents of Covered\n  Software; or\n- **(b)** any new file in Source Code Form that contains any Covered\n  Software.\n\n**1.11. “Patent Claims” of a Contributor**  \n means any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n**1.12. “Secondary License”**  \n means either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n**1.13. “Source Code Form”**  \n means the form of the work preferred for making modifications.\n\n**1.14. “You” (or “Your”)**  \n means an individual or a legal entity exercising rights under this\nLicense. For legal entities, “You” includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, “control” means **(a)** the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or **(b)** ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n### 2. License Grants and Conditions\n\n#### 2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n- **(a)** under intellectual property rights (other than patent or trademark)\n  Licensable by such Contributor to use, reproduce, make available,\n  modify, display, perform, distribute, and otherwise exploit its\n  Contributions, either on an unmodified basis, with Modifications, or\n  as part of a Larger Work; and\n- **(b)** under Patent Claims of such Contributor to make, use, sell, offer\n  for sale, have made, import, and otherwise transfer either its\n  Contributions or its Contributor Version.\n\n#### 2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n#### 2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n- **(a)** for any code that a Contributor has removed from Covered Software;\n  or\n- **(b)** for infringements caused by: **(i)** Your and any other third party's\n  modifications of Covered Software, or **(ii)** the combination of its\n  Contributions with other software (except as part of its Contributor\n  Version); or\n- **(c)** under Patent Claims infringed by Covered Software in the absence of\n  its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n#### 2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n#### 2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n#### 2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n#### 2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n### 3. Responsibilities\n\n#### 3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n#### 3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n- **(a)** such Covered Software must also be made available in Source Code\n  Form, as described in Section 3.1, and You must inform recipients of\n  the Executable Form how they can obtain a copy of such Source Code\n  Form by reasonable means in a timely manner, at a charge no more\n  than the cost of distribution to the recipient; and\n\n- **(b)** You may distribute such Executable Form under the terms of this\n  License, or sublicense it under different terms, provided that the\n  license for the Executable Form does not attempt to limit or alter\n  the recipients' rights in the Source Code Form under this License.\n\n#### 3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n#### 3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n#### 3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n### 4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: **(a)** comply with\nthe terms of this License to the maximum extent possible; and **(b)**\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n### 5. Termination\n\n**5.1.** The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated **(a)** provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and **(b)** on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n**5.2.** If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n### 6. Disclaimer of Warranty\n\n> Covered Software is provided under this License on an “as is”\n> basis, without warranty of any kind, either expressed, implied, or\n> statutory, including, without limitation, warranties that the\n> Covered Software is free of defects, merchantable, fit for a\n> particular purpose or non-infringing. The entire risk as to the\n> quality and performance of the Covered Software is with You.\n> Should any Covered Software prove defective in any respect, You\n> (not any Contributor) assume the cost of any necessary servicing,\n> repair, or correction. This disclaimer of warranty constitutes an\n> essential part of this License. No use of any Covered Software is\n> authorized under this License except under this disclaimer.\n\n### 7. Limitation of Liability\n\n> Under no circumstances and under no legal theory, whether tort\n> (including negligence), contract, or otherwise, shall any\n> Contributor, or anyone who distributes Covered Software as\n> permitted above, be liable to You for any direct, indirect,\n> special, incidental, or consequential damages of any character\n> including, without limitation, damages for lost profits, loss of\n> goodwill, work stoppage, computer failure or malfunction, or any\n> and all other commercial damages or losses, even if such party\n> shall have been informed of the possibility of such damages. This\n> limitation of liability shall not apply to liability for death or\n> personal injury resulting from such party's negligence to the\n> extent applicable law prohibits such limitation. Some\n> jurisdictions do not allow the exclusion or limitation of\n> incidental or consequential damages, so this exclusion and\n> limitation may not apply to You.\n\n### 8. Litigation\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n### 9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n### 10. Versions of the License\n\n#### 10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n#### 10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n#### 10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\n## Exhibit A - Source Code Form License Notice\n\n    This Source Code Form is subject to the terms of the Mozilla Public\n    License, v. 2.0. If a copy of the MPL was not distributed with this\n    file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\n## Exhibit B - “Incompatible With Secondary Licenses” Notice\n\n    This Source Code Form is \"Incompatible With Secondary Licenses\", as\n    defined by the Mozilla Public License, v. 2.0.\n","_id":"flag@5.0.1","dist":{"shasum":"31214fcbe275ea38f088ac6bf52d08f50616bfcb","integrity":"sha512-4P/rvPGKcFBneboyYHMOKbKaJL5ZhNjScbY7bGToas7FgBvrTWbh76yxRaoSoFe3HSjWc6IJ0EajUwSadcP6Lg==","tarball":"https://registry.npmjs.org/flag/-/flag-5.0.1.tgz","fileCount":28,"unpackedSize":95857,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGpcJi0NYJO4d5S+sQ/kJ6F1iRhQDMvykzporeX4S0MgIgEKZH1go78Bq2s4aN8UKkIFaZFQp/yMiLbNXX8kW7EAw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYFJJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoLvg/8CrEv8NILU92YBt2e7MKObvVqeGqVC/pb8xUi5armwHANLaOI\r\nGGSETQWsH5Oj/5nB6m1qGkQfkWsU1le1fTZ7esDtWk5Hn1CyOc+Ts0xvhNdC\r\nVD93H8mjVsyZf48p+unpHg0shInm7rk2JAY6X50z7/VDBjrrxlyd2NnSsF+i\r\nSvI1wTHo62niE5OhCFOJGfc8sAO2sjJdMouNQ3A/ISbblcUTNOeiNWHx7L0K\r\nthXt+Gpsd7G+HDdX3oEaIlQBE5wtCf2uIz680MW4uR0i+HYde2JonJIDftOv\r\nbxvVJWeY30cieI9IRWzDAcBo8zVJ8oW6hPYxYVF6FUcGHh1M5xlR6KFELOgA\r\ni8KTAPGCSeaOXXruySt2GiT9g3ZwP2fhJzVpKjNppcrwEFeA5Daq+y37vCvG\r\nzO4ahL5G/dlukCuDn0CQ3lmjn+PmfTtJZoiK/lXRGPqnfa9NnfpGH6MLCwt4\r\nOkl+JSgOnCIpikr4bTOmDSPaZzTRwMDgzsOrV027wxHHzwshrhbxcT8Oxpxg\r\nT14bvxfaGSaxf4X3PyZZz0wT852+rR/48Wc3b4EFZvplN886wq4SDECeXb/V\r\nDESviZ/O68nm1C6Mhhl1+uGE0e+htWT8LF+6D+GxDdZIoa5QJNuCMFQCL/oy\r\nj5xW457Z2JfVEhMrpfderH53069qq0PvsZU=\r\n=qzk2\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"garbles","email":"scholz.gabe@gmail.com"},"directories":{},"maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flag_5.0.1_1650479689240_0.1308336251899409"},"_hasShrinkwrap":false}},"readme":"# Flag\n\nThis library aims to offer a best-in-class interface for working with feature flags in TypeScript-based React applications.\n\n```\nnpm install flag\n```\n\n## Getting Started\n\n`flag` works by creating bindings at runtime so that context providers, components, and hooks are all strictly typed together. `createFlags` builds these bindings without requiring an data.\n\n```ts\n// flags.ts\n\nimport { createFlags } from \"flag\";\n\nexport type MyFlags = {\n  features: {\n    useMyCoolNewThing: boolean;\n  };\n  config: {\n    apiUrl: string;\n  };\n  cool: number;\n  dude: number;\n  coolAndDude: number;\n  largeCoolAndDude: boolean;\n};\n\nexport const { FlagBackendProvider, Flag, useFlag } = createFlags<MyFlags>();\n```\n\n## React Bindings\n\n### `FlagBackendProvider`\n\n_Returned as part of `createFlags<T>()`._\n\nThis React component provides a `Backend<T>` ([see below](https://github.com/garbles/flag/tree/master/packages/flag#backends)) as a data source for `Flag` and `useFlag`.\n\n| Props      | Type               | Required | Description               |\n| ---------- | ------------------ | -------- | ------------------------- |\n| `backend`  | `Types.Backend<T>` | `true`   | The data source for flags |\n| `children` | `ReactNode`        | `true`   | React children            |\n\n```tsx\n// index.tsx\n\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { NullBackend } from \"flag\";\nimport { App } from \"./app\";\nimport { FlagBackendProvider } from \"./flags\";\n\nconst backend = new NullBackend();\n\nconst root = ReactDOM.createRoot(document.querySelector(\"#app\"));\n\nroot.render(\n  <FlagBackendProvider backend={backend}>\n    <App />\n  </FlagBackendProvider>\n);\n```\n\n### `useFlag`\n\n_Returned as part of `createFlags<T>()`._\n\nA hook to fetch a single flag. Requires a valid key path and a default value. The key path must terminate at a string, boolean or number and the default value must be of the same type that it terminates. Forcing a default to be provided will minimize the change of a runtime error occurring.\n\n| Args           | Type                                         | Required | Description                                                |\n| -------------- | -------------------------------------------- | -------- | ---------------------------------------------------------- |\n| `keyPath`      | `Types.KeyPath<T> \\| Types.KeyPathString<T>` | `true`   | A valid key path of `T` to a string, boolean or number     |\n| `defaultValue` | `GetValueFromKeyPath<T, KP>`                 | `true`   | A fallback in case it is not available in the `Backend<T>` |\n\n```tsx\n// my-component.tsx\n\nimport { useFlag } from \"./flags\";\n\nconst MyComponent = () => {\n  /**\n   * The key path can be either an array or string of keys joined by `.`\n   * It _must_ terminate at a string, boolean or number type.\n   */\n  const apiUrl = useFlag([\"config\", \"apiUrl\"], \"https://example.com\");\n  const apiUrl2 = useFlag(\"config.apiUrl\", \"https://example.com\");\n\n  return <div>The API url is \"{apiUrl}\"</div>;\n};\n```\n\n### `Flag`\n\n_Returned as part of `createFlags<T>()`._\n\nRenders a some UI based on whether a flag is `false` or not. (It's a glorified if statement 😬).\n\n| Args           | Type                                         | Required | Description                                                |\n| -------------- | -------------------------------------------- | -------- | ---------------------------------------------------------- |\n| `keyPath`      | `Types.KeyPath<T> \\| Types.KeyPathString<T>` | `true`   | A valid key path of `T` to a string, boolean or number     |\n| `defaultValue` | `GetValueFromKeyPath<T, KP>`                 | `true`   | A fallback in case it is not available in the `Backend<T>` |\n| `render`       | `(flags: T) => ReactNode`                    | `true`   | Function that returns a `ReactNode`                        |\n| `fallback`     | `() => ReactNode`                            | `false`  | Function that returns a `ReactNode`                        |\n\n```tsx\n<Flag\n  name=\"features.useMyCoolNewThing\"\n  defaultValue={false}\n  render={() => <div>Rendered on truthy</div>}\n  fallback={() => <div>Rendered on falsy</div>}\n/>\n```\n\n## Backends\n\n`FlagBackendProvider` requires that you pass a `Backend<T>` which is responsible for retreiving flags to your application.\n\n`flag` bundles with several useful backends, but you can also roll your own.\n\n### `StaticBackend<T>`\n\nAccepts a JSON object that matches the partial shape of your flags. It can be nested, but shouldn't use arrays.\n\n```tsx\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { StaticBackend } from \"flag\";\nimport { FlagBackendProvider, MyFlags } from \"./flags\";\nimport { App } from \"./app\";\n\nconst backend = new StaticBackend<MyFlags>({\n  features: {\n    useMyCoolNewThing: false,\n  },\n  config: {\n    apiUrl: \"https://example.com\",\n  },\n  cool: 100,\n  dude: 200,\n  coolAndDude: 300,\n  largeCoolAndDude: 600,\n});\n\nconst root = ReactDOM.createRoot(document.querySelector(\"#app\"));\n\nroot.render(\n  <FlagBackendProvider backend={backend}>\n    <App />\n  </FlagBackendProvider>\n);\n```\n\nIf a partial object is provided and a requested key is missing, it will fallback to the provided default. That is,\n\n```tsx\nconst backend = new StaticBackend<MyFlags>({\n  features: {},\n});\n\n// ...\n\nconst SomeScreen = () => {\n  const newThing = useFlag(\"features.useMyCoolNewThing\", true);\n  // => will always be `true`\n\n  // ...\n};\n```\n\n### `ComputedBackend<T>`\n\nSimilar to `StaticBackend` but if a function is used as a value, it will pass in the object `T` as an\nargument. (Yes, this means you can end up with a stack overflow if you're not careful.) Useful when you need to have composite flags outside of the React render loop.\n\n```tsx\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { ComputedBackend } from \"flag\";\nimport { FlagBackendProvider, MyFlags } from \"./flags\";\nimport { App } from \"./app\";\n\nconst backend = new ComputedBackend<MyFlags>({\n  features: {\n    useMyCoolNewThing: false,\n  },\n  config: {\n    apiUrl: \"https://example.com\",\n  },\n  cool: 100,\n  dude: 200,\n  coolAndDude: (flags) => flags.cool + flags.dude,\n  largeCoolAndDude: (flags) => flags.coolAndDude * 2,\n});\n\nconst root = ReactDOM.createRoot(document.querySelector(\"#app\"));\n\nroot.render(\n  <FlagBackendProvider backend={backend}>\n    <App />\n  </FlagBackendProvider>\n);\n```\n\n### `AlwaysBackend`\n\nGiven a partial mapping of `{ boolean: boolean; string: string; number: number; }` will always yield the mapping value for a given type. If a type is missing from the mapping, it will fallback to the default value given to `useFlag`. Useful for testing.\n\n```tsx\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { AlwaysBackend } from \"flag\";\nimport { FlagBackendProvider } from \"./flags\";\nimport { App } from \"./app\";\n\nconst backend = new AlwaysBackend({\n  boolean: false,\n  string: \"some string\",\n  number: 1000,\n});\n\nconst root = ReactDOM.createRoot(document.querySelector(\"#app\"));\n\nroot.render(\n  <FlagBackendProvider backend={backend}>\n    <App />\n  </FlagBackendProvider>\n);\n```\n\n### `NullBackend`\n\nA backend that always returns the default value. Useful for testing.\n\n```tsx\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { NullBackend } from \"flag\";\nimport { FlagBackendProvider } from \"./flags\";\nimport { App } from \"./app\";\n\nconst backend = new NullBackend();\n\nconst root = ReactDOM.createRoot(document.querySelector(\"#app\"));\n\nroot.render(\n  <FlagBackendProvider backend={backend}>\n    <App />\n  </FlagBackendProvider>\n);\n```\n\n### Rolling your own with `AbstractBackend<T>`\n\nYou can roll your own backend by extending a class off of `AbstractBackend<T>`. You need only implement the `getSnapshot()` (and optionally `getServerSnapshot()`) method.\n\n```tsx\nimport { AbstractBackend, Types } from \"flag\";\n\n/**\n * `F` is the shape of your flags.\n */\nexport class MyBackend<F> extends AbstractBackend<F> {\n  /**\n   * `KP` is a valid key path (as an array).\n   * `T` is the type of value associated the key path.\n   */\n  getSnapshot<KP extends Types.KeyPath<F>, T extends Types.GetValueFromKeyPath<F, KP>>(keyPath: KP, defaultValue: T): T {\n    /**\n     * `getSnapshot` must return `T`.\n     */\n    return defaultValue;\n  }\n\n  /**\n   * OPTIONAL: you can override `getServerSnapshot` if you need different behavior for server rendering.\n   * Defaults to `getSnapshot`.\n   */\n  override getServerSnapshot<KP extends Types.KeyPath<F>, T extends Types.GetValueFromKeyPath<F, KP>>(keyPath: KP, defaultValue: T): T {\n    /**\n     * Do something different than `getSnapshot`\n     */\n    return defaultValue;\n  }\n}\n```\n\nIf you want your backend to work with React Suspense, you can create an [async ref object](https://github.com/garbles/flag/tree/master/packages/async-ref) by calling `this.createAsyncRef()` and using it in `getSnapshot()`.\n\n```tsx\nimport { AbstractBackend, Types } from \"flag\";\n\nexport class MyBackend<F> extends AbstractBackend<F> {\n  #data: Types.AsyncMutableRefObject<T>;\n\n  constructor() {\n    this.#data = this.createAsyncRef();\n\n    fetch(\"/api-with-data\")\n      .then((res) => res.json())\n      .then((data) => {\n        this.#data.current = data;\n      });\n  }\n\n  getSnapshot<KP extends Types.KeyPath<F>, T extends Types.GetValueFromKeyPath<F, KP>>(keyPath: KP, defaultValue: T): T {\n    /**\n     * Throws a promise if a current value has not yet been assigned.\n     */\n    const data = this.#data.current;\n\n    return someGetterFn(data, keyPath);\n  }\n}\n```\n\nIf your backend is asynchronous and you do not want to use suspense, you can imperatively call `this.notify()` in order to tell React to re-render.\n\n```tsx\nimport { AbstractBackend, Types } from \"flag\";\n\nexport class MyBackend<F> extends AbstractBackend<F> {\n  #data: T | null = null;\n\n  constructor() {\n    this.#data = this.createAsyncRef();\n\n    fetch(\"/api-with-data\")\n      .then((res) => res.json())\n      .then((data) => {\n        this.#data = data;\n        this.notify();\n      });\n  }\n\n  getSnapshot<KP extends Types.KeyPath<F>, T extends Types.GetValueFromKeyPath<F, KP>>(keyPath: KP, defaultValue: T): T {\n    if (this.#data === null) {\n      return defaultValue;\n    }\n\n    const data = this.#data;\n\n    return someGetterFn(data, keyPath);\n  }\n}\n```\n\n## Setting NODE_ENV\n\nWhile in development, you should be sure to set `process.env.NODE_ENV` to `\"development\"` for useful warnings when possible. Tool kits like Remix, Next and CRA do this automatically for you.\n\n## License\n\nMPL-2.0\n","maintainers":[{"name":"garbles","email":"scholz.gabe@gmail.com"}],"time":{"modified":"2022-06-18T01:53:21.721Z","created":"2013-08-13T05:43:23.145Z","0.0.0":"2013-08-13T05:43:29.607Z","1.0.0":"2017-04-07T22:14:11.499Z","1.0.2":"2017-05-29T00:30:15.320Z","1.0.3":"2017-05-29T00:32:51.952Z","1.0.4":"2017-05-29T20:24:40.656Z","1.0.5":"2017-05-31T16:21:51.678Z","1.0.6":"2017-05-31T16:22:45.850Z","2.0.1":"2017-06-24T21:51:40.715Z","2.0.2":"2017-06-28T22:31:48.251Z","2.0.3-0":"2017-06-28T23:12:22.878Z","2.0.3-1":"2017-06-28T23:17:43.758Z","2.0.3-2":"2017-06-28T23:23:13.856Z","2.0.3":"2017-07-07T18:22:27.988Z","2.0.4":"2017-08-18T02:47:02.737Z","3.0.0-0":"2017-11-10T21:06:01.013Z","3.0.0-1":"2017-12-27T01:33:14.766Z","4.0.0-0":"2019-04-20T16:57:29.021Z","4.0.0-1":"2019-04-20T18:01:27.454Z","4.0.0-2":"2019-04-20T21:53:10.481Z","4.0.0-3":"2019-05-03T21:57:24.396Z","4.0.0-4":"2019-05-03T22:02:19.528Z","4.0.0":"2019-05-23T00:07:25.996Z","4.1.0-0":"2019-05-29T03:12:58.614Z","4.1.0":"2019-06-01T05:23:47.251Z","4.2.0-0":"2019-07-04T22:49:39.272Z","4.2.0":"2019-07-08T16:49:43.672Z","4.2.1":"2019-07-13T02:39:31.260Z","4.3.0-0":"2019-08-02T05:21:33.549Z","4.3.0":"2019-08-05T16:59:13.549Z","4.4.0-0":"2019-08-14T03:21:46.893Z","4.4.0":"2019-09-17T23:03:29.604Z","5.0.0-alpha.0":"2022-04-20T07:18:06.133Z","5.0.0":"2022-04-20T18:07:14.146Z","5.0.1":"2022-04-20T18:34:49.454Z"},"author":{"name":"Gabe Scholz"},"license":"MPL-2.0","readmeFilename":"README.md","repository":{"type":"git","url":"https://github.com/garbles/flag"},"users":{"iamninad":true}}