Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 29a9e9a

Browse files
committed
fixing export if window exist
1 parent 98dc643 commit 29a9e9a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/index.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
const ctx = (typeof window !== 'undefined') ? window : module ? module.exports : {};
1+
const ctx = module
2+
? module.exports
3+
: (typeof window !== 'undefined')
4+
? window
5+
: {}
26

37
const c = (fn, ...params) => fn.length <= params.length ? fn(...params) : (...others) => c(fn, ...params, ...others);
48
const cp = method => (...fns) => initialValue => fns[method]((value, fn) => fn(value), initialValue);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /