string-length

Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes

MIT License

Downloads
109.8M
Stars
158
Committers
9

Bot releases are hidden (Show)

string-length - Latest Release

Published by sindresorhus over 1 year ago

Breaking

  • Require Node.js 16 (#17) 51aa68d

Improvements

  • Improve length calculation (#17) 51aa68d

https://github.com/sindresorhus/string-length/compare/v5.0.1...v6.0.0

string-length -

Published by sindresorhus about 3 years ago

string-length -

Published by sindresorhus over 3 years ago

Breaking

  • Require Node.js 12.20 (#16) e681f7d
  • This package is now pure ESM. Please read this.

Improvements

  • Add an option to count ANSI escape codes (#16) e681f7d

https://github.com/sindresorhus/string-length/compare/v4.0.2...v5.0.0

string-length -

Published by sindresorhus over 3 years ago

  • Correctly handle zero-length ANSI string (#15) 32de93a

https://github.com/sindresorhus/string-length/compare/v4.0.1...v4.0.2

string-length -

Published by sindresorhus over 4 years ago

string-length -

Published by sindresorhus over 4 years ago

Breaking

  • Require Node.js 10

Fixes

  • Fix character matching for emoji (#7) 6c47986

https://github.com/sindresorhus/string-length/compare/v3.1.0...v4.0.0

string-length -

Published by sindresorhus over 5 years ago

  • Refactor TypeScript definition to CommonJS compatible export (#6) 8b906fc

https://github.com/sindresorhus/string-length/compare/v3.0.0...v3.1.0

string-length -

Published by sindresorhus over 5 years ago

Breaking:

  • Require Node.js 8 6e05ae5

Enhancements:

  • Add TypeScript definition (#4) da4458c

https://github.com/sindresorhus/string-length/compare/v2.0.0...v3.0.0