Here's the canonical TOML example from the TOML README, and a YAML version of the same. Which looks nicer?
|
| <!DOCTYPE html> | |
| <meta charset=utf-8> | |
| <meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1"> | |
| <meta name=apple-mobile-web-app-capable content=yes> | |
| <meta name=apple-mobile-web-app-status-bar-style content=black> | |
| <title>Test fullscreen</title> | |
| <style> | |
| html, body { | |
| margin: 0; | |
| padding: 0; |
| javascript:(function(window, document, undefined) {try {var selectedText = document.getSelection().toString(); if (selectedText === ''){selectedText = window.location.href;} if(selectedText !== ''){var baseQRUrl = 'http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl=' + encodeURIComponent(selectedText); window.open(baseQRUrl, '_blank', 'width=400,height=400');}} catch (e) {}})(window, document); |
| // This event emitter emits events, but reserves the right to publish events to | |
| // for its creator. It uses a WeakMap for true encapsulation. | |
| const eesToEventMaps = new WeakMap(); | |
| export default class EventEmitter { | |
| constructor(publisher) { | |
| const eventMap = Object.create(null); | |
| eesToEventMaps.set(this, eventMap); |
| const attributeExceptions = [ | |
| `role`, | |
| ]; | |
| function appendText(el, text) { | |
| const textNode = document.createTextNode(text); | |
| el.appendChild(textNode); | |
| } | |
| function appendArray(el, children) { |
| $('.secondary-nav a.-link').each(function(){this.removeAttribute("title");}); | |
| var btns = []; | |
| var achieve = { btn: 'a.-link.js-achievements-button', mod: '.topbar-dialog.achievements-dialog.dno' }; | |
| btns.push(achieve); | |
| var inbox = { btn: 'a.-link.js-inbox-button', mod: '.topbar-dialog.inbox-dialog.dno' }; | |
| btns.push(inbox); | |
| var se = { btn: 'a.-link.js-site-switcher-button.js-gps-track', mod: '.topbar-dialog.siteSwitcher-dialog.dno' }; | |
| btns.push(se); | |
| for( var ind in btns ){ | |
| var tar = btns[ind].btn; |
| // ==UserScript== | |
| // @name Revert GitHub theme | |
| // @namespace https://github.com | |
| // @version 0.1 | |
| // @description try to take over the world! | |
| // @author vzsg | |
| // @match https://*.github.com/* | |
| // @grant none | |
| // ==/UserScript== |
Here's the canonical TOML example from the TOML README, and a YAML version of the same. Which looks nicer?
|
Developer: "Doo Doo Doo... Working on the new Redux rewrite. Gotta write some fetch actions..."
FETCH_USERS -> function fetchUsersAction() {...}
FETCH_PAGES -> function fetchPagesAction() {...}
FETCH_FRIENDS -> function fetchFriendsAction() {...}
FETCH_GROUPS -> function fetchGroupsAction() {...}
FETCH_EVENTS -> function fetchEventsAction() {...}