11 Commits

Author SHA1 Message Date
bc22390da1 docs: update version name 2024-05-19 17:15:07 +03:00
9f9ac3eebe chore(release): v1.0.0 v1.0.0 2024-05-19 16:40:14 +03:00
27db7abb6a docs: rebuild 2024-05-19 16:39:52 +03:00
2305e3505a feat(functions): add extractTextFromHTML (#1)
Initially it was planned to use JSDOM NPM package for `extractTextFromHTML`
function, however placement of JSDOM in the dependancy system prompted
significant contemplation:
- placement of JSDOM into production dependancies makes this package 3MB bigger,
which is just plain out horrible considering JSDOM has use in just one function;
- placement of JSDOM into optionalDependancies makes it possible not to install
it (however only if specifically you tell the CLI not to, essentially making it
almost no different from production dependancies in terms of size as noone
ever would spend time carefully researching an NPM package documentation just
to tell whether you need to use a very specific option or no) and adding
additional 0.4s - 0.5s slowdown to the function due to dynamic import;
- lastly, placement of JSDOM into peerDependancies simply has no use in this
case as logic of peerDependancies is much more complex than it would be
necessary in this case.

Instead I chose to add another argument to the function named `domParser`
where you are meant to provide DOMParser of your choise, that way if
@resultium/utils are used in the browser there is no additional load time or
slowdowns due to usage of browser default DOMParser and on the server you are
able to define your own parser, whether it be JSDOM, cheerio, puppeteer or
whatever you please.

However JSDOM has been added as a devDependancy in order to make tests possible,
as they run on the server side.

Resolves #1
2024-05-19 16:37:58 +03:00
cafaad76aa docs(typedoc): update docs 2024-03-12 21:38:38 +02:00
ea3cb13c85 build: add jest, tests 2024-03-12 21:23:19 +02:00
fdb28fa612 docs(typedoc): document function examples 2024-03-12 20:42:34 +02:00
ec41aebad9 docs(typedoc): change typedoc script 2024-03-12 19:56:44 +02:00
ed72704c2f build(deps): add eslint 2024-03-12 19:42:00 +02:00
85f365c528 fix(functions): SplitIntoChunks => splitIntoChunks
to comply with internal naming convention
2024-03-12 18:45:50 +02:00
2a359099ba feat: initial commit 2024-03-12 18:41:52 +02:00