From 5e9974f9ac915d87dcb33d5a37c9fdb4e6e9b4aa Mon Sep 17 00:00:00 2001 From: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> Date: Thu, 26 Mar 2020 01:55:00 +0100 Subject: [PATCH] =?UTF-8?q?refactor(dictionary):=20Rename=C2=A0`convertInh?= =?UTF-8?q?erit`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/constructs/dictionary.js | 6 +++--- test/__snapshots__/test.js.snap | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/constructs/dictionary.js b/lib/constructs/dictionary.js index 97de5f74..84c3b1c0 100644 --- a/lib/constructs/dictionary.js +++ b/lib/constructs/dictionary.js @@ -70,12 +70,12 @@ class Dictionary { generate() { this.str += ` - exports.convertInherit = function convertInherit(obj, ret, { context = "The provided value" } = {}) { + exports._convertInherit = (obj, ret, { context = "The provided value" } = {}) => { `; if (this.idl.inheritance) { this.str += ` - ${this.idl.inheritance}.convertInherit(obj, ret, { context }); + ${this.idl.inheritance}._convertInherit(obj, ret, { context }); `; } @@ -89,7 +89,7 @@ class Dictionary { } const ret = Object.create(null); - module.exports.convertInherit(obj, ret, { context }); + exports._convertInherit(obj, ret, { context }); return ret; }; `; diff --git a/test/__snapshots__/test.js.snap b/test/__snapshots__/test.js.snap index c4a81abc..537dc9cb 100644 --- a/test/__snapshots__/test.js.snap +++ b/test/__snapshots__/test.js.snap @@ -802,7 +802,7 @@ const utils = require(\\"./utils.js\\"); const URL = require(\\"./URL.js\\"); const URLSearchParams = require(\\"./URLSearchParams.js\\"); -exports.convertInherit = function convertInherit(obj, ret, { context = \\"The provided value\\" } = {}) { +exports._convertInherit = (obj, ret, { context = \\"The provided value\\" } = {}) => { { const key = \\"boolWithDefault\\"; let value = obj === undefined || obj === null ? undefined : obj[key]; @@ -865,7 +865,7 @@ exports.convert = function convert(obj, { context = \\"The provided value\\" } = } const ret = Object.create(null); - module.exports.convertInherit(obj, ret, { context }); + exports._convertInherit(obj, ret, { context }); return ret; }; " @@ -7828,7 +7828,7 @@ const utils = require(\\"./utils.js\\"); const URL = require(\\"./URL.js\\"); const URLSearchParams = require(\\"./URLSearchParams.js\\"); -exports.convertInherit = function convertInherit(obj, ret, { context = \\"The provided value\\" } = {}) { +exports._convertInherit = (obj, ret, { context = \\"The provided value\\" } = {}) => { { const key = \\"boolWithDefault\\"; let value = obj === undefined || obj === null ? undefined : obj[key]; @@ -7891,7 +7891,7 @@ exports.convert = function convert(obj, { context = \\"The provided value\\" } = } const ret = Object.create(null); - module.exports.convertInherit(obj, ret, { context }); + exports._convertInherit(obj, ret, { context }); return ret; }; "