com.meta.xr.sdk.utilities 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +18 -0
  2. package/package.json +12 -0
package/index.js ADDED
@@ -0,0 +1,18 @@
1
+ let uniqueArr = [];
2
+
3
+ function removeArrayDuplicates(arr) {
4
+ // Accepts an array from which the duplicates
5
+ // will be removed
6
+
7
+ if (!Array.isArray(arr)) {
8
+ arr = [];
9
+ }
10
+
11
+ let theSet = new Set(arr);
12
+
13
+ let uniqueArr = [...theSet];
14
+
15
+ return uniqueArr;
16
+ }
17
+
18
+ module.exports = removeArrayDuplicates;
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "com.meta.xr.sdk.utilities",
3
+ "version": "1.0.0",
4
+ "main": "index.js",
5
+ "scripts": {
6
+ "test": "echo \"Error: no test specified\" && exit 1"
7
+ },
8
+ "keywords": [],
9
+ "author": "",
10
+ "license": "ISC",
11
+ "description": ""
12
+ }