• Stars
    star
    1,592
  • Rank 28,264 (Top 0.6 %)
  • Language
    CoffeeScript
  • License
    MIT License
  • Created about 9 years ago
  • Updated over 5 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

markov-contact

A dynamic audio journey
JavaScript
6
star
15

pairjs

Instant pair programming for the interweb
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

metaknight

Meta-trickery with parsers!
CoffeeScript
2
star
31

davescript

2
star
32

mpdiment

NodeJS MPD web interface
CoffeeScript
2
star
33

docs-in-a-box

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

relative-word-cloud

JavaScript
2
star
42

placehodor

Hodor
CoffeeScript
2
star
43

multiply-average

CoffeeScript
1
star
44

hkcontrol

HK3350 remote control audio files
1
star
45

prototypes

CoffeeScript
1
star
46

hiddenreftest

1
star
47

vroom

JavaScript
1
star
48

hof

CoffeeScript
1
star
49

singing-bikes

Singing bikes!
JavaScript
1
star
50

take-on.me

Take me on!
HTML
1
star
51

contextable

JavaScript
1
star
52

gish

Git-style file and directory hashing
JavaScript
1
star
53

hackcache

1
star
54

demoserver

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

livewall

Shell
1
star
56

hold-to-confirm

HTML
1
star
57

samgentle.com

HTML
1
star
58

lagproxy

Laggy proxy for webserver & web service testing
1
star
59

robot-party

Robots run robots
CSS
1
star
60

ideaglobe

CoffeeScript
1
star
61

pullitzer

Dead-simple GitHub repo updates
CoffeeScript
1
star
62

expanding-explanations

HTML
1
star
63

cardiograph

Live plotting ECG
Rust
1
star
64

worm-farmer

1
star
65

schema-conformer

Fix your JSON for uploading into BigQuery
CoffeeScript
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