{"id":27,"date":"2019-03-19T22:52:16","date_gmt":"2019-03-19T22:52:16","guid":{"rendered":"https:\/\/www.kindsonthegenius.com\/nodejs\/?p=27"},"modified":"2019-09-22T07:04:05","modified_gmt":"2019-09-22T07:04:05","slug":"03-node-js-global-objects","status":"publish","type":"post","link":"https:\/\/www.kindsonthegenius.com\/nodejs\/03-node-js-global-objects\/","title":{"rendered":"Node.js &#8211; Global Objects"},"content":{"rendered":"<p>Certain objects are provided by Node.js to help us perform certain operations. These are called Global Objects. You can just use them directly. They include functions, modules, strings and objects.<\/p>\n<p>We would cover the following:<\/p>\n<ol>\n<li><a href=\"#t1\">__dirname and __filename<\/a><\/li>\n<li><a href=\"#t2\">setTimeout()<\/a><\/li>\n<li><a href=\"#t3\">setInterval()<\/a><\/li>\n<li><a href=\"#t4\">clearInterval()<\/a><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t1\">1. __dirname and filename<\/strong><\/h4>\n<p><strong>__dirname<\/strong><\/p>\n<p>The __dirname global object represents the name of the current directory. That is the directly that contains the executing scripts.<\/p>\n<p>The code below prints out the current directory.<\/p>\n<p>&nbsp;<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #888888;\">\/\/ display the curent directory<\/span>\r\nconsole<span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">log<\/span><span style=\"color: #333333;\">(<\/span>__dirname<span style=\"color: #333333;\">)<\/span>\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>__filename<\/strong><\/p>\n<p>The __filename global object returns the name of the code currently executing. This is the absolute path and filename. The module however contains only the path to the file.<\/p>\n<p>&nbsp;<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #888888;\">\/\/ display the curent directory<\/span>\r\nconsole<span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">log<\/span><span style=\"color: #333333;\">(<\/span>__dirname<span style=\"color: #333333;\">)<\/span>\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t2\">2. setTimeout(cb, ms)<\/strong><\/h4>\n<p>This is a global function used to run a callback at given interval<\/p>\n<p><strong>cb<\/strong> &#8211; the function to execute<\/p>\n<p><strong>ms<\/strong> &#8211; the number of miliseconds to delay<\/p>\n<p>For example, the code below executes the function sayHello after 3 seconds. So the text &#8216;Welcome to Node.js&#8217; is displayed after 3 seconds. I recommend you try it and see how it works.<\/p>\n<p>&nbsp;<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">function<\/span> sayHello() {\r\n    console.log( <span style=\"background-color: #fff0f0;\">\"Hello my friend!\"<\/span>);\r\n }\r\n \r\n <span style=\"color: #888888;\">\/\/ Call the sayHello function every 3 seconds<\/span>\r\n setTimeout(sayHello, <span style=\"color: #0000dd; font-weight: bold;\">3000<\/span>);\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t3\">3. setInterval(cb, ms)<\/strong><\/h4>\n<p>The setInterval() global function is similar to the setTimeout(). However, the setInterval() executes the callback repeatedly after the given delay. Again, cb is the function to execute while ms is the number of miliseconds to delay. The max time that can be set is 24.8 days.<\/p>\n<p>The function below uses setInterval(). It would continue to repeatedly execute the function.<\/p>\n<p>&nbsp;<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">function<\/span> sayHello() {\r\n    console.log( <span style=\"background-color: #fff0f0;\">\"The function just executed!\"<\/span>);\r\n }\r\n \r\n <span style=\"color: #888888;\">\/\/ Call the sayHello function every 3 seconds<\/span>\r\n setInterval(sayHello, 2<span style=\"color: #0000dd; font-weight: bold;\">000<\/span>);\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>Once the above code starts executing, then you can stop it by pressing Ctrl + C in the terminal.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t4\">4. clearInterval(timer)<\/strong><\/h4>\n<p>Now, the setInterval() function returns a timer object. This means\u00a0 that you can assign the<em> setInterval()<\/em> function to a variable. We can then use the <em>clearInterval()<\/em> function to clear the interval. The clearInterval function takes a timer as parameter.<\/p>\n<p>The code below stops the timer once the interval exceeds 10 seconds<\/p>\n<p>&nbsp;<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">var<\/span> time <span style=\"color: #333333;\">=<\/span> <span style=\"color: #0000dd; font-weight: bold;\">0<\/span>\r\n<span style=\"color: #008800; font-weight: bold;\">function<\/span> sayHello() {\r\n    time <span style=\"color: #333333;\">=<\/span> time <span style=\"color: #333333;\">+<\/span> <span style=\"color: #0000dd; font-weight: bold;\">1<\/span>\r\n    console.log( time <span style=\"color: #333333;\">+<\/span> <span style=\"background-color: #fff0f0;\">\" seconds have elapsed\"<\/span>);\r\n\r\n    <span style=\"color: #008800; font-weight: bold;\">if<\/span>(time <span style=\"color: #333333;\">&gt;<\/span> <span style=\"color: #0000dd; font-weight: bold;\">10<\/span>) {\r\n        clearInterval(timer)\r\n    }\r\n }\r\n \r\n <span style=\"color: #888888;\">\/\/ Call the sayHello function every 3 seconds<\/span>\r\n timer <span style=\"color: #333333;\">=<\/span> setInterval(sayHello, <span style=\"color: #0000dd; font-weight: bold;\">1000<\/span>);\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>We first create an integer variable time to keep track of the number of seconds that have passed. For each execution of the function, we increment time by 1. We also check if the time have exceeded 10 seconds. If yes, then clear the timer. I recommend you try this. Also change up the times a bit to see what you will get.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Other Objects<\/strong><\/p>\n<p>Other global objects include the Process object as well as the Console object. I discuss these in a separate chapter.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Certain objects are provided by Node.js to help us perform certain operations. These are called Global Objects. You can just use them directly. They include &hellip; <\/p>\n","protected":false},"author":1,"featured_media":29,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-27","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-node-js-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Node.js - Global Objects - Node.js Tutorials<\/title>\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.kindsonthegenius.com\/nodejs\/03-node-js-global-objects\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Node.js - Global Objects - Node.js Tutorials\" \/>\n<meta property=\"og:description\" content=\"Certain objects are provided by Node.js to help us perform certain operations. These are called Global Objects. You can just use them directly. They include &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.kindsonthegenius.com\/nodejs\/03-node-js-global-objects\/\" \/>\n<meta property=\"og:site_name\" content=\"Node.js Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-19T22:52:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-09-22T07:04:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-content\/uploads\/sites\/5\/2019\/03\/NodeJs-Tutorial-3-Global-Objects.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"878\" \/>\n\t<meta property=\"og:image:height\" content=\"482\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"kindsonthegenius\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"kindsonthegenius\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/03-node-js-global-objects\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/03-node-js-global-objects\\\/\"},\"author\":{\"name\":\"kindsonthegenius\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/#\\\/schema\\\/person\\\/7f8fc5792578d2ff54003fcebe6c46b5\"},\"headline\":\"Node.js &#8211; Global Objects\",\"datePublished\":\"2019-03-19T22:52:16+00:00\",\"dateModified\":\"2019-09-22T07:04:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/03-node-js-global-objects\\\/\"},\"wordCount\":401,\"commentCount\":2,\"image\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/03-node-js-global-objects\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2019\\\/03\\\/NodeJs-Tutorial-3-Global-Objects.jpg\",\"articleSection\":[\"Node.js Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/03-node-js-global-objects\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/03-node-js-global-objects\\\/\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/03-node-js-global-objects\\\/\",\"name\":\"Node.js - Global Objects - Node.js Tutorials\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/03-node-js-global-objects\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/03-node-js-global-objects\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2019\\\/03\\\/NodeJs-Tutorial-3-Global-Objects.jpg\",\"datePublished\":\"2019-03-19T22:52:16+00:00\",\"dateModified\":\"2019-09-22T07:04:05+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/#\\\/schema\\\/person\\\/7f8fc5792578d2ff54003fcebe6c46b5\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/03-node-js-global-objects\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/03-node-js-global-objects\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/03-node-js-global-objects\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2019\\\/03\\\/NodeJs-Tutorial-3-Global-Objects.jpg\",\"contentUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2019\\\/03\\\/NodeJs-Tutorial-3-Global-Objects.jpg\",\"width\":878,\"height\":482,\"caption\":\"NodeJs Tutorial 3 - Global Objects\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/03-node-js-global-objects\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Node.js &#8211; Global Objects\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/#website\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/\",\"name\":\"Node.js Tutorials\",\"description\":\"Best Node.js Tutorials\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/#\\\/schema\\\/person\\\/7f8fc5792578d2ff54003fcebe6c46b5\",\"name\":\"kindsonthegenius\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g\",\"caption\":\"kindsonthegenius\"},\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/author\\\/kindsonthegenius-3\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Node.js - Global Objects - Node.js Tutorials","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.kindsonthegenius.com\/nodejs\/03-node-js-global-objects\/","og_locale":"en_US","og_type":"article","og_title":"Node.js - Global Objects - Node.js Tutorials","og_description":"Certain objects are provided by Node.js to help us perform certain operations. These are called Global Objects. You can just use them directly. They include &hellip;","og_url":"https:\/\/www.kindsonthegenius.com\/nodejs\/03-node-js-global-objects\/","og_site_name":"Node.js Tutorials","article_published_time":"2019-03-19T22:52:16+00:00","article_modified_time":"2019-09-22T07:04:05+00:00","og_image":[{"width":878,"height":482,"url":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-content\/uploads\/sites\/5\/2019\/03\/NodeJs-Tutorial-3-Global-Objects.jpg","type":"image\/jpeg"}],"author":"kindsonthegenius","twitter_card":"summary_large_image","twitter_misc":{"Written by":"kindsonthegenius","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/03-node-js-global-objects\/#article","isPartOf":{"@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/03-node-js-global-objects\/"},"author":{"name":"kindsonthegenius","@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/#\/schema\/person\/7f8fc5792578d2ff54003fcebe6c46b5"},"headline":"Node.js &#8211; Global Objects","datePublished":"2019-03-19T22:52:16+00:00","dateModified":"2019-09-22T07:04:05+00:00","mainEntityOfPage":{"@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/03-node-js-global-objects\/"},"wordCount":401,"commentCount":2,"image":{"@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/03-node-js-global-objects\/#primaryimage"},"thumbnailUrl":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-content\/uploads\/sites\/5\/2019\/03\/NodeJs-Tutorial-3-Global-Objects.jpg","articleSection":["Node.js Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.kindsonthegenius.com\/nodejs\/03-node-js-global-objects\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/03-node-js-global-objects\/","url":"https:\/\/www.kindsonthegenius.com\/nodejs\/03-node-js-global-objects\/","name":"Node.js - Global Objects - Node.js Tutorials","isPartOf":{"@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/03-node-js-global-objects\/#primaryimage"},"image":{"@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/03-node-js-global-objects\/#primaryimage"},"thumbnailUrl":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-content\/uploads\/sites\/5\/2019\/03\/NodeJs-Tutorial-3-Global-Objects.jpg","datePublished":"2019-03-19T22:52:16+00:00","dateModified":"2019-09-22T07:04:05+00:00","author":{"@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/#\/schema\/person\/7f8fc5792578d2ff54003fcebe6c46b5"},"breadcrumb":{"@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/03-node-js-global-objects\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.kindsonthegenius.com\/nodejs\/03-node-js-global-objects\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/03-node-js-global-objects\/#primaryimage","url":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-content\/uploads\/sites\/5\/2019\/03\/NodeJs-Tutorial-3-Global-Objects.jpg","contentUrl":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-content\/uploads\/sites\/5\/2019\/03\/NodeJs-Tutorial-3-Global-Objects.jpg","width":878,"height":482,"caption":"NodeJs Tutorial 3 - Global Objects"},{"@type":"BreadcrumbList","@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/03-node-js-global-objects\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.kindsonthegenius.com\/nodejs\/"},{"@type":"ListItem","position":2,"name":"Node.js &#8211; Global Objects"}]},{"@type":"WebSite","@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/#website","url":"https:\/\/www.kindsonthegenius.com\/nodejs\/","name":"Node.js Tutorials","description":"Best Node.js Tutorials","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.kindsonthegenius.com\/nodejs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/#\/schema\/person\/7f8fc5792578d2ff54003fcebe6c46b5","name":"kindsonthegenius","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g","caption":"kindsonthegenius"},"url":"https:\/\/www.kindsonthegenius.com\/nodejs\/author\/kindsonthegenius-3\/"}]}},"_links":{"self":[{"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/posts\/27","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/comments?post=27"}],"version-history":[{"count":2,"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/posts\/27\/revisions"}],"predecessor-version":[{"id":30,"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/posts\/27\/revisions\/30"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/media\/29"}],"wp:attachment":[{"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/media?parent=27"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/categories?post=27"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/tags?post=27"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}