UNPKG
press-f
Version:
latest (1.1.1)
1.1.1
1.1.0
1.0.0
A funny replace to Error class
github.com/gastonpereyra/press-f
gastonpereyra/press-f
press-f
/
lib
/
f.js
14 lines
(9 loc)
•
245 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
'use strict'
;
module
.
exports
=
class
F
extends
Error
{
constructor
(
error, name
) {
super
(error ||
'Pay Respect'
);
this
.
name
=
typeof
name ===
'string'
? name :
'Press F'
;
if
(error
instanceof
Error
)
this
.
previousError
= error; } };