Izmjenjena struktura, dodan backand

This commit is contained in:
GotPPay
2017-10-16 11:19:46 +02:00
parent 1ec88afacb
commit 048e32c4aa
37153 changed files with 2975854 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
'use strict'; /**
* 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.
*
*
*/
function escapeHTML(str) {
return str.replace(/</g, '&lt;').replace(/>/g, '&gt;');
}
module.exports = escapeHTML;

View File

@@ -0,0 +1,57 @@
'use strict';var _slicedToArray2 = require('babel-runtime/helpers/slicedToArray');var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
var IMMUTABLE_NAMESPACE = 'Immutable.'; /**
* 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.
*
*
*/var SPACE = ' ';var addKey = function addKey(isMap, key) {return isMap ? key + ': ' : '';};var addFinalEdgeSpacing = function addFinalEdgeSpacing(length, edgeSpacing) {return length > 0 ? edgeSpacing : '';};var printImmutable = function printImmutable(
val,
print,
indent,
opts,
colors,
immutableDataStructureName,
isMap)
{var _ref =
isMap ? ['{', '}'] : ['[', ']'],_ref2 = (0, _slicedToArray3.default)(_ref, 2),openTag = _ref2[0],closeTag = _ref2[1];
var result =
IMMUTABLE_NAMESPACE +
immutableDataStructureName +
SPACE +
openTag +
opts.edgeSpacing;
var immutableArray = [];
val.forEach(function (item, key) {return (
immutableArray.push(
indent(addKey(isMap, key) + print(item, print, indent, opts, colors))));});
result += immutableArray.join(',' + opts.spacing);
if (!opts.min && immutableArray.length > 0) {
result += ',';
}
return (
result +
addFinalEdgeSpacing(immutableArray.length, opts.edgeSpacing) +
closeTag);
};
module.exports = printImmutable;