From 57e5315990337729b58def95f7cfdf093b43da45 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Sun, 22 Jan 2017 14:29:12 -0800 Subject: [PATCH] url: stop exporting originFor() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/10955 Fixes: https://github.com/nodejs/node/issues/10800 Reviewed-By: James M Snell Reviewed-By: Joyee Cheung Reviewed-By: Michaƫl Zasso --- lib/internal/url.js | 1 - lib/url.js | 1 - .../test-util-inspect-tuple-origin.js | 37 ------------------- 3 files changed, 39 deletions(-) delete mode 100644 test/parallel/test-util-inspect-tuple-origin.js diff --git a/lib/internal/url.js b/lib/internal/url.js index 679e14d72a9c39..c976e950076eaf 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -1046,7 +1046,6 @@ function urlToOptions(url) { exports.URL = URL; exports.URLSearchParams = URLSearchParams; -exports.originFor = originFor; exports.domainToASCII = domainToASCII; exports.domainToUnicode = domainToUnicode; exports.encodeAuth = encodeAuth; diff --git a/lib/url.js b/lib/url.js index 933ffe13b4d9e4..2f05cc6648ab48 100644 --- a/lib/url.js +++ b/lib/url.js @@ -18,7 +18,6 @@ exports.resolveObject = urlResolveObject; exports.format = urlFormat; exports.URL = internalUrl.URL; exports.URLSearchParams = internalUrl.URLSearchParams; -exports.originFor = internalUrl.originFor; exports.domainToASCII = internalUrl.domainToASCII; exports.domainToUnicode = internalUrl.domainToUnicode; diff --git a/test/parallel/test-util-inspect-tuple-origin.js b/test/parallel/test-util-inspect-tuple-origin.js deleted file mode 100644 index 743651098f60db..00000000000000 --- a/test/parallel/test-util-inspect-tuple-origin.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -require('../common'); -const assert = require('assert'); -const inspect = require('util').inspect; -const originFor = require('url').originFor; - -assert.strictEqual( - inspect(originFor('http://test.com:8000')), - `TupleOrigin { - scheme: http, - host: test.com, - port: 8000, - domain: null - }` - ); - -assert.strictEqual( - inspect(originFor('http://test.com')), - `TupleOrigin { - scheme: http, - host: test.com, - port: undefined, - domain: null - }` - ); - - -assert.strictEqual( - inspect(originFor('https://test.com')), - `TupleOrigin { - scheme: https, - host: test.com, - port: undefined, - domain: null - }` - );