• Stars
    star
    1,592
  • Rank 29,380 (Top 0.6 %)
  • Language
    CoffeeScript
  • License
    MIT License
  • Created over 9 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Caniuse command line tool

caniuse-cmd

Just what you've always wanted, it's a caniuse command line tool! All the power of caniuse.com with none of the nice UI or interactivity!

How do?

Install with npm install -g caniuse-cmd.

Then type things like this:

$ caniuse websockets
Web Sockets βœ” 85.22% β—’ 1.35% [W3C Candidate Recommendation]
  Bidirectional communication technology for web apps #JSAPI

  IE ✘ 5.5+ βœ” 10+
  Firefox ✘ 2+ β—’ 4+ΒΉ β—’ 6+α΅–Β² βœ” 11+
  Chrome β—’ 4+ΒΉ β—’ 15+Β² βœ” 16+
  Safari ✘ 3.1+ β—’ 5+ΒΉ β—’ 6+Β² βœ” 7+
  Opera ✘ 9+ β—’ 11+ΒΉ βœ” 12.1+

    ΒΉPartial support refers to the websockets implementation using an older version of the protocol and/or the
    implementation being disabled by default (due to security issues with the older protocol).
    Β²Partial support refers to lacking support for binary data.

(The output has truly marvellous colours that this markdown is too narrow to contain.)

Or this:

$ caniuse input
caniuse input
HTML5 form features βœ” 4.21% β—’ 82.39%
  IE ✘ 5.5+ β—’ 10+ Firefox ✘ 2+ β—’ 4+ Chrome β—’  Safari ✘ 3.1+ β—’ 4+ Opera βœ” 9+ β—’ 15+
Spellcheck attribute βœ” 60.31% β—’ 31.63%
  IE ✘ 5.5+ βœ” 10+ Firefox βœ”  Chrome ✘ 4+ βœ” 9+ Safari ✘ 3.1+ βœ” 5.1+ Opera ✘ 9+ βœ” 10.5+
Range input type βœ” 87.46% β—’ 1.18%
  IE ✘ 5.5+ βœ” 10+ Firefox ✘ 2+ βœ” 23+ Chrome β€½ 4+ βœ” 5+ Safari βœ”  Opera βœ”
Date and time input types βœ” 60.76% β—’ 0%
  IE ✘  Firefox ✘  Chrome ✘ 4+ βœ” 20+ Safari ✘  Opera βœ”
Color input type βœ” 60.93% β—’ 3.84%
  IE ✘  Firefox ✘ 2+ βœ” 29+ Chrome ✘ 4+ βœ” 20+ Safari ✘  Opera ✘ 9+ βœ” 11+ ✘ 15+ βœ” 17+
Number input type βœ” 49.95% β—’ 38.03%
  IE ✘ 5.5+ β—’ 10+ Firefox ✘ 2+ βœ” 29+ Chrome ✘ 4+ βœ” 6+ Safari ✘ 3.1+ βœ” 5+ Opera βœ”
input placeholder attribute βœ” 88.04% β—’ 1.15%
  IE ✘ 5.5+ βœ” 10+ Firefox ✘ 2+ βœ” 4+ Chrome βœ”  Safari β—’ 3.1+ βœ” 5+ Opera ✘ 9+ β—’ 11+ βœ” 11.5+
Pointer events βœ” 8.5% β—’ 1.67%
  IE ✘ 5.5+ β—’ 10+α΅– βœ” 11+ Firefox ✘  Chrome ✘  Safari ✘ 3.1+ β€½ 6.1+ Opera ✘
Web Speech API
  IE ✘  Firefox ✘  Chrome ✘ 4+ β—’ 25+α΅– Safari ✘ 3.1+ β—’ 6.1+α΅– β—’ 7.1+ Opera ✘
Multiple file selection βœ” 67.63% β—’ 0%
  IE ✘ 5.5+ βœ” 10+ Firefox ✘ 2+ βœ” 3.6+ Chrome ✘ 4+ βœ” 5+ Safari ✘ 3.1+ βœ” 4+ Opera ✘ 9+ βœ” 10.6+
Gamepad API βœ” 46.08% β—’ 0%
  IE ✘  Firefox ✘ 2+ βœ” 29+ Chrome ✘ 4+ βœ” 21+α΅– βœ” 25+ Safari ✘  Opera ✘ 9+ βœ” 24+
Pattern attribute for input fields βœ” 72.88% β—’ 0.7%
  IE ✘ 5.5+ βœ” 10+ Firefox ✘ 2+ βœ” 4+ Chrome ✘ 4+ βœ” 10+ Safari ✘  Opera ✘ 9+ βœ” 9.5-9.6+

Does it have lots of command line options?

Yes!

$ caniuse --help
Options:
Options:
  --short, -s            Short output: show browsers on one line and don't
                         display notes or description (default when displaying
                         multiple results)                             [boolean]
  --long, -l             Long output: show more information (default when
                         displaying a single result)                   [boolean]
  --oneline, -1          One-line output: just global percentages, no per-
                         browser info                 [boolean] [default: false]
  --oneline-browser, -2  One-line output with browser info, implies --abbrev and
                         --current                    [boolean] [default: false]
  --abbrev, -a           Abbreviate browser names     [boolean] [default: false]
  --percentages, -p      Include browser version usage percentages
                                                      [boolean] [default: false]
  --future, -f           Include future browser versions
                                                      [boolean] [default: false]
  --current, -c          Don't include old browser versions, equivalent to --era
                         e0                           [boolean] [default: false]
  --era, -e              How many versions back to go, e0 to e-40       [string]
  --mobile, -m           Include mobile browsers      [boolean] [default: false]
  --desktop, -d          Include desktop browsers      [boolean] [default: true]
  --browser, -b          Show results for these browsers, comma-separated (ie,
                         edge,firefox,chrome,safari,opera,ios_saf,op_mini,
                         android,bb,op_mob,and_chr,and_ff,ie_mob,and_uc)
                                                                        [string]
  --web, -w              Go to the search page on caniuse.com
                                                      [boolean] [default: false]
  --config, -C           Path to JSON config file
                                 [string] [default: "/Users/user/.caniuse.json"]
  --ascii, -A            UTF-8 symbols replacement with ASCII description
                                                      [boolean] [default: false]
  --help                 Show help                                     [boolean]

