Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Textwrap for javascript/nodejs. Correctly handles wide characters (宽字符) and emojis (😃). Wraps strings with option to break on words.",
"main": "src/main.js",
"engines": {
"node": ">=6"
"node": ">=12"
},
"bin": {
"smartwrap": "src/terminal-adapter.js"
Expand All @@ -25,7 +25,6 @@
"author": "tecfu",
"license": "MIT",
"dependencies": {
"array.prototype.flat": "^1.2.3",
"breakword": "^1.0.5",
"grapheme-splitter": "^1.0.4",
"strip-ansi": "^6.0.0",
Expand Down
2 changes: 0 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
const breakword = require("breakword")
const stripansi = require("strip-ansi")
const wcwidth = require("wcwidth")
const flat = require("array.prototype.flat")
if (!Array.prototype.flat) flat.shim()

const ANSIPattern = [
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
Expand Down