🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
13 lines
194 B
JavaScript
Executable File
13 lines
194 B
JavaScript
Executable File
'use strict';
|
|
|
|
module.exports = function when(value, fn, defaultFn) {
|
|
if (value) {
|
|
return fn(this, value);
|
|
}
|
|
|
|
if (defaultFn) {
|
|
return defaultFn(this, value);
|
|
}
|
|
|
|
return this;
|
|
}; |