dots

Truncate string

Usage no npm install needed!

<script type="module">
  import dots from 'https://cdn.skypack.dev/dots';
</script>

README

dots Build Status

Truncate string

Install

$ npm install --save dots

Usage

const dots = require('dots');

dots('unicorn', 4);
//=> 'uni…'

License

MIT © Sindre Sorhus