IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

28 行
554B

  1. function detectHashes(obj) {
  2. let Q = [ obj ];
  3. let matches = {};
  4. while (Q.length > 0) {
  5. let item = Q.pop();
  6. if (!item)
  7. continue;
  8. if (typeof(item) === 'string') {
  9. // use regexes
  10. let rx = /[a-f0-9]{32}\+[0-9]+/g;
  11. for (let m = rx.exec(item); m; m = rx.exec(item))
  12. matches[m[0]] = true;
  13. } else if (typeof(item) === 'object') {
  14. Object.keys(item).map(k => Q.push(item[k]));
  15. }
  16. }
  17. matches = Object.keys(matches);
  18. return matches;
  19. }
  20. export default detectHashes;