@folklore/hooks 0.0.44 → 0.0.46

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/dist/cjs.js CHANGED
@@ -140,8 +140,15 @@ function useDailymotionPlayer() {
140
140
  if (url === null || url.match(/^https?:/) === null) {
141
141
  return url;
142
142
  }
143
- const match = url.match(/\/video\/([^/?]+)/);
144
- return match !== null ? match[1] : null;
143
+ let match = url.match(/\/video\/([^/?]+)/);
144
+ if (match !== null) {
145
+ return match[1];
146
+ }
147
+ match = url.match(/video=([^/?&]+)/);
148
+ if (match !== null) {
149
+ return match[1];
150
+ }
151
+ return null;
145
152
  }
146
153
  } = params;
147
154
  const debug = react.useMemo(() => createDebug__default["default"]('folklore:video:dailymotion'), []);
package/dist/es.js CHANGED
@@ -129,8 +129,15 @@ function useDailymotionPlayer() {
129
129
  if (url === null || url.match(/^https?:/) === null) {
130
130
  return url;
131
131
  }
132
- const match = url.match(/\/video\/([^/?]+)/);
133
- return match !== null ? match[1] : null;
132
+ let match = url.match(/\/video\/([^/?]+)/);
133
+ if (match !== null) {
134
+ return match[1];
135
+ }
136
+ match = url.match(/video=([^/?&]+)/);
137
+ if (match !== null) {
138
+ return match[1];
139
+ }
140
+ return null;
134
141
  }
135
142
  } = params;
136
143
  const debug = useMemo(() => createDebug('folklore:video:dailymotion'), []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@folklore/hooks",
3
- "version": "0.0.44",
3
+ "version": "0.0.46",
4
4
  "description": "React hooks",
5
5
  "keywords": [
6
6
  "javascript",
@@ -49,7 +49,7 @@
49
49
  "publishConfig": {
50
50
  "access": "public"
51
51
  },
52
- "gitHead": "d17ece8ec14646ba798b01cc8e022d4b8f6bc9f1",
52
+ "gitHead": "2cb2ae40aad19ca97c701d72c53e995c2f0870af",
53
53
  "dependencies": {
54
54
  "@folklore/events": "^0.0.5",
55
55
  "@folklore/services": "^0.1.38",