forked from LittleChest/dns-packet
Allow numbers
This commit is contained in:
parent
380364bd5a
commit
6bdb761479
@ -12,6 +12,9 @@ exports.toString = function (klass) {
|
||||
}
|
||||
|
||||
exports.toClass = function (name) {
|
||||
if (typeof name === 'number') {
|
||||
return name;
|
||||
}
|
||||
switch (name.toUpperCase()) {
|
||||
case 'IN': return 1
|
||||
case 'CS': return 2
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user