letter_counter

Counts the letters inside a string and returns an object.

Usage no npm install needed!

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

README

what is it?

*It's a function that takes a string as a parameter, and counts the letters or numbers in that string.

install

npm install letter_counter --save 

usage

const letter_counter = require('letter_counter')

console.log(letter_counter("banana"))// { b: 1, a: 3, n: 2 }

console.log(letter_counter("apple12"))//{ '1': 1, '2': 1, a: 1, p: 2, l: 1, e: 1 }