From fca5484e7e6bd850635e26bca0559af979e13ce9 Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Wed, 12 Dec 2018 18:32:10 +0200 Subject: [PATCH] Rename exported functions to match filenames --- src/jsutils/defineToJSON.js | 4 ++-- src/jsutils/defineToStringTag.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/jsutils/defineToJSON.js b/src/jsutils/defineToJSON.js index fde3f6c3fa..44d94d8310 100644 --- a/src/jsutils/defineToJSON.js +++ b/src/jsutils/defineToJSON.js @@ -8,10 +8,10 @@ */ /** - * The `applyToJSON()` function defines toJSON() and inspect() prototype + * The `defineToJSON()` function defines toJSON() and inspect() prototype * methods which are aliases for toString(). */ -export default function applyToJSON(classObject: Class): void { +export default function defineToJSON(classObject: Class): void { classObject.prototype.toJSON = classObject.prototype.inspect = classObject.prototype.toString; } diff --git a/src/jsutils/defineToStringTag.js b/src/jsutils/defineToStringTag.js index f539cde26e..27522773bf 100644 --- a/src/jsutils/defineToStringTag.js +++ b/src/jsutils/defineToStringTag.js @@ -8,19 +8,19 @@ */ /** - * The `applyToStringTag()` function checks first to see if the runtime + * The `defineToStringTag()` function checks first to see if the runtime * supports the `Symbol` class and then if the `Symbol.toStringTag` constant * is defined as a `Symbol` instance. If both conditions are met, the * Symbol.toStringTag property is defined as a getter that returns the * supplied class constructor's name. * - * @method applyToStringTag + * @method defineToStringTag * * @param {Class} classObject a class such as Object, String, Number but * typically one of your own creation through the class keyword; `class A {}`, * for example. */ -export default function applyToStringTag(classObject: Class): void { +export default function defineToStringTag(classObject: Class): void { if (typeof Symbol === 'function' && Symbol.toStringTag) { Object.defineProperty(classObject.prototype, Symbol.toStringTag, { get() {