X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=.config%2Fcoc%2Fextensions%2Fnode_modules%2Fcoc-prettier%2Fnode_modules%2Fpretty-format%2Fbuild%2Fplugins%2Fdom_collection.js;fp=.config%2Fcoc%2Fextensions%2Fnode_modules%2Fcoc-prettier%2Fnode_modules%2Fpretty-format%2Fbuild%2Fplugins%2Fdom_collection.js;h=0000000000000000000000000000000000000000;hb=3ddadb3c98564791f0ac36cb39771d844a63dc91;hp=d82a12530fc3a7b04fed01a162e36a8a9318fd60;hpb=5f797af6612ed10887189b47a1efc2f915586e59;p=dotfiles%2F.git diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/pretty-format/build/plugins/dom_collection.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/pretty-format/build/plugins/dom_collection.js deleted file mode 100644 index d82a1253..00000000 --- a/.config/coc/extensions/node_modules/coc-prettier/node_modules/pretty-format/build/plugins/dom_collection.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.serialize = exports.test = undefined; - -var _collections = require('../collections'); - -/** - * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - */ - -const SPACE = ' '; - -const COLLECTION_NAMES = ['DOMStringMap', 'NamedNodeMap']; - -const test = (exports.test = val => - val && - val.constructor && - COLLECTION_NAMES.indexOf(val.constructor.name) !== -1); - -const convertCollectionToObject = collection => { - let result = {}; - - if (collection.constructor.name === 'NamedNodeMap') { - for (let i = 0; i < collection.length; i++) { - result[collection[i].name] = collection[i].value; - } - } else { - result = Object.assign({}, collection); - } - - return result; -}; - -const serialize = (exports.serialize = ( - collection, - config, - indentation, - depth, - refs, - printer -) => { - if (++depth > config.maxDepth) { - return '[' + collection.constructor.name + ']'; - } - - return ( - collection.constructor.name + - SPACE + - '{' + - (0, _collections.printObjectProperties)( - convertCollectionToObject(collection), - config, - indentation, - depth, - refs, - printer - ) + - '}' - ); -}); - -exports.default = {serialize: serialize, test: test};