We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 91f9371 + 8a44981 commit 1f2c67dCopy full SHA for 1f2c67d
src/helper.ts
@@ -6,6 +6,19 @@ const initialProviderState: ProviderProps = {}
6
const GlobalContext = createContext(initialProviderState)
7
const Consumer = GlobalContext.Consumer
8
9
+// console.group polyfill
10
+if (!console.group) {
11
+ const groups: any[] = []
12
+ const hr = '-'.repeat(80) // 80 dashes row line
13
+ console.group = function logGroupStart(label: any) {
14
+ groups.push(label)
15
+ console.log('%c \nBEGIN GROUP: %c', hr, label)
16
+ console.groupEnd = function logGroupEnd() {
17
+ console.log('END GROUP: %c\n%c', groups.pop(), hr)
18
+ }
19
20
+}
21
+
22
const setPartialState = (
23
name: keyof typeof Global.State,
24
partialState: typeof Global.State | Function
0 commit comments