mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Document apply handler
This commit is contained in:
parent
2794764787
commit
0d0d8573dd
1 changed files with 3 additions and 0 deletions
|
|
@ -72,6 +72,9 @@ export function generateAPI ( {
|
||||||
return generateAPI({ apiUrl: `${url}/${propKey}` })
|
return generateAPI({ apiUrl: `${url}/${propKey}` })
|
||||||
|
|
||||||
},
|
},
|
||||||
|
// Handles when () goes after a property key
|
||||||
|
// Example: DoesItAPI() or DoesItAPI.app()
|
||||||
|
// Proxy.handler.apply - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/apply
|
||||||
apply({ url }, thisArg, [arg] = []) {
|
apply({ url }, thisArg, [arg] = []) {
|
||||||
const apiUrl = arg ? `${url}/${arg}` : url
|
const apiUrl = arg ? `${url}/${arg}` : url
|
||||||
return generateAPI({ apiUrl: apiUrl })
|
return generateAPI({ apiUrl: apiUrl })
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue