UNPKG
@bigmi/core
Version:
beta (0.4.0-beta.1)
latest (0.5.2)
0.5.2
0.5.1
0.5.0
0.4.5
0.4.4
0.4.3
0.4.2
0.4.0
0.4.0-beta.1
0.4.0-beta.0
0.3.1
0.3.1-beta.0
0.3.0
0.3.0-beta.6
0.3.0-beta.5
0.3.0-beta.4
0.3.0-beta.3
0.3.0-beta.2
0.3.0-beta.1
0.3.0-beta.0
0.2.1
0.2.0
0.2.0-beta.2
0.2.0-beta.1
0.2.0-beta.0
0.1.1
0.1.0
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
TypeScript library for Bitcoin apps.
github.com/lifinance/bigmi
lifinance/bigmi
@bigmi/core
/
src
/
test
/
utils.ts
13 lines
(12 loc)
•
263 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
export
const
createMockResponse = <T>(
data
: T, options?:
Partial
<
Response
> ):
Response
=>
({
ok
:
true
,
json
:
() =>
Promise
.
resolve
(data),
headers
:
new
Headers
({
'Content-type'
:
'application/json'
, }), ...options, })
as
Response