deduplication 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -3,20 +3,26 @@
3
3
  * @param arr 要去重的数组
4
4
  * @param type number type为1表示使用set函数去重,type为2表示使用
5
5
  */
6
- export default function deduplication(arr,type=1) {
6
+ function deduplication(arr,type=1) {
7
7
  switch(type){
8
8
  case 1:
9
- this.method1(arr);
9
+ method1(arr);
10
10
  break;
11
11
  case 2:
12
- this.method2(arr);
12
+ method2(arr);
13
13
  break;
14
14
  }
15
15
 
16
16
  }
17
+ module.exports=deduplication;
18
+
17
19
 
18
20
  //set去重
19
21
  function method1(arr){
20
22
  let a = new Set(arr);
21
23
  return [...a];
22
24
  }
25
+
26
+ function method2(arr) {
27
+
28
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deduplication",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "main": "index.js",
5
5
  "repository": "",
6
6
  "author": "henry",
package/vertify.html DELETED
File without changes