Ionică Bizău (Johnny B.)

Results 129 comments of Ionică Bizău (Johnny B.)

> there really isn't a way to detect browser leave event caused by user hitting Ctrl+w rather than closing it by clicking on the tab close button, or closing browsers,...

@TanaseButcaru Thank you for fixing this! :cake: Greetings from Bihor. :joy:

This is supported in a module I published recently: https://github.com/IonicaBizau/mdify It's more related to Markdown world, but for this specific task, it will probably work nicely (see the [`stringify`](https://github.com/IonicaBizau/mdify#stringifymetadata-content-opts) method):...

@PeterDaveHello Can we make a `cdnjs-tools` package where to store such scripts and then we can `require` them in random apps?

Relevant code snippet: https://github.com/cdnjs/cdnjs-importer/blob/5e4f91a71c79b738dcdc6466b1138cbcf2ae58fd/lib/index.js#L179-L186

Thanks for heads-up, @glensc! I think the importer should take the existing `filename` (if exists) and default to a smart one (if a `filename` field is not there).

@glensc Exactly! Currently, this is not supported ([the importer just overrides the `filename` field](https://github.com/cdnjs/cdnjs-importer/blob/5e4f91a71c79b738dcdc6466b1138cbcf2ae58fd/lib/index.js#L211)). It should be implemented. :smile:

There are few fields that are overridden. Instead of overriding we should default to these, I think. :sparkle:

@glensc I wrote this thingy last year and I'm not sure how stable it is with the latest changes, but feel free to report any little issue and hopefully someone...

@glensc It's fine. I guess it should default to these computed values. If there are `npm*` fields already, use them. :construction_worker: