just-prune
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

just-prune

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

🍦 Try it

npm install just-prune
yarn add just-prune

Prune a string with whole words and a custom suffix

  prune('when shall we three meet again', 7); // 'when...'
  prune('when shall we three meet again', 7, ' (more)'; // 'when (more)'
  prune('when shall we', 15,); // 'when shall we'
  prune('when shall we', 15, ' (etc)'); // 'when shall we'
  prune('when shall we', 7, ' (more)'); // ' (more)'

Package Sidebar

Install

npm i just-prune

Weekly Downloads

575

Version

2.2.0

License

MIT

Unpacked Size

5 kB

Total Files

9

Last publish

Collaborators

  • angus-c