UNPKG
ifd
Version:
%s (0.0.3)
latest (0.1.0)
0.1.0
0.0.3
0.0.1
Life Extending Ternary Operator Abstractions
github.com/artisin/ifd
artisin/ifd
ifd
/
__tests__
/
doc-examples
/
the-default-abstraction
/
a-volume-bump.md
14 lines
(11 loc)
•
258 B
Markdown
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
__A Volume Bump__ ```js
// creates custom identity thunk
const
isAnArrayOfTwo = ifd({ identity: function (
val
) {
return
Array.isArray(
val
) &&
val
.length ===
2
; } });
const
foo = isAnArrayOfTwo([
1
,
2
,
3
],
'te'
, [
4
,
5
], [
6
,
7
]);
//foo === [4, 5]
```