@8ms/helpers 2.0.11 → 2.0.12

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.
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@8ms/helpers",
3
3
  "license": "UNLICENSED",
4
- "version": "2.0.11",
4
+ "version": "2.0.12",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/8millionstories-organisation/8ms-helpers-ts.git"
package/url/index.d.ts CHANGED
@@ -19,10 +19,7 @@ export declare const buildParameters: (existing?: object, updated?: object) => s
19
19
  /**
20
20
  * Create a new relative URL based on the current path.
21
21
  */
22
- export declare const buildRelative: ({ router, updated }: {
23
- router: any;
24
- updated: object;
25
- }) => string;
22
+ export declare const buildRelative: (router: any, updated?: object) => string;
26
23
  /**
27
24
  * Get the current base url.
28
25
  */
package/url/index.js CHANGED
@@ -44,8 +44,8 @@ exports.buildParameters = buildParameters;
44
44
  /**
45
45
  * Create a new relative URL based on the current path.
46
46
  */
47
- const buildRelative = ({ router, updated }) => {
48
- return `${router.pathname}${(0, exports.buildParameters)({ existing: router.query, updated: updated || {} })}`;
47
+ const buildRelative = (router, updated = {}) => {
48
+ return `${router.pathname}${(0, exports.buildParameters)(router.query, updated || {})}`;
49
49
  };
50
50
  exports.buildRelative = buildRelative;
51
51
  /**