UNPKG
@functional-lib/pagination
Version:
latest (1.0.13)
1.0.13
1.0.9
This is the pagination functional library
@functional-lib/pagination
/
utils
/
page.js
9 lines
(7 loc)
•
242 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
import
{map}
from
'fantasy-land'
;
import
{tagged}
from
'daggy'
;
const
Page
=
tagged
(
'Page'
, [
'page'
,
'text'
])
Page
.
prototype
[map] =
Page
.
prototype
.
map
=
function
(
f
) {
return
f
({
page
:
this
.
page
,
text
:
this
.
text
}); }
module
.
exports
= {
Page
}