{"id":19215,"date":"2020-10-07T07:03:06","date_gmt":"2020-10-07T05:03:06","guid":{"rendered":"https:\/\/www.inovex.de\/blog\/?p=19215"},"modified":"2022-12-02T08:56:57","modified_gmt":"2022-12-02T07:56:57","slug":"javascript-proxies-changing-the-core-functionality-of-objects","status":"publish","type":"post","link":"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/","title":{"rendered":"JavaScript Proxies: Changing the core functionality of Objects"},"content":{"rendered":"<p>JavaScript Proxies allow you to intercept core functionality on JavaScript Objects so you can tweak the behaviour of existing features. And it is not limited to objects created by you but is also possible with objects created by others. As a reminder, in JavaScript there are eight different data types: Boolean, Null, Undefined, Number, BigInt, String, Symbol and Object (see <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Data_structures\">MDN<\/a>). So changing the behaviour of objects lets us change a huge part of JavaScript.<!--more--><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_79_2 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\"><p class=\"ez-toc-title\" style=\"cursor:inherit\"><\/p>\n<\/div><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#JavaScript-Proxies\" >JavaScript Proxies<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#List-of-Traps\" >List of Traps<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#Examples\" >Examples<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#Something-Is-Changing-Your-Object-Set-Trap\" >Something Is Changing Your Object (Set Trap)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#Negative-Array-Indices-Get-and-Set-Trap\" >Negative Array Indices (Get and Set Trap)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#API-Generation-On-The-Fly-Get-Trap\" >API Generation On The Fly (Get Trap)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#Revocable-Proxies\" >Revocable Proxies<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#Libraries-Using-JavaScript-Proxies\" >Libraries Using JavaScript Proxies<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#Tpyo\" >Tpyo<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#Immerjs\" >Immerjs<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#Summary\" >Summary<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#Sources\" >Sources<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"JavaScript-Proxies\"><\/span>JavaScript Proxies<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A proxy looks like this:<\/p>\n<div class=\"BorlabsCookie\"><div class=\"_brlbs-content-blocker\"> <div class=\"_brlbs-default\"> <p>Klicken Sie auf den unteren Button, um den Inhalt von codesandbox.io zu laden.<\/p> <p><a class=\"_brlbs-btn\" href=\"#\" data-borlabs-cookie-unblock role=\"button\">Inhalt laden<\/a><\/p> <\/div> <\/div><div class=\"borlabs-hide\" data-borlabs-cookie-type=\"content-blocker\" data-borlabs-cookie-id=\"default\">PHA+PGlmcmFtZSBsb2FkaW5nPSJsYXp5IiB3aWR0aD0iMjUwIiBoZWlnaHQ9IjE1MCIgc3R5bGU9IndpZHRoOiAxMDAlOyBoZWlnaHQ6IDUwMHB4OyBib3JkZXI6IDA7IGJvcmRlci1yYWRpdXM6IDRweDsgb3ZlcmZsb3c6IGhpZGRlbjsiIHNyYz0iaHR0cHM6Ly9jb2Rlc2FuZGJveC5pby9lbWJlZC9nZXQtdW5kZWZpbmVkLTRnZnpvP2V4cGFuZGRldnRvb2xzPTEmYW1wO2ZvbnRzaXplPTE0JmFtcDtoaWRlbmF2aWdhdGlvbj0xJmFtcDt0aGVtZT1kYXJrJmFtcDtlZGl0b3JzaXplPTY1JmFtcDt2aWV3PXNwbGl0IiB0aXRsZT0iZ2V0IHVuZGVmaW5lZCIgc2FuZGJveD0iYWxsb3ctc2FtZS1vcmlnaW4gYWxsb3ctc2NyaXB0cyI+PC9pZnJhbWU+PC9wPg==<\/div><\/div>\n<p>Here we change the get function to return 37 each time a variable is not defined. First the function is created, which executes each time a property is accessed. The parameters are the object itself and the accessed property name as a string. If the property name is available the corresponding value and otherwise the default value is returned. The values set to the proxy are transparently set to the original object. A proxy cannot store values, all values are set and received from the original value. The proxy can only transform the values before setting it to the original object after receiving it from the original object.<\/p>\n<p>To understand proxies you have to know these terms:<\/p>\n<ul>\n<li>The <strong>target<\/strong> is the original object which is wrapped by the proxy.<\/li>\n<li><strong>Proxy<\/strong> is the new object which wraps the original object and shows the new behaviour.<\/li>\n<li><strong>Trap<\/strong> is the function which is executed before the original functionality is processed and defines the new behaviour.<\/li>\n<li><strong>Handler<\/strong> is the object with all traps inside.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"List-of-Traps\"><\/span>List of Traps<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The following list shows all the possibilities of traps. Implementing them is optional.<\/p>\n<dl>\n<dt>handler.get()<\/dt>\n<dd>A trap for getting property values<\/dd>\n<dt>handler.set()<\/dt>\n<dd>A trap for setting property values<\/dd>\n<dt>handler.deleteProperty()<\/dt>\n<dd>A trap for the delete operator.<\/dd>\n<dt>handler.apply()<\/dt>\n<dd>A trap for a function call<\/dd>\n<dt>handler.construct()<\/dt>\n<dd>A trap for the new operator<\/dd>\n<dt>handler.has()<\/dt>\n<dd>A trap for the in operator<\/dd>\n<dt>handler.ownKeys()<\/dt>\n<dd>A trap for Object.getOwnPropertyNames and Object.getOwnPropertySymbols<\/dd>\n<dt>handler.getPrototypeOf()<\/dt>\n<dd>A trap for Object.getPrototypeOf<\/dd>\n<dt>handler.setPrototypeOf()<\/dt>\n<dd>A trap for Object.setPrototypeOf<\/dd>\n<dt>handler.isExtensible()<\/dt>\n<dd>A trap for Object.isExtensible<\/dd>\n<dt>handler.preventExtensions()<\/dt>\n<dd>A trap for Object.preventExtensions<\/dd>\n<dt>handler.getOwnPropertyDescriptor()<\/dt>\n<dd>A trap for Object.getOwnPropertyDescriptor.<\/dd>\n<dt>handler.defineProperty()<\/dt>\n<dd>A trap for Object.defineProperty<\/dd>\n<\/dl>\n<p>Copied from <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Proxy\">MDN<\/a><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Examples\"><\/span>Examples<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The following examples will show you what is possible with JavaScript Proxies.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Something-Is-Changing-Your-Object-Set-Trap\"><\/span>Something Is Changing Your Object (Set Trap)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>When something is changing an object, a set trap becomes handy to identify the code spot which forces the change. Therefore, instead of returning the original object, the proxy object is returned. The proxy defines a trap for setting a property and will log the trace where the property has changed.<\/p>\n<div class=\"BorlabsCookie\"><div class=\"_brlbs-content-blocker\"> <div class=\"_brlbs-default\"> <p>Klicken Sie auf den unteren Button, um den Inhalt von codesandbox.io zu laden.<\/p> <p><a class=\"_brlbs-btn\" href=\"#\" data-borlabs-cookie-unblock role=\"button\">Inhalt laden<\/a><\/p> <\/div> <\/div><div class=\"borlabs-hide\" data-borlabs-cookie-type=\"content-blocker\" data-borlabs-cookie-id=\"default\">PHA+PGlmcmFtZSBsb2FkaW5nPSJsYXp5IiB3aWR0aD0iMzAwIiBoZWlnaHQ9IjE1MCIgc3R5bGU9IndpZHRoOiAxMDAlOyBoZWlnaHQ6IDUwMHB4OyBib3JkZXI6IDA7IGJvcmRlci1yYWRpdXM6IDRweDsgb3ZlcmZsb3c6IGhpZGRlbjsiIHNyYz0iaHR0cHM6Ly9jb2Rlc2FuZGJveC5pby9lbWJlZC90cmFjZS1mYmcwbD9mb250c2l6ZT0xNCZhbXA7aGlkZW5hdmlnYXRpb249MSZhbXA7dGhlbWU9ZGFyayZhbXA7ZWRpdG9yc2l6ZT02NSZhbXA7dmlldz1zcGxpdCIgdGl0bGU9InRyYWNlIiBzYW5kYm94PSJhbGxvdy1zYW1lLW9yaWdpbiBhbGxvdy1zY3JpcHRzIj48L2lmcmFtZT48L3A+<\/div><\/div>\n<p>The <em>return true<\/em> at the end of the set trap indicates that the assignment succeeded.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Negative-Array-Indices-Get-and-Set-Trap\"><\/span>Negative Array Indices (Get and Set Trap)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Negative Array indices mean counting from the end of an array instead of from the beginning. Like supported by the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/splice\">Array.splice method<\/a>.<\/p>\n<div class=\"BorlabsCookie\"><div class=\"_brlbs-content-blocker\"> <div class=\"_brlbs-default\"> <p>Klicken Sie auf den unteren Button, um den Inhalt von codesandbox.io zu laden.<\/p> <p><a class=\"_brlbs-btn\" href=\"#\" data-borlabs-cookie-unblock role=\"button\">Inhalt laden<\/a><\/p> <\/div> <\/div><div class=\"borlabs-hide\" data-borlabs-cookie-type=\"content-blocker\" data-borlabs-cookie-id=\"default\">PHA+PGlmcmFtZSBsb2FkaW5nPSJsYXp5IiB3aWR0aD0iMzAwIiBoZWlnaHQ9IjE1MCIgc3R5bGU9IndpZHRoOiAxMDAlOyBoZWlnaHQ6IDUwMHB4OyBib3JkZXI6IDA7IGJvcmRlci1yYWRpdXM6IDRweDsgb3ZlcmZsb3c6IGhpZGRlbjsiIHNyYz0iaHR0cHM6Ly9jb2Rlc2FuZGJveC5pby9lbWJlZC9uZWdhdGl2ZS1hcnJheS1pbmRpY2llcy1zcTU1Mz9mb250c2l6ZT0xNCZhbXA7aGlkZW5hdmlnYXRpb249MSZhbXA7dGhlbWU9ZGFyazsmYW1wO2VkaXRvcnNpemU9NjUmYW1wO3ZpZXc9c3BsaXQmYW1wO2V4cGFuZGRldnRvb2xzPTEiIHRpdGxlPSJuZWdhdGl2ZSBBcnJheSBJbmRpY2llcyIgc2FuZGJveD0iYWxsb3ctc2FtZS1vcmlnaW4gYWxsb3ctc2NyaXB0cyI+PC9pZnJhbWU+PC9wPg==<\/div><\/div>\n<h3><span class=\"ez-toc-section\" id=\"API-Generation-On-The-Fly-Get-Trap\"><\/span>API Generation On The Fly (Get Trap)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>In Spring Boot you can generate functions to query the database with hibernate by only creating the function declaration. This is also possible with Proxies and it feels like calling an implemented function. Here the get trap is used.<\/p>\n<div class=\"BorlabsCookie\"><div class=\"_brlbs-content-blocker\"> <div class=\"_brlbs-default\"> <p>Klicken Sie auf den unteren Button, um den Inhalt von codesandbox.io zu laden.<\/p> <p><a class=\"_brlbs-btn\" href=\"#\" data-borlabs-cookie-unblock role=\"button\">Inhalt laden<\/a><\/p> <\/div> <\/div><div class=\"borlabs-hide\" data-borlabs-cookie-type=\"content-blocker\" data-borlabs-cookie-id=\"default\">PHA+PGlmcmFtZSBsb2FkaW5nPSJsYXp5IiB3aWR0aD0iMzAwIiBoZWlnaHQ9IjE1MCIgc3R5bGU9IndpZHRoOiAxMDAlOyBoZWlnaHQ6IDUwMHB4OyBib3JkZXI6IDA7IGJvcmRlci1yYWRpdXM6IDRweDsgb3ZlcmZsb3c6IGhpZGRlbjsiIHNyYz0iaHR0cHM6Ly9jb2Rlc2FuZGJveC5pby9lbWJlZC9hcGktZ2VuZXJhdGlvbi16NWs2Nj9leHBhbmRkZXZ0b29scz0xJmFtcDtmb250c2l6ZT0xNCZhbXA7aGlkZW5hdmlnYXRpb249MSZhbXA7dGhlbWU9ZGFyayZhbXA7ZWRpdG9yc2l6ZT02NSZhbXA7dmlldz1zcGxpdCIgdGl0bGU9IkFwaSBHZW5lcmF0aW9uIiBzYW5kYm94PSJhbGxvdy1zYW1lLW9yaWdpbiBhbGxvdy1zY3JpcHRzIj48L2lmcmFtZT48L3A+<\/div><\/div>\n<p>The disadvantages are that during compile time, the compiler doesn\u2019t know which functions exist later and neither knows about the returned objects. Therefore it is hard for it to help with typings.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Revocable-Proxies\"><\/span>Revocable Proxies<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Proxies can not only change the behaviour of an object, they can also control the access to the object. The function <span class=\"lang:js decode:true crayon-inline \">Proxy.revocable<\/span>\u00a0 returns two objects, first the proxy itself and second the revoke function.<\/p>\n<div class=\"BorlabsCookie\"><div class=\"_brlbs-content-blocker\"> <div class=\"_brlbs-default\"> <p>Klicken Sie auf den unteren Button, um den Inhalt von codesandbox.io zu laden.<\/p> <p><a class=\"_brlbs-btn\" href=\"#\" data-borlabs-cookie-unblock role=\"button\">Inhalt laden<\/a><\/p> <\/div> <\/div><div class=\"borlabs-hide\" data-borlabs-cookie-type=\"content-blocker\" data-borlabs-cookie-id=\"default\">PHA+PGlmcmFtZSBsb2FkaW5nPSJsYXp5IiB3aWR0aD0iMzAwIiBoZWlnaHQ9IjE1MCIgc3R5bGU9IndpZHRoOiAxMDAlOyBoZWlnaHQ6IDUwMHB4OyBib3JkZXI6IDA7IGJvcmRlci1yYWRpdXM6IDRweDsgb3ZlcmZsb3c6IGhpZGRlbjsiIHNyYz0iaHR0cHM6Ly9jb2Rlc2FuZGJveC5pby9lbWJlZC9yZXZva2UtcHJveHktZGdrejI\/ZXhwYW5kZGV2dG9vbHM9MSZhbXA7Zm9udHNpemU9MTQmYW1wO2hpZGVuYXZpZ2F0aW9uPTEmYW1wO3RoZW1lPWRhcmsmYW1wO2VkaXRvcnNpemU9NjUmYW1wO3ZpZXc9c3BsaXQiIHRpdGxlPSJyZXZva2UgUHJveHkiIHNhbmRib3g9ImFsbG93LXNhbWUtb3JpZ2luIGFsbG93LXNjcmlwdHMiPjwvaWZyYW1lPjwvcD4=<\/div><\/div>\n<p>The return value is the only difference between a <span class=\"lang:js decode:true crayon-inline \">Proxy.revocable<\/span>\u00a0\u00a0and the new Proxy. It is still possible to add traps to the Proxy.<\/p>\n<p>When the revoke function is called, the original object is not accessible anymore, it will be be garbage-collected. The revoke function can be called multiple times without effect.<\/p>\n<p>This can be handy if the object should have controlled access only. When, as alternative, an object is set to undefined, only the pointer is removed and the object still exists.Therefore the object can be accessed by other variables which have the Object assigned.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Libraries-Using-JavaScript-Proxies\"><\/span>Libraries Using JavaScript Proxies<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Until here I only showed small examples to understand the use of proxies. Now, to show you their full potential, let&#8217;s have a look at two libraries which make use of JavaScript Proxies.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Tpyo\"><\/span>Tpyo<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The <a href=\"https:\/\/github.com\/mathiasbynens\/tpyo\">tpyo library<\/a> makes use of the get Proxy and allows to call a method on an object even if the method call includes a typo. So for example the following is possible:<\/p>\n<div class=\"BorlabsCookie\"><div class=\"_brlbs-content-blocker\"> <div class=\"_brlbs-default\"> <p>Klicken Sie auf den unteren Button, um den Inhalt von codesandbox.io zu laden.<\/p> <p><a class=\"_brlbs-btn\" href=\"#\" data-borlabs-cookie-unblock role=\"button\">Inhalt laden<\/a><\/p> <\/div> <\/div><div class=\"borlabs-hide\" data-borlabs-cookie-type=\"content-blocker\" data-borlabs-cookie-id=\"default\">PHA+PGlmcmFtZSBsb2FkaW5nPSJsYXp5IiB3aWR0aD0iMzAwIiBoZWlnaHQ9IjE1MCIgc3R5bGU9IndpZHRoOiAxMDAlOyBoZWlnaHQ6IDUwMHB4OyBib3JkZXI6IDA7IGJvcmRlci1yYWRpdXM6IDRweDsgb3ZlcmZsb3c6IGhpZGRlbjsiIHNyYz0iaHR0cHM6Ly9jb2Rlc2FuZGJveC5pby9lbWJlZC90cHlvLXJkdW8yP2V4cGFuZGRldnRvb2xzPTEmYW1wO2ZvbnRzaXplPTE0JmFtcDtoaWRlbmF2aWdhdGlvbj0xJmFtcDt0aGVtZT1kYXJrJmFtcDtlZGl0b3JzaXplPTY1JmFtcDt2aWV3PXNwbGl0IiB0aXRsZT0idHB5byIgc2FuZGJveD0iYWxsb3ctc2FtZS1vcmlnaW4gYWxsb3ctc2NyaXB0cyI+PC9pZnJhbWU+PC9wPg==<\/div><\/div>\n<p>This is possible because when a property is accessed the trap checks if the property is available. If it is, the value is returned.<\/p>\n<p>If the property is not available on the object, the trap reads all properties and returns the one with the lowest Levenshtein distance. See implementation <a href=\"https:\/\/github.com\/mathiasbynens\/tpyo\/blob\/master\/tpyo.js\">here<\/a>.<\/p>\n<p>This maybe doesn\u2019t make the most sense but shows the power of Proxies very well.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Immerjs\"><\/span>Immerjs<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><a href=\"https:\/\/github.com\/immerjs\/immer\">Immerjs<\/a> is a JavaScript Library which produces immutable data structures by using copy on write. The syntax is similar to how normally objects are altered. The change of the object is wrapped in a function called \u2018produce\u2019, which returns the new object.<\/p>\n<div class=\"BorlabsCookie\"><div class=\"_brlbs-content-blocker\"> <div class=\"_brlbs-default\"> <p>Klicken Sie auf den unteren Button, um den Inhalt von codesandbox.io zu laden.<\/p> <p><a class=\"_brlbs-btn\" href=\"#\" data-borlabs-cookie-unblock role=\"button\">Inhalt laden<\/a><\/p> <\/div> <\/div><div class=\"borlabs-hide\" data-borlabs-cookie-type=\"content-blocker\" data-borlabs-cookie-id=\"default\">PHA+PGlmcmFtZSBsb2FkaW5nPSJsYXp5IiB3aWR0aD0iMzAwIiBoZWlnaHQ9IjE1MCIgc3R5bGU9IndpZHRoOiAxMDAlOyBoZWlnaHQ6IDUwMHB4OyBib3JkZXI6IDA7IGJvcmRlci1yYWRpdXM6IDRweDsgb3ZlcmZsb3c6IGhpZGRlbjsiIHNyYz0iaHR0cHM6Ly9jb2Rlc2FuZGJveC5pby9lbWJlZC9pbW1lcmpzLXJkanBxP2V4cGFuZGRldnRvb2xzPTEmYW1wO2ZvbnRzaXplPTE0JmFtcDtoaWRlbmF2aWdhdGlvbj0xJmFtcDt0aGVtZT1kYXJrJmFtcDtlZGl0b3JzaXplPTY1JmFtcDt2aWV3PXNwbGl0IiB0aXRsZT0iSW1tZXJKUyIgc2FuZGJveD0iYWxsb3ctc2FtZS1vcmlnaW4gYWxsb3ctc2NyaXB0cyI+PC9pZnJhbWU+PC9wPg==<\/div><\/div>\n<p>This is possible with the heavy use of proxies which you can see <a href=\"https:\/\/github.com\/immerjs\/immer\/blob\/master\/src\/core\/proxy.ts\">here<\/a>.<\/p>\n<p>This library shows the power of proxies, how they can alter the usage of objects without changing the syntax by much.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Summary\"><\/span>Summary<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>JavaScript Proxies are a useful and powerful tool. It can completely change the way objects behave and is not restricted to objects you have created yourself. The use of JavaScript proxies is easy to understand and implement. However, due to their ability to change the core functionality of objects, it can create odd behaviour when not expected.<\/p>\n<p>Use cases where you need proxies may be restricted but when you need to use them it is good to know they exist.<\/p>\n<p>JavaScript Proxies can be used in each major browser except Internet Explorer 11 (<a href=\"https:\/\/caniuse.com\/#feat=proxy\">see caniuse<\/a>).<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Sources\"><\/span>Sources<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><a href=\"https:\/\/vimeo.com\/364362111\">Talk: Christophe Porteneuve &#8211; Fun and Games With ES Proxies<\/a><\/li>\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Proxy\/revocable\">MDN: Proxy.revocable()<\/a><\/li>\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Proxy\">MDN: Proxy<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/mathiasbynens\/tpyo\">Github: tpyo<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/immerjs\/immer\">Github: Immer<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>JavaScript Proxies allow you to intercept core functionality on JavaScript Objects so you can tweak the behaviour of existing features. And it is not limited to objects created by you but is also possible with objects created by others. As a reminder, in JavaScript there are eight different data types: Boolean, Null, Undefined, Number, BigInt, [&hellip;]<\/p>\n","protected":false},"author":99,"featured_media":19898,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"ep_exclude_from_search":false,"footnotes":""},"tags":[70],"service":[420],"coauthors":[{"id":99,"display_name":"Arne Maier","user_nicename":"amaier"}],"class_list":["post-19215","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-web","service-apps"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>JavaScript Proxies: Changing the core functionality of Objects - inovex GmbH<\/title>\n<meta name=\"description\" content=\"Proxies in JavaScript allow you to intercept core functionality on JavaScript Objects so you can tweak the behaviour of existing features \u2013\u00a0even of objects you haven&#039;t created! This article shows some examples and includes snippets to try it out yourself!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript Proxies: Changing the core functionality of Objects - inovex GmbH\" \/>\n<meta property=\"og:description\" content=\"Proxies in JavaScript allow you to intercept core functionality on JavaScript Objects so you can tweak the behaviour of existing features \u2013\u00a0even of objects you haven&#039;t created! This article shows some examples and includes snippets to try it out yourself!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/\" \/>\n<meta property=\"og:site_name\" content=\"inovex GmbH\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inovexde\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-07T05:03:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-02T07:56:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inovex.de\/wp-content\/uploads\/2020\/10\/Zeichenfla\u0308che-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Arne Maier\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.inovex.de\/wp-content\/uploads\/2020\/10\/Zeichenfla\u0308che-1-1024x576.png\" \/>\n<meta name=\"twitter:creator\" content=\"@inovexgmbh\" \/>\n<meta name=\"twitter:site\" content=\"@inovexgmbh\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"Arne Maier\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"6\u00a0Minuten\" \/>\n\t<meta name=\"twitter:label3\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data3\" content=\"Arne Maier\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/\"},\"author\":{\"name\":\"Arne Maier\",\"@id\":\"https:\/\/www.inovex.de\/de\/#\/schema\/person\/f123e489a3b6b9db2c095af50aaaee4b\"},\"headline\":\"JavaScript Proxies: Changing the core functionality of Objects\",\"datePublished\":\"2020-10-07T05:03:06+00:00\",\"dateModified\":\"2022-12-02T07:56:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/\"},\"wordCount\":1039,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.inovex.de\/de\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inovex.de\/wp-content\/uploads\/2020\/10\/Zeichenfla\u0308che-1.png\",\"keywords\":[\"Web\"],\"articleSection\":[\"Applications\",\"English Content\",\"General\"],\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/\",\"url\":\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/\",\"name\":\"JavaScript Proxies: Changing the core functionality of Objects - inovex GmbH\",\"isPartOf\":{\"@id\":\"https:\/\/www.inovex.de\/de\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inovex.de\/wp-content\/uploads\/2020\/10\/Zeichenfla\u0308che-1.png\",\"datePublished\":\"2020-10-07T05:03:06+00:00\",\"dateModified\":\"2022-12-02T07:56:57+00:00\",\"description\":\"Proxies in JavaScript allow you to intercept core functionality on JavaScript Objects so you can tweak the behaviour of existing features \u2013\u00a0even of objects you haven't created! This article shows some examples and includes snippets to try it out yourself!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#primaryimage\",\"url\":\"https:\/\/www.inovex.de\/wp-content\/uploads\/2020\/10\/Zeichenfla\u0308che-1.png\",\"contentUrl\":\"https:\/\/www.inovex.de\/wp-content\/uploads\/2020\/10\/Zeichenfla\u0308che-1.png\",\"width\":1920,\"height\":1080,\"caption\":\"New methods entering an object proxy\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inovex.de\/de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript Proxies: Changing the core functionality of Objects\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inovex.de\/de\/#website\",\"url\":\"https:\/\/www.inovex.de\/de\/\",\"name\":\"inovex GmbH\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.inovex.de\/de\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inovex.de\/de\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inovex.de\/de\/#organization\",\"name\":\"inovex GmbH\",\"url\":\"https:\/\/www.inovex.de\/de\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/www.inovex.de\/de\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inovex.de\/wp-content\/uploads\/2021\/03\/inovex-logo-16-9-1.png\",\"contentUrl\":\"https:\/\/www.inovex.de\/wp-content\/uploads\/2021\/03\/inovex-logo-16-9-1.png\",\"width\":1921,\"height\":1081,\"caption\":\"inovex GmbH\"},\"image\":{\"@id\":\"https:\/\/www.inovex.de\/de\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inovexde\",\"https:\/\/x.com\/inovexgmbh\",\"https:\/\/www.instagram.com\/inovexlife\/\",\"https:\/\/www.linkedin.com\/company\/inovex\",\"https:\/\/www.youtube.com\/channel\/UC7r66GT14hROB_RQsQBAQUQ\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inovex.de\/de\/#\/schema\/person\/f123e489a3b6b9db2c095af50aaaee4b\",\"name\":\"Arne Maier\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/www.inovex.de\/de\/#\/schema\/person\/image\/782b0621bc107cc45bae3de44f518b7a\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/20f445c19bcc18c0aa7c0d49f1596feded262983c108ef60ce41abffe5c4589b?s=96&d=retro&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/20f445c19bcc18c0aa7c0d49f1596feded262983c108ef60ce41abffe5c4589b?s=96&d=retro&r=g\",\"caption\":\"Arne Maier\"},\"url\":\"https:\/\/www.inovex.de\/de\/blog\/author\/amaier\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JavaScript Proxies: Changing the core functionality of Objects - inovex GmbH","description":"Proxies in JavaScript allow you to intercept core functionality on JavaScript Objects so you can tweak the behaviour of existing features \u2013\u00a0even of objects you haven't created! This article shows some examples and includes snippets to try it out yourself!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/","og_locale":"de_DE","og_type":"article","og_title":"JavaScript Proxies: Changing the core functionality of Objects - inovex GmbH","og_description":"Proxies in JavaScript allow you to intercept core functionality on JavaScript Objects so you can tweak the behaviour of existing features \u2013\u00a0even of objects you haven't created! This article shows some examples and includes snippets to try it out yourself!","og_url":"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/","og_site_name":"inovex GmbH","article_publisher":"https:\/\/www.facebook.com\/inovexde","article_published_time":"2020-10-07T05:03:06+00:00","article_modified_time":"2022-12-02T07:56:57+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/www.inovex.de\/wp-content\/uploads\/2020\/10\/Zeichenfla\u0308che-1.png","type":"image\/png"}],"author":"Arne Maier","twitter_card":"summary_large_image","twitter_image":"https:\/\/www.inovex.de\/wp-content\/uploads\/2020\/10\/Zeichenfla\u0308che-1-1024x576.png","twitter_creator":"@inovexgmbh","twitter_site":"@inovexgmbh","twitter_misc":{"Verfasst von":"Arne Maier","Gesch\u00e4tzte Lesezeit":"6\u00a0Minuten","Written by":"Arne Maier"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#article","isPartOf":{"@id":"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/"},"author":{"name":"Arne Maier","@id":"https:\/\/www.inovex.de\/de\/#\/schema\/person\/f123e489a3b6b9db2c095af50aaaee4b"},"headline":"JavaScript Proxies: Changing the core functionality of Objects","datePublished":"2020-10-07T05:03:06+00:00","dateModified":"2022-12-02T07:56:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/"},"wordCount":1039,"commentCount":1,"publisher":{"@id":"https:\/\/www.inovex.de\/de\/#organization"},"image":{"@id":"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inovex.de\/wp-content\/uploads\/2020\/10\/Zeichenfla\u0308che-1.png","keywords":["Web"],"articleSection":["Applications","English Content","General"],"inLanguage":"de","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/","url":"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/","name":"JavaScript Proxies: Changing the core functionality of Objects - inovex GmbH","isPartOf":{"@id":"https:\/\/www.inovex.de\/de\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#primaryimage"},"image":{"@id":"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inovex.de\/wp-content\/uploads\/2020\/10\/Zeichenfla\u0308che-1.png","datePublished":"2020-10-07T05:03:06+00:00","dateModified":"2022-12-02T07:56:57+00:00","description":"Proxies in JavaScript allow you to intercept core functionality on JavaScript Objects so you can tweak the behaviour of existing features \u2013\u00a0even of objects you haven't created! This article shows some examples and includes snippets to try it out yourself!","breadcrumb":{"@id":"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/"]}]},{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#primaryimage","url":"https:\/\/www.inovex.de\/wp-content\/uploads\/2020\/10\/Zeichenfla\u0308che-1.png","contentUrl":"https:\/\/www.inovex.de\/wp-content\/uploads\/2020\/10\/Zeichenfla\u0308che-1.png","width":1920,"height":1080,"caption":"New methods entering an object proxy"},{"@type":"BreadcrumbList","@id":"https:\/\/www.inovex.de\/de\/blog\/javascript-proxies-changing-the-core-functionality-of-objects\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inovex.de\/de\/"},{"@type":"ListItem","position":2,"name":"JavaScript Proxies: Changing the core functionality of Objects"}]},{"@type":"WebSite","@id":"https:\/\/www.inovex.de\/de\/#website","url":"https:\/\/www.inovex.de\/de\/","name":"inovex GmbH","description":"","publisher":{"@id":"https:\/\/www.inovex.de\/de\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inovex.de\/de\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"},{"@type":"Organization","@id":"https:\/\/www.inovex.de\/de\/#organization","name":"inovex GmbH","url":"https:\/\/www.inovex.de\/de\/","logo":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.inovex.de\/de\/#\/schema\/logo\/image\/","url":"https:\/\/www.inovex.de\/wp-content\/uploads\/2021\/03\/inovex-logo-16-9-1.png","contentUrl":"https:\/\/www.inovex.de\/wp-content\/uploads\/2021\/03\/inovex-logo-16-9-1.png","width":1921,"height":1081,"caption":"inovex GmbH"},"image":{"@id":"https:\/\/www.inovex.de\/de\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inovexde","https:\/\/x.com\/inovexgmbh","https:\/\/www.instagram.com\/inovexlife\/","https:\/\/www.linkedin.com\/company\/inovex","https:\/\/www.youtube.com\/channel\/UC7r66GT14hROB_RQsQBAQUQ"]},{"@type":"Person","@id":"https:\/\/www.inovex.de\/de\/#\/schema\/person\/f123e489a3b6b9db2c095af50aaaee4b","name":"Arne Maier","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.inovex.de\/de\/#\/schema\/person\/image\/782b0621bc107cc45bae3de44f518b7a","url":"https:\/\/secure.gravatar.com\/avatar\/20f445c19bcc18c0aa7c0d49f1596feded262983c108ef60ce41abffe5c4589b?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/20f445c19bcc18c0aa7c0d49f1596feded262983c108ef60ce41abffe5c4589b?s=96&d=retro&r=g","caption":"Arne Maier"},"url":"https:\/\/www.inovex.de\/de\/blog\/author\/amaier\/"}]}},"_links":{"self":[{"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/posts\/19215","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/users\/99"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/comments?post=19215"}],"version-history":[{"count":1,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/posts\/19215\/revisions"}],"predecessor-version":[{"id":36656,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/posts\/19215\/revisions\/36656"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/media\/19898"}],"wp:attachment":[{"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/media?parent=19215"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/tags?post=19215"},{"taxonomy":"service","embeddable":true,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/service?post=19215"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/coauthors?post=19215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}