UNPKG

570 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = applyToJSON;
7
8/**
9 * Copyright (c) 2015-present, Facebook, Inc.
10 *
11 * This source code is licensed under the MIT license found in the
12 * LICENSE file in the root directory of this source tree.
13 *
14 * strict
15 */
16
17/**
18 * The `applyToJSON()` function defines toJSON() and inspect() prototype
19 * methods which are aliases for toString().
20 */
21function applyToJSON(classObject) {
22 classObject.prototype.toJSON = classObject.prototype.inspect = classObject.prototype.toString;
23}
\No newline at end of file