Giter Club home page Giter Club logo

caniuse-cmd's People

Contributors

adrianocahete avatar blindlybright avatar davidsawyer avatar mdawaffe avatar sgentle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

caniuse-cmd's Issues

Result for multiple features

Is it possible to search for multiple features?
e.g. Is it possible to node .\bin.js async-functions,object-values

Note supers are hard to spot

The supers for notes are the same color as the percentage to which they belong making them hard to see. It would be nice if they were all a consistent color (not the red/yellow/green) so I could see the note, and spot which version it applies to easily.

caniuse let example

Show the latest browser versions

If I see that Chrome 24 partially supports for a feature, I might think that's relevant unless I see that the latest version of Chrome is 47 ๐Ÿ˜…

Maybe something like this:

Chrome โœ˜ 4+ โ—’ 8+ยน โ—’ 23+ยฒ โœ” 24+ โ€ฆ 47

Rewrite the whole project in vanilla JavaScript

Sorry but I have to ask about that. As you know, nowadays CoffeeScript is pretty outdated. Want to help out, create pull requests but those CoffeeScript lines makes me really sick (there is no reason to learn that in 2017) and I am quite really sure there are plenty amount of people who don't want to write CoffeeScript. So, converting the project vanilla JavaScript will increase potential contributors.

Can I configure a usage threshold?

Era is great, but I'd love to be able to only display browsers and usage percentage for only those browser above 1% or some other configurable threshold.

Just a feature idea : )

Error Installing caniuse-cmd

Hi,

I'm running Pop 22.04 with ZSH. I've tried running npm install -g caniuse-cmd and sudo npm install -g caniuse-cmd but I am getting installation error messages -

sudo npm install -g caniuse-cmd                                                                
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects clone -b config-booleans ssh://[email protected]/sgentle/yargs.git /root/.npm/_cacache/tmp/git-cloneJvCgYn --recurse-submodules --depth=1
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-cloneJvCgYn': Permission denied

I've npm 8.13.2

Partial Support Percentage Not Always Shown

If there are no browsers that fully support a feature and at least one browser that partially supports the feature, that partial support percentage is not shown.

Compare the actual output:

# only full, no partial
$ caniuse --oneline hidden
hidden attribute โœ” 92.16% โ—’ 0% [WHATWG Living Standard]

# full and partial
$ caniuse --oneline spellcheck
Spellcheck attribute โœ” 54.57% โ—’ 39.3% [WHATWG Living Standard]

# no full, only partial
$ caniuse --oneline 'svg favicon'
SVG favicons  [WHATWG Living Standard]

# no support
$ caniuse --oneline placeholder-shown
:placeholder-shown CSS pseudo-class  [W3C Working Draft]

with the expected:

# only full, no partial
$ caniuse --oneline --current hidden
hidden attribute โœ” 92.16% [WHATWG Living Standard]

# full and partial
$ caniuse --oneline spellcheck
Spellcheck attribute โœ” 54.57% โ—’ 39.3% [WHATWG Living Standard]

# no full, only partial
$ caniuse --oneline 'svg favicon'
SVG favicons โ—’ 10.41% [WHATWG Living Standard]

# no support
$ caniuse --oneline placeholder-shown
:placeholder-shown CSS pseudo-class  [W3C Working Draft]

It looks like there's a typo in showFeature:

diff --git a/caniuse.coffee b/caniuse.coffee
index f5f5050..48f9dff 100644
--- a/caniuse.coffee
+++ b/caniuse.coffee
@@ -150 +150 @@ showFeature = (result, opts={}) ->
-  percentages.push "โ—’ #{result.usage_perc_a}%".yellow if result.usage_perc_y
+  percentages.push "โ—’ #{result.usage_perc_a}%".yellow if result.usage_perc_a

Or perhaps this is all intentional (only show the percentages if there's something that fully supports the feature), in which case close away :)

Is custom version of yargs still required?

This project uses a fork of yargs with a config-booleans branch.

"yargs": "git+https://github.com/sgentle/yargs.git#config-booleans"

It looks like the new yargs-parser has changes related to default booleans, and this fork may no longer be required.


Snippet of some of the changes:

https://github.com/sgentle/yargs/blob/7be15b84049f00e6a0c11827c5b16496aeaddd19/lib/parser.js#L316..L344

    Object.keys(flags.configs).forEach(function (configKey) {
...
            // setting arguments via CLI takes precedence over
            // values within the config file.
            if (argv[key] === undefined || (flags.defaulted[key])) {
              delete argv[key]
              setArg(key, config[key])
            }
          })
        } catch (ex) {
          if (argv[configKey]) error = Error(__('invalid json config file: %s', configPath))
        }
      }
    })
  }

Snippet of some of current yargs-parser code:

https://github.com/yargs/yargs-parser/blob/82f4ea5810ca36dbe934de593eb0d45cdcc724c2/index.js#L498..L519

    Object.keys(config).forEach(function (key) {
...
        // setting arguments via CLI takes precedence over
        // values within the config file.
        if (!hasKey(argv, fullKey.split('.')) || (flags.defaulted[fullKey]) || (flags.arrays[fullKey] && configuration['combine-arrays'])) {
          setArg(fullKey, value)
        }
      }
    })
  }

Provide License

I couldn't find a license with this code. Could you add an open source license? I recommend MIT.

Add a config file

It would be great to have a ~/.caniuse file to specify my default options. For example, I'm generally interested in --era e2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.