a795e9f3b601550a2377bf2fe48ef784.json 14 KB

1
  1. {"ast":null,"code":"'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.printIteratorEntries = printIteratorEntries;\nexports.printIteratorValues = printIteratorValues;\nexports.printListItems = printListItems;\nexports.printObjectProperties = printObjectProperties;\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nconst getKeysOfEnumerableProperties = object => {\n const keys = Object.keys(object).sort();\n\n if (Object.getOwnPropertySymbols) {\n Object.getOwnPropertySymbols(object).forEach(symbol => {\n if (Object.getOwnPropertyDescriptor(object, symbol).enumerable) {\n keys.push(symbol);\n }\n });\n }\n\n return keys;\n};\n/**\n * Return entries (for example, of a map)\n * with spacing, indentation, and comma\n * without surrounding punctuation (for example, braces)\n */\n\n\nfunction printIteratorEntries(iterator, config, indentation, depth, refs, printer, // Too bad, so sad that separator for ECMAScript Map has been ' => '\n// What a distracting diff if you change a data structure to/from\n// ECMAScript Object or Immutable.Map/OrderedMap which use the default.\nseparator = ': ') {\n let result = '';\n let current = iterator.next();\n\n if (!current.done) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n while (!current.done) {\n const name = printer(current.value[0], config, indentationNext, depth, refs);\n const value = printer(current.value[1], config, indentationNext, depth, refs);\n result += indentationNext + name + separator + value;\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n/**\n * Return values (for example, of a set)\n * with spacing, indentation, and comma\n * without surrounding punctuation (braces or brackets)\n */\n\n\nfunction printIteratorValues(iterator, config, indentation, depth, refs, printer) {\n let result = '';\n let current = iterator.next();\n\n if (!current.done) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n while (!current.done) {\n result += indentationNext + printer(current.value, config, indentationNext, depth, refs);\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n/**\n * Return items (for example, of an array)\n * with spacing, indentation, and comma\n * without surrounding punctuation (for example, brackets)\n **/\n\n\nfunction printListItems(list, config, indentation, depth, refs, printer) {\n let result = '';\n\n if (list.length) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n for (let i = 0; i < list.length; i++) {\n result += indentationNext + printer(list[i], config, indentationNext, depth, refs);\n\n if (i < list.length - 1) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n/**\n * Return properties of an object\n * with spacing, indentation, and comma\n * without surrounding punctuation (for example, braces)\n */\n\n\nfunction printObjectProperties(val, config, indentation, depth, refs, printer) {\n let result = '';\n const keys = getKeysOfEnumerableProperties(val);\n\n if (keys.length) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const name = printer(key, config, indentationNext, depth, refs);\n const value = printer(val[key], config, indentationNext, depth, refs);\n result += indentationNext + name + ': ' + value;\n\n if (i < keys.length - 1) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}","map":{"version":3,"sources":["/Users/jane/Documents/Курс Front-end/HW8/myproject/node_modules/pretty-format/build/collections.js"],"names":["Object","defineProperty","exports","value","printIteratorEntries","printIteratorValues","printListItems","printObjectProperties","getKeysOfEnumerableProperties","object","keys","sort","getOwnPropertySymbols","forEach","symbol","getOwnPropertyDescriptor","enumerable","push","iterator","config","indentation","depth","refs","printer","separator","result","current","next","done","spacingOuter","indentationNext","indent","name","spacingInner","min","list","length","i","val","key"],"mappings":"AAAA;;AAEAA,MAAM,CAACC,cAAP,CAAsBC,OAAtB,EAA+B,YAA/B,EA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AyDC,KAAzD,EAAgEC,IAAhE,EAAsEC,OAAtE,EAA+E;AAC7E,MAAIE,MAAM,GAAG,EAAb;AACA,QAAMf,IAAI,GAAGF,6BAA6B,CAAC8B,GAAD,CAA1C;;AAEA,MAAI5B,IAAI,CAAC0B,MAAT,EAAiB;AACfX,IAAAA,MAAM,IAAIN,MAAM,CAACU,YAAjB;AACA,UAAMC,eAAe,GAAGV,WAAW,GAAGD,MAAM,CAACY,MAA7C;;AAEA,SAAK,IAAIM,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAG3B,IAAI,CAAC0B,MAAzB,EAAiCC,CAAC,EAAlC,EAAsC;AACpC,YAAME,GAAG,GAAG7B,IAAI,CAAC2B,CAAD,CAAhB;AACA,YAAML,IAAI,GAAGT,OAAO,CAACgB,GAAD,EAAMpB,MAAN,EAAcW,eAAd,EAA+BT,KAA/B,EAAsCC,IAAtC,CAApB;AACA,YAAMnB,KAAK,GAAGoB,OAAO,CAACe,GAAG,CAACC,GAAD,CAAJ,EAAWpB,MAAX,EAAmBW,eAAnB,EAAoCT,KAApC,EAA2CC,IAA3C,CAArB;AACAG,MAAAA,MAAM,IAAIK,eAAe,GAAGE,IAAlB,GAAyB,IAAzB,GAAgC7B,KAA1C;;AAEA,UAAIkC,CAAC,GAAG3B,IAAI,CAAC0B,MAAL,GAAc,CAAtB,EAAyB;AACvBX,QAAAA,MAAM,IAAI,MAAMN,MAAM,CAACc,YAAvB;AACD,OAFD,MAEO,IAAI,CAACd,MAAM,CAACe,GAAZ,EAAiB;AACtBT,QAAAA,MAAM,IAAI,GAAV;AACD;AACF;;AAEDA,IAAAA,MAAM,IAAIN,MAAM,CAACU,YAAP,GAAsBT,WAAhC;AACD;;AAED,SAAOK,MAAP;AACD","sourcesContent":["'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.printIteratorEntries = printIteratorEntries;\nexports.printIteratorValues = printIteratorValues;\nexports.printListItems = printListItems;\nexports.printObjectProperties = printObjectProperties;\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst getKeysOfEnumerableProperties = object => {\n const keys = Object.keys(object).sort();\n\n if (Object.getOwnPropertySymbols) {\n Object.getOwnPropertySymbols(object).forEach(symbol => {\n if (Object.getOwnPropertyDescriptor(object, symbol).enumerable) {\n keys.push(symbol);\n }\n });\n }\n\n return keys;\n};\n/**\n * Return entries (for example, of a map)\n * with spacing, indentation, and comma\n * without surrounding punctuation (for example, braces)\n */\n\nfunction printIteratorEntries(\n iterator,\n config,\n indentation,\n depth,\n refs,\n printer, // Too bad, so sad that separator for ECMAScript Map has been ' => '\n // What a distracting diff if you change a data structure to/from\n // ECMAScript Object or Immutable.Map/OrderedMap which use the default.\n separator = ': '\n) {\n let result = '';\n let current = iterator.next();\n\n if (!current.done) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n while (!current.done) {\n const name = printer(\n current.value[0],\n config,\n indentationNext,\n depth,\n refs\n );\n const value = printer(\n current.value[1],\n config,\n indentationNext,\n depth,\n refs\n );\n result += indentationNext + name + separator + value;\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n/**\n * Return values (for example, of a set)\n * with spacing, indentation, and comma\n * without surrounding punctuation (braces or brackets)\n */\n\nfunction printIteratorValues(\n iterator,\n config,\n indentation,\n depth,\n refs,\n printer\n) {\n let result = '';\n let current = iterator.next();\n\n if (!current.done) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n while (!current.done) {\n result +=\n indentationNext +\n printer(current.value, config, indentationNext, depth, refs);\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n/**\n * Return items (for example, of an array)\n * with spacing, indentation, and comma\n * without surrounding punctuation (for example, brackets)\n **/\n\nfunction printListItems(list, config, indentation, depth, refs, printer) {\n let result = '';\n\n if (list.length) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n for (let i = 0; i < list.length; i++) {\n result +=\n indentationNext +\n printer(list[i], config, indentationNext, depth, refs);\n\n if (i < list.length - 1) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n/**\n * Return properties of an object\n * with spacing, indentation, and comma\n * without surrounding punctuation (for example, braces)\n */\n\nfunction printObjectProperties(val, config, indentation, depth, refs, printer) {\n let result = '';\n const keys = getKeysOfEnumerableProperties(val);\n\n if (keys.length) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const name = printer(key, config, indentationNext, depth, refs);\n const value = printer(val[key], config, indentationNext, depth, refs);\n result += indentationNext + name + ': ' + value;\n\n if (i < keys.length - 1) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n"]},"metadata":{},"sourceType":"script"}