From 0c712b67434b250f48460c06dce6877dd439a7eb Mon Sep 17 00:00:00 2001 From: James M Snell Date: Thu, 5 Jan 2017 07:27:48 -0800 Subject: [PATCH] tools: add mdn link for Iterator PR-URL: https://github.com/nodejs/node/pull/10620 Reviewed-By: Sam Roberts Reviewed-By: Joyee Cheung Reviewed-By: Michal Zasso Reviewed-By: Timothy Gu --- tools/doc/type-parser.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/doc/type-parser.js b/tools/doc/type-parser.js index 38451b0e16b358..0ac15a14b93341 100644 --- a/tools/doc/type-parser.js +++ b/tools/doc/type-parser.js @@ -1,9 +1,8 @@ 'use strict'; const nodeDocUrl = ''; -const jsDocUrl = 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/' + - 'Reference/Global_Objects/'; -const jsPrimitiveUrl = 'https://developer.mozilla.org/en-US/docs/Web/' + - 'JavaScript/Data_structures'; +const jsDocPrefix = 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/'; +const jsDocUrl = jsDocPrefix + 'Reference/Global_Objects/'; +const jsPrimitiveUrl = jsDocPrefix + 'Data_structures'; const jsPrimitives = { 'Integer': 'Number', // this is for extending 'Number': 'Number', @@ -37,6 +36,8 @@ const typeMap = { 'http.IncomingMessage': 'http.html#http_class_http_incomingmessage', 'http.Server': 'http.html#http_class_http_server', 'http.ServerResponse': 'http.html#http_class_http_serverresponse', + 'Iterator': jsDocPrefix + + 'Reference/Iteration_protocols#The_iterator_protocol' }; module.exports = {