1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/asn1.js/lib/asn1/constants/index.js

22 lines
368 B
JavaScript
Raw Permalink Normal View History

2024-01-16 21:26:16 +08:00
'use strict';
const constants = exports;
2023-12-18 13:12:25 +08:00
// Helper
constants._reverse = function reverse(map) {
2024-01-16 21:26:16 +08:00
const res = {};
2023-12-18 13:12:25 +08:00
Object.keys(map).forEach(function(key) {
// Convert key to integer if it is stringified
if ((key | 0) == key)
key = key | 0;
2024-01-16 21:26:16 +08:00
const value = map[key];
2023-12-18 13:12:25 +08:00
res[value] = key;
});
return res;
};
constants.der = require('./der');