user 6 年之前
父节点
当前提交
de249a85c4
共有 4 个文件被更改,包括 6 次插入6 次删除
  1. 1 1
      lib/contact-item.d.ts
  2. 2 2
      lib/contact-item.js
  3. 1 1
      lib/contact-item.js.map
  4. 2 2
      src/contact-item.ts

+ 1 - 1
lib/contact-item.d.ts

@@ -9,5 +9,5 @@ export declare class ContactItem {
     matchesAddressOrName(search: string): boolean;
     matchesGroup(group: string): boolean;
     getFirstEmail(): string | undefined;
-    getMatchingAddresses(): string[];
+    getMatchingAddresses(search: string): string[];
 }

+ 2 - 2
lib/contact-item.js

@@ -27,8 +27,8 @@ class ContactItem {
         }
         return prefixed.substring(6);
     }
-    getMatchingAddresses() {
-        return this.addrs.filter(x => x.indexOf(x) >= 0);
+    getMatchingAddresses(search) {
+        return this.addrs.filter(x => x.indexOf(search) >= 0);
     }
 }
 exports.ContactItem = ContactItem;

文件差异内容过多而无法显示
+ 1 - 1
lib/contact-item.js.map


+ 2 - 2
src/contact-item.ts

@@ -38,7 +38,7 @@ export class ContactItem {
       return prefixed.substring(6);
   }
 
-  public getMatchingAddresses(): string[] {
-      return this.addrs.filter(x => x.indexOf(x) >= 0);
+  public getMatchingAddresses(search: string): string[] {
+      return this.addrs.filter(x => x.indexOf(search) >= 0);
     }
 }