Giter Site home page Giter Site logo

gratex / compat-table Goto Github PK

View Code? Open in Web Editor NEW

This project forked from compat-table/compat-table

0.0 9.0 0.0 9.69 MB

CLI for ECMAScript 5/6 compatibility tables

Home Page: https://kangax.github.io/compat-table/es6/

License: Other

JavaScript 10.80% HTML 89.01% CSS 0.19%

compat-table's Introduction

You may want to read also the original README.md.

CLI for Compat Tables (Added by Gratex team)

How is this different from orginal kangax repo ?

cli.js 		-	trivial cmd line over original 'data files'
README.md	- 	this file with CLI samples

TLDR

node cli.js es5 matrix | grep ....

Other samples (JSON):

node cli.js es5 browsers

node cli.js es5 tests

browsers supporting indexOf

node cli.js es5 tests indexOf

Array api supported by ie9

node cli.js es5 tests Array ie9

Other Sample Usages

Top 5 worst es5 browsers:

node cli.js es5 matrix | grep false$ | cut -f2 | sort | uniq -c | sort -k1,1nr | head -n 5

Prints:

50 ie7
47 ios78
47 phantom
46 ie8
40 safari3

Listing browsers:

node cli.js es5 browsers
node cli.js es6 browsers
node cli.js esnext browsers

Only browser names:

node cli.js es5 browsers | jsontool -ak 

Obsolete browsers

node cli.js es6 browsers | jsontool -M | jsontool -c 'this.value.obsolete' | jsontool -a key

'Real' browsers

node cli.js es6 browsers | jsontool -M | jsontool -c '!this.value.platform' | jsontool -a key

Current browsers by platform (as html table output)

(	
	echo "|name|platform|"; echo "|----|----|"; 
	node cli.js es6 browsers | jsontool -M | jsontool -c '!this.value.obsolete' | jsontool -d"|" -a foo key value.platformtype bar \
	| sort -t"|" -k3,3 -k2,2 
) | pandoc

Updating data (from kangax repo)

This is fork of original https://kangax.github.io/compat-table/es6/

git remote add upstream https://github.com/kangax/compat-table
git merge remotes/upstream/gh-pages

npm install #just in case 

# test

Be carefull, he changes formats sometimes

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.