UNPKG

pretty-format

Version:

Stringify any JavaScript value.

32 lines (14 loc) 2.68 kB
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.print = exports.test = undefined; var _print_immutable = require('./lib/print_immutable');var _print_immutable2 = _interopRequireDefault(_print_immutable);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} /** * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * */const IS_LIST = '@@__IMMUTABLE_LIST__@@';const test = exports.test = maybeList => !!(maybeList && maybeList[IS_LIST]);const print = exports.print = (val, print, indent, opts, colors) => (0, _print_immutable2.default)(val, print, indent, opts, colors, 'List', false);exports.default = { print, test };