A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1808 below:

buffer` · Issue #1808 · sindresorhus/eslint-plugin-unicorn · GitHub

Description

This rule is more targeted for cross platform compatibility reasons. node:buffer is a node specific module and i mostly just see it as something that bloats browser bundles and runs slower (in none NodeJS contexts - or using npm:buffer instead of node:buffer).

I bet if you read this issue then you will maybe also be convinced that node:buffer is just unnecessary.

Fail
Buffer.from('hello world')
Pass
new TextEncoder().encode('hello world')
Additional Info

Replacing node:buffer with Uint8Array can be a lot. and maybe not that easy to autofix
Maybe dividing it up to smaller task could be easier.

like

sindresorhus, jimmywarting, yudai-nkt, esdmr, juliomrqz and 2 more


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4