trunc

Trunc club

Usage no npm install needed!

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

README

trunc

Install

$ npm i --save trunc

Usage

import trunc from 'trunc'

const str = 'string theory'

trunc(str, 3)
// str...

API

trunc(string, value)

Truncates a string to whatever value you pass in

License

MIT © Vito Belgiorno-Zegna