You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
347 B

4 years ago
  1. var constants = exports;
  2. // Helper
  3. constants._reverse = function reverse(map) {
  4. var res = {};
  5. Object.keys(map).forEach(function(key) {
  6. // Convert key to integer if it is stringified
  7. if ((key | 0) == key)
  8. key = key | 0;
  9. var value = map[key];
  10. res[value] = key;
  11. });
  12. return res;
  13. };
  14. constants.der = require('./der');