UNPKG
@wareme/utils
Version:
latest (3.13.0)
3.13.0
3.12.1
3.12.0
3.11.0
3.10.0
3.9.0
3.8.2
3.8.1
3.8.0
3.7.1
3.7.0
3.6.1
3.6.0
3.5.0
3.4.1
3.4.0
3.3.0
3.2.4
3.2.3
3.2.1
3.2.0
3.1.0
3.0.0
Utils for Dark applications
@wareme/utils
/
src
/
nisha.js
4 lines
(3 loc)
•
254 B
JavaScript
View Raw
1
2
3
4
// nisha is a function that works similarly to a ternary operator.
// Because nisha is a function, parameters are evaluated immediately, not conditionally.
export
const
nisha
= (
condition, truthyValue, falsyValue
) => condition ? truthyValue : falsyValue