M
M
Maxim Ivanov2015-09-27 02:03:18
JavaScript
Maxim Ivanov, 2015-09-27 02:03:18

Is it pointless to simplify the code in this way?

I wrote an implementation of a special function so as not to write some things that are repetitive, but in essence, the code remains the same size, is there an advantage? Although unlikely, if we create another wrapper for javascript-a

In the example, the jquery implementation is identical to the implementation of the dom function
aab5539a492d45af800d1519865a8e20.jpg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin, 2015-09-27
@unity_ultra_hardcore

In my opinion, bicycles should be justified by something. In this case, nothing: there are a lot of ready-made, high-quality and tested libraries with exactly the same API. Documented and distributed in the market.
If this is a training session - then ok, if you spend employer money on writing something like this - it's not ok.

A
Alexey Lebedev, 2015-09-27
@swanrnd

On a simple project, you can do without jQuery. Why pull a library that weighs a hundred KB when we have 1KB of code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question