0

I want to feature detect unicode range. I understand Modernizr has a code for it. Any way to remove the unneeded part from it and simply feature detect?

Ramanan
  • 71
  • 3
  • Welcome to Stackoverflow! It looks like you didn't pay attention to [how to ask a question](/help/how-to-ask), though: what makes you say you understand Modernizr has a code for it? Did you look that up? If so, you don't have to ask this question, you already know the answer. If you haven't: you should do some research on this yourself first, Stackoverflow is for once you've run out of place to look for information, not the place to ask before you look for information. – Mike 'Pomax' Kamermans Jul 26 '16 at 00:31
  • Well Modenizr has a code for it ... but it comes with various other unneeded code lines which I don't like. Hence I need something which is a simpler version of it. I don't see why you need to poke with "It looks like you didn't pay attention to how to ask a question," – Ramanan Jul 26 '16 at 12:11
  • because you didn't. Stackoverflow is for when you've written code of which you think it should do one thing, but it does something else, and even after investigating it yourself you can't figure out why. It's not for "does anyone know if X is possible" without any signs you already investigated that yourself, or tried to make it happen yourself. In this case, Modernizer already lets you customize it in the [download section](https://modernizr.com/download), so that suggests you did not first search, which is the first thing "how to ask" says to do. – Mike 'Pomax' Kamermans Jul 26 '16 at 15:27
  • Lol, how do you I did not search? If you do not know the answer, why are you bothering? My question simple: how to reduce the code size of Modernizr, since it has several unneeded things. It's simple. I ask a question to get an answer. So can you please excuse me and not waste my time? – Ramanan Jul 26 '16 at 19:55
  • "Stackoverflow is for when you've written code of which you think it should do one thing, " Haha. Check this popular question. Just a simple question on how to http://stackoverflow.com/questions/4793604/how-to-do-insert-after-in-javascript-without-using-a-library – Ramanan Jul 26 '16 at 19:57
  • I'm not wasting your time: go to the download section for Modernizr, pick only the feature you need. If that is still too heavy, please either explain what you've done to try to further reduce it, or explain the actual problem (other than "I feel this way"). Why is Modernizr too big for your need? Because it's a *tiny* library, <10kb with 50 broad categories enabled. – Mike 'Pomax' Kamermans Jul 27 '16 at 04:37
  • Example: Media query feature detection extracted from Modernizr - 3 lines: http://stackoverflow.com/a/17203032/5877639 Modernizr: so many lines: https://modernizr.com/download?mediaqueries-dontmin&q=media%20query – Ramanan Jul 27 '16 at 12:44
  • that's great but that does not explain why it's too big for your needs. Even if it's 1000 lines, that still gzips to irrelevantly tiny during transport and trivial unpacked on the client side, so what's the **problem** you're having that needs solving? There could be one, 10kb could genuinely be too big for you, but then *explain why* in your post. Until then, there is no problem to be fixed by other people here. – Mike 'Pomax' Kamermans Jul 27 '16 at 15:17

0 Answers0