occurence_zuoqin

Occurence is a library to find the occurence of all the words in a given text.

Usage no npm install needed!

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

README

Occurence

1. what is it?

Occurence is a library to find the occurence of all the words in a given text.

  • it will ignore words whose length is less than 3.
  • it will filter away punctuations like #,«,»,’,? etc.

2. intallation?

npm install occurence_zuoqin --save

3. how to use it?

import Occurence from "occurence_zuoqin";
let text = `Hello, hello HEllo ? 
  {hello} "hello \hello" -hello *hello
  `;
let result = Occurence(text); // output: { hello: 8 }