UNPKG
care-js
Version:
latest (3.3.4)
3.3.4
Standard library
care-js
/
internals
/
an-instance.js
6 lines
(5 loc)
•
185 B
JavaScript
View Raw
1
2
3
4
5
6
module
.
exports
=
function
(
it, Constructor, name
) {
if
(!(it
instanceof
Constructor
)) {
throw
TypeError
(
'Incorrect '
+ (name ? name +
' '
:
''
) +
'invocation'
); }
return
it; };