dphelper 0.2.41 → 0.2.42

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.
@@ -4,7 +4,6 @@ github: passariello
4
4
  patreon: passariello
5
5
  open_collective: # Replace with a single Open Collective username
6
6
  ko_fi: passariello
7
- indiegogo: passariello
8
7
  tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
9
8
  community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
10
9
  liberapay: passariello
@@ -0,0 +1,12 @@
1
+ # Basic dependabot.yml file with
2
+ # minimum configuration for two package managers
3
+
4
+ version: 2
5
+ updates:
6
+ # Enable version updates for npm
7
+ - package-ecosystem: "npm"
8
+ # Look for `package.json` and `lock` files in the `root` directory
9
+ directory: "/"
10
+ # Check the npm registry for updates every day (weekdays)
11
+ schedule:
12
+ interval: "daily"
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "dphelper",
3
- "version": "0.2.41",
3
+ "version": "0.2.42",
4
4
  "description": "Developer Tools",
5
5
  "main": "index.js",
6
- "publishConfig": {},
7
6
  "targets": {
8
7
  "main": {
9
8
  "includeNodeModules": {
@@ -17,6 +16,9 @@
17
16
  "engines": {
18
17
  "node": ">=0.10.0"
19
18
  },
19
+ "scripts": {
20
+ "updateAll": "npm version patch --force -m \"New patch commit\" && git push && git push --tags && npm publish"
21
+ },
20
22
  "repository": {
21
23
  "type": "git",
22
24
  "url": "https://github.com/passariello/dpHelper",
@@ -61,8 +63,7 @@
61
63
  "license": "Apache-2.0",
62
64
  "dependencies": {
63
65
  "jquery": "^3.6.0",
64
- "require": "^0.4.4",
65
- "uglify-js": "^3.14.5"
66
+ "require": "^2.4.20"
66
67
  },
67
68
  "contributors": [
68
69
  {
package/scripts/array.js CHANGED
@@ -33,6 +33,12 @@
33
33
  },{
34
34
  "name":"duplicates",
35
35
  "description":"test"
36
+ },{
37
+ "name":"even",
38
+ "description":"test"
39
+ },{
40
+ "name":"odd",
41
+ "description":"test"
36
42
  }
37
43
  ],
38
44
  "example" : "",
@@ -52,7 +58,7 @@ window.dphelper.array = {
52
58
  if (node.id === id) return node;
53
59
 
54
60
  if (node.children) {
55
- let finalNode = window.dphelper.arrayFindItem(id, node.children);
61
+ let finalNode = window.dphelper.array.find(id, node.children);
56
62
  if (finalNode) return finalNode;
57
63
  }
58
64
  }
@@ -116,7 +122,21 @@ window.dphelper.array = {
116
122
  const toFindDuplicates = arr => arr.filter( (item, index) => arr.indexOf( item ) !== index);
117
123
  const duplicateElements = toFindDuplicates( array );
118
124
  return duplicateElements;
119
- }
125
+ },
126
+
127
+ even: ( array ) => {
128
+ var cur = [];
129
+ for (var i = 0; i < array.length; i++) {
130
+ if (array[i] % 2 === 0 ) cur.push(array[i]);
131
+ } return cur;
132
+ },
133
+
134
+ odd: ( array ) => {
135
+ var cur = [];
136
+ for (var i = 0; i < array.length; i++) {
137
+ if (array[i] % 2) cur.push(array[i]);
138
+ } return cur;
139
+ }
120
140
 
121
141
  };
122
142