my $source = readline;
for ($source) { # cleanup
+ s/\A\(// and s/\);?\s*\Z//; # empty callback
+ next if /^\{/; # valid json
+
# convert seperate variables to hash keys
s/\A/{\n/;
s/^caniuse\.(\w+) *= */"$1":/gm;
=head1 SYNOPSIS
- curl http://caniuse.com/js/data.js |
+ curl http://caniuse.com/jsonp.php |
tools/convert-caniuse.pl > browser-support.inc.pl