{"_id":"588f722bbcace50f0052b9f5","category":{"_id":"588f722bbcace50f0052b9e3","version":"588f722bbcace50f0052b9e1","project":"565f5fa26bafd40d0030a064","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-09T21:22:52.427Z","from_sync":false,"order":1,"slug":"user-guide","title":"Reference"},"parentDoc":null,"project":"565f5fa26bafd40d0030a064","__v":0,"user":"565f3941ea46251700972783","version":{"_id":"588f722bbcace50f0052b9e1","project":"565f5fa26bafd40d0030a064","__v":1,"createdAt":"2017-01-30T17:04:43.410Z","releaseDate":"2017-01-30T17:04:43.410Z","categories":["588f722bbcace50f0052b9e2","588f722bbcace50f0052b9e3","588f722bbcace50f0052b9e4","588f722bbcace50f0052b9e5","588f722bbcace50f0052b9e6","588f722bbcace50f0052b9e7"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"5.3.0","version":"5.3.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-12-16T21:43:34.482Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":8,"body":"Shared Libraries enable you to define JavaScript functions and variables that can be used within JavaScript logic blocks across Proxy Endpoints.\n \nThe Shared Libraries view shows a list of Shared Libraries and enables you to create a new one and edit or delete an existing one.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/Gx3UkL9RVC9klrXmFw7A_shared-library.png\",\n        \"shared-library.png\",\n        \"1448\",\n        \"732\",\n        \"#5485bc\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n## Shared Library Properties\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"**Name**\",\n    \"1-0\": \"**Description**\",\n    \"2-0\": \"**Logic**\",\n    \"0-1\": \"Name of the Shared Library (this is a required field).\",\n    \"1-1\": \"Brief description.\",\n    \"2-1\": \"Define your JavaScript here.\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\nThe Edit screen can be accessed at anytime by simply clicking on the Shared Library instance or the Edit icon:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/D8erAqQZSTSN1kRjG1sl_user-guide-environments-edit-environment-icon.png\",\n        \"user-guide-environments-edit-environment-icon.png\",\n        \"1280\",\n        \"52\",\n        \"#fca66b\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"See the [JavaScript Object Reference](doc:javascript-object-reference) section for details on available objects and helpers.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Shared Libraries are loaded prior to loading any custom JavaScript logic defined in the Proxy Endpoint workflow. Therefore, defining a variable or function in workflow custom code will override any variables or functions with the same name in a Shared Library.\"\n}\n[/block]","excerpt":"","slug":"shared-libraries","type":"basic","title":"Shared Libraries"}
Shared Libraries enable you to define JavaScript functions and variables that can be used within JavaScript logic blocks across Proxy Endpoints. The Shared Libraries view shows a list of Shared Libraries and enables you to create a new one and edit or delete an existing one. [block:image] { "images": [ { "image": [ "https://files.readme.io/Gx3UkL9RVC9klrXmFw7A_shared-library.png", "shared-library.png", "1448", "732", "#5485bc", "" ] } ] } [/block] ## Shared Library Properties [block:parameters] { "data": { "h-0": "Property", "h-1": "Description", "0-0": "**Name**", "1-0": "**Description**", "2-0": "**Logic**", "0-1": "Name of the Shared Library (this is a required field).", "1-1": "Brief description.", "2-1": "Define your JavaScript here." }, "cols": 2, "rows": 3 } [/block] The Edit screen can be accessed at anytime by simply clicking on the Shared Library instance or the Edit icon: [block:image] { "images": [ { "image": [ "https://files.readme.io/D8erAqQZSTSN1kRjG1sl_user-guide-environments-edit-environment-icon.png", "user-guide-environments-edit-environment-icon.png", "1280", "52", "#fca66b", "" ] } ] } [/block] [block:callout] { "type": "info", "body": "See the [JavaScript Object Reference](doc:javascript-object-reference) section for details on available objects and helpers." } [/block] [block:callout] { "type": "info", "body": "Shared Libraries are loaded prior to loading any custom JavaScript logic defined in the Proxy Endpoint workflow. Therefore, defining a variable or function in workflow custom code will override any variables or functions with the same name in a Shared Library." } [/block]