Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/fourtyone11/origin-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'assets/node_modules/table/dist/wrapWord.js')
-rw-r--r--assets/node_modules/table/dist/wrapWord.js47
1 files changed, 0 insertions, 47 deletions
diff --git a/assets/node_modules/table/dist/wrapWord.js b/assets/node_modules/table/dist/wrapWord.js
deleted file mode 100644
index 790b20b..0000000
--- a/assets/node_modules/table/dist/wrapWord.js
+++ /dev/null
@@ -1,47 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = void 0;
-
-var _sliceAnsi = _interopRequireDefault(require("slice-ansi"));
-
-var _stringWidth = _interopRequireDefault(require("string-width"));
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/**
- * @param {string} input
- * @param {number} size
- * @returns {Array}
- */
-const wrapWord = (input, size) => {
- let subject;
- subject = input;
- const chunks = []; // https://regex101.com/r/gY5kZ1/1
-
- const re = new RegExp('(^.{1,' + size + '}(\\s+|$))|(^.{1,' + (size - 1) + '}(\\\\|/|_|\\.|,|;|-))');
-
- do {
- let chunk;
- chunk = subject.match(re);
-
- if (chunk) {
- chunk = chunk[0];
- subject = (0, _sliceAnsi.default)(subject, (0, _stringWidth.default)(chunk));
- chunk = chunk.trim();
- } else {
- chunk = (0, _sliceAnsi.default)(subject, 0, size);
- subject = (0, _sliceAnsi.default)(subject, size);
- }
-
- chunks.push(chunk);
- } while ((0, _stringWidth.default)(subject));
-
- return chunks;
-};
-
-var _default = wrapWord;
-exports.default = _default;
-//# sourceMappingURL=wrapWord.js.map \ No newline at end of file