Woah, that's a lot of options! Can haz config file?

Yes! You can specify your own defaults by creating a file called .caniuse.json and putting it in your home directory.

For example, if you're primarily interested in mobile browsers two versions back:

{
  "era": "e-2",
  "mobile": true,
  "desktop": false
}

More Repositories

1

catenary

Concatenative programming for Javascript
CoffeeScript
103
star
2

chip

CoffeeScript
69
star
3

tabletone

Live-looping in Javascript!
JavaScript
40
star
4

scrawl

An iterative doodling adventure!
HTML
35
star
5

pere

Record and playback DOM edits
HTML
29
star
6

chef-node

Chef API client for nodejs
JavaScript
26
star
7

automata-by-example

Automata by Example
CSS
18
star
8

devrouter

Easy router for developing http services
JavaScript
16
star
9

unql-node

SQL-like frontend for CouchDB
CoffeeScript
15
star
10

markov-technology

Markov Technology
JavaScript
14
star
11

soundoflife

HTML
8
star
12

redux-actionemitter

Redux actions as event emitters
JavaScript
8
star
13

areyousure

Chrome extension to make you think before visiting distracting sites
CSS
7
star
14

pairjs

Instant pair programming for the interweb
JavaScript
6
star
15

markov-contact

A dynamic audio journey
JavaScript
6
star
16

E-X-T-E-N-S-I-O-N

Adds a special button after every mention of the word "inception" on a webpage.
JavaScript
5
star
17

whenthefuckissydjs

HTML
5
star
18

infinite-gest

JavaScript
4
star
19

mpd-rest

RESTful MPD interface
CoffeeScript
4
star
20

MPDTie

Ruby-based Bowtie MPD remote controller
Ruby
4
star
21

starboard

Shooting Stars keyboard
HTML
3
star
22

automaintainer

3
star
23

python-cec-daemon

Python CEC daemon for uinput
Python
3
star
24

pass-scene

HTML
3
star
25

medb-github

MeDB plugin for GitHub
CoffeeScript
3
star
26

medb

Pluggable InfluxDB loader for personal data analytics
CoffeeScript
3
star
27

audiomata

CoffeeScript
2
star
28

promises-talk

A talk about promises
CoffeeScript
2
star
29

kata

Practice makes perfect
CSS
2
star
30

davescript

2
star
31

docs-in-a-box

CoffeeScript
2
star
32

relative-word-cloud

JavaScript
2
star
33

mpdiment

NodeJS MPD web interface
CoffeeScript
2
star
34

medb-posts

CoffeeScript
2
star
35

fetch-progress-lol

How to make a progress bar for the Fetch API
HTML
2
star
36

evtail

Automatically exported from code.google.com/p/evtail
C
2
star
37

monotonic

CoffeeScript
2
star
38

shakeoff

Silly web game based on Socket.IO and the HTML5 history API
JavaScript
2
star
39

mosquito

JavaScript
2
star
40

flourish

Epicyclic music visualiser
JavaScript
2
star
41

metaknight

Meta-trickery with parsers!
CoffeeScript
2
star
42

placehodor

Hodor
CoffeeScript
2
star
43

multiply-average

CoffeeScript
1
star
44

hkcontrol

HK3350 remote control audio files
1
star
45

hiddenreftest

1
star
46

prototypes

CoffeeScript
1
star
47

vroom

JavaScript
1
star
48

hof

CoffeeScript
1
star
49

take-on.me

Take me on!
HTML
1
star
50

contextable

JavaScript
1
star
51

gish

Git-style file and directory hashing
JavaScript
1
star
52

hackcache

1
star
53

demoserver

Git-powered micro-PaaS to host little web demos
1
star
54

livewall

Shell
1
star
55

singing-bikes

Singing bikes!
JavaScript
1
star
56

hold-to-confirm

HTML
1
star
57

lagproxy

Laggy proxy for webserver & web service testing
1
star
58

robot-party

Robots run robots
CSS
1
star
59

ideaglobe

CoffeeScript
1
star
60

samgentle.com

HTML
1
star
61

expanding-explanations

HTML
1
star
62

pullitzer

Dead-simple GitHub repo updates
CoffeeScript
1
star
63

cardiograph

Live plotting ECG
Rust
1
star
64

schema-conformer

Fix your JSON for uploading into BigQuery
CoffeeScript
1
star
65

worm-farmer

1
star
66

rlvsinternet

CoffeeScript
1
star
67

aquire

Asynchronous require with promises
CoffeeScript
1
star
68

sak

sak
1
star
69

dotextensions

node require.extensions that works properly
CoffeeScript
1
star
70

etaoin-shrdlu

Statistically meaningful gibberish
JavaScript
1
star
71

singing-keyboard

Singing keyboard!
JavaScript
1
star
72

q3ds-info

CoffeeScript
1
star
73

goose-and-gander-license

1
star
74

whipcalc

PureScript
1
star
75

promserver

Promise-based webserver
JavaScript
1
star
76

sliding-blocks

A little puzzle game
HTML
1
star
77

Unrandom

A repeatable random number generator for javascript testing
JavaScript
1
star
78

scouchule

Rust
1
star