UNPKG
@es-shims/api
Version:
latest (3.0.3)
3.0.3
3.0.2
3.0.1
3.0.0
2.5.1
2.5.0
2.4.2
2.4.1
2.4.0
2.3.1
2.3.0
2.2.3
2.2.2
2.2.1
2.2.0
2.1.2
2.1.1
2.1.0
2.0.0
1.3.0
1.2.0
1.1.0
1.0.0
Loosely test a package's compliance with the es-shim API
github.com/es-shims/api
es-shims/api
@es-shims/api
/
fakeShim.js
12 lines
(9 loc)
•
254 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
'use strict'
;
/**
@type
{
[unknown, unknown[]][]
} */
const
calls = [];
/**
@type
{
{ calls: typeof calls
} & ((this: unknown) => void)} */
const
shim =
function
fakeShim
(
...args
) { calls.
push
([
this
, args]); }; shim.
calls
= calls;
module
.
exports
= shim;