UNPKG
ts-prime
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
0.3.15
0.3.14
0.3.13
0.3.12
0.3.11
0.3.10
0.3.9
0.3.8
0.3.7
0.3.6
0.3.5
0.3.4
0.3.3
0.3.2
0.3.1
0.3.0
0.2.0
0.1.0
0.0.28
0.0.27
0.0.26
0.0.25
0.0.24
0.0.23
0.0.22
0.0.21
0.0.20
A utility library for JavaScript and Typescript.
digimuza.github.io/ts-prime
digimuza/ts-prime
ts-prime
/
src
/
_counter.ts
14 lines
(12 loc)
•
209 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import
{ map }
from
'./map'
;
export
const
createCounter
= (
) => {
const
count = jest.
fn
();
return
{ count,
fn
: <T>
() =>
map<T, T>(
x
=>
{
count
();
return
x; }), }; };