H
H
hbrmdc2015-08-14 12:35:27
PHP
hbrmdc, 2015-08-14 12:35:27

Why don't all npm packages work after import?

some npm packages, such as this one: scottcheng.github.io/cropit
, can be installed via npm, but if you import this package like any other (import Cropit from 'cropit'), its functions will not work. Moreover, the console does not swear that the 'cropit' package was not found, therefore everything is OK.
If you manually extract the code from the dist folder of this package and inject it globally, then the functions work.
1. Why so?
about the same with jquery
2. and yet, why do you need to make it possible to install the css framework through npm, if css cannot be imported through it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
serginhold, 2019-02-07
@serginhold

CSV is just a comma-separated string, no encodings need to be changed in the header or on the server.

$csvRow = 'a,b,"c,d"';
$csvRow = mb_convert_encoding($csvRow, "UTF-8", "Windows-1251"); // или cp1251
file_put_content($file, $csvRow . PHP_EOL, FILE_APPEND);

S
Sergey, 2019-05-06
@oldzas

Try iconv

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question