Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

zero-width

bluelovers676ISC1.0.29TypeScript support: included

remove zero-width and some other util about space

check, es2018, esnext, flag, flags, helper, is, pattern, re, regex, regexp, regular expression, space, support, supported, unicode, util, valid, variation-selectors, zero-width

readme

README.md

remove zero-width and some other util about space

install

yarn add zero-width
let os = [
    '\udb40\udd00\n\r\b\t\v\u00a0  \u0009',
    ENUM_ZERO_WIDTH.SPACE,
    ENUM_ZERO_WIDTH.NO_BREAK_SPACE,
    ENUM_ZERO_WIDTH.RIGHT_TO_LEFT_MARK,
    ENUM_ZERO_WIDTH.LEFT_TO_RIGHT_MARK,
].join('');

let ns = removeZeroWidth(os);

console.dir({
    os,
    ns,
    os_len: os.length,
    ns_len: ns.length,
});

=>

{
  os: '󠄀\n\r\b\t\u000b   \t',
  ns: '\n\r\b\t\u000b   \t',
  os_len: 15,
  ns_len: 9
}

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

1.0.29 (2024-02-03)

🔖 Miscellaneous

1.0.28 (2024-01-29)

🔖 Miscellaneous

1.0.27 (2023-09-08)

📌 Dependencies

1.0.26 (2023-04-12)

🔖 Miscellaneous

1.0.25 (2022-11-01)

🔖 Miscellaneous

1.0.24 (2022-10-15)

🔖 Miscellaneous

1.0.23 (2022-09-16)

🔖 Miscellaneous

1.0.22 (2022-08-27)

♻️ Chores

🔖 Miscellaneous

1.0.20 (2022-08-26)

🔖 Miscellaneous

1.0.19 (2022-08-26)

🔖 Miscellaneous

1.0.18 (2022-08-26)

🚨 Tests

🔖 Miscellaneous

1.0.17 (2022-01-17)

🔖 Miscellaneous

1.0.16 (2021-07-05)

✨ Features

  • trim also remove control code (8a7d8a2)

🛠 Build System

  • typescript: importHelpers (0716543)

1.0.15 (2020-07-19)

♻️ Chores

1.0.14 (2020-06-21)

♻️ Chores

1.0.13 (2020-06-20)

Note: Version bump only for package zero-width

1.0.12 (2020-06-10)

Note: Version bump only for package zero-width

1.0.11 (2020-06-07)

Features

1.0.10 (2020-06-06)

Bug Fixes

  • avoid jest snap with unicode title (7192534)

1.0.9 (2020-06-06)

Bug Fixes

  • jest snap with unicode title (8bb0b19)

1.0.8 (2020-06-06)

Bug Fixes

1.0.7 (2020-06-06)

Bug Fixes

1.0.6 (2020-06-06)

Features

  • subtree import and update test (4a7a44c)