A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
export default [ | |
{ id: 'AF', | |
name: 'Afghanistan', | |
continent: 'Asia', | |
currencyId: 'AFN', | |
phoneCode: '93', | |
flag: '🇦🇫' }, | |
{ id: 'AX', | |
name: 'Åland Islands', | |
continent: 'Europe', |
<?php | |
$fontTypes = array('woff2', 'woff', 'ttf', 'svg', 'eot'); | |
$gFontURL = 'http://fonts.googleapis.com/css?family='; | |
$uaFonts = array( | |
'woff2' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36', | |
'woff' => 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/4.0; GTB7.4; InfoPath.3; SV1; .NET CLR 3.1.76908; WOW64; en-US)', | |
'ttf' => 'Mozilla/5.0 (Linux; U; Android 2.2.1; en-ca; LG-P505R Build/FRG83) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', | |
'svg' => 'Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10', |
Warning: These views are highly oppinated and might have some slightly incorrect facts. My experience with typescript was about 2 weeks in Node and a week in angular2.
TypeScript is implementing their own take on JavaScript. Some of the things they are writing will likely never make it in an official ES* spec either.
Technologies that have competing spec / community driven development have a history of failing; take: Flash, SilverLight, CoffeeScript, the list goes on. If you have a large code base, picking TypeScript is something your going to be living with for a long time. I can take a bet in 3 years JavaScript will still be around without a doubt.
Its also worth noting that they have built some things like module system and as soon as the spec came out they ditched it and started using that. Have fun updating!
//events - a super-basic Javascript (publish subscribe) pattern | |
var events = { | |
events: {}, | |
on: function (eventName, fn) { | |
this.events[eventName] = this.events[eventName] || []; | |
this.events[eventName].push(fn); | |
}, | |
off: function(eventName, fn) { | |
if (this.events[eventName]) { |
<?php | |
return array( | |
'title' => 'Widget Title', | |
'html' => function() { | |
// any data for the template | |
$data = array(); | |
return tpl::load(__DIR__ . DS . 'template.php', $data); | |
} | |
); |
# | |
# This is a simple, clean PS1 with current git branch displayed. | |
# How will look like: | |
# | |
# λ ~/home/project (master) | |
# | |
# NOTE: You may have to configure your terminal to support UTF-8 Unicode (so λ will displayed correctly) | |
function parse_git_branch () { |
var _ = require('lodash'); | |
/** | |
* `isValidationError` | |
* | |
* Is this a waterline validation error? | |
*/ | |
function isWaterlineValidationError (err) { | |
if (_.isPlainObject(err)) { |
@echo off | |
:: Path to Sublime Text installation dir. | |
SET stPath=%~dp0sublime_text.exe | |
SET stPathOnly=%~dp0 | |
:: Key name for the registry entries. | |
SET UserEntry=Sublime Text | |
SET AdminEntry=Sublime Text As Admin | |
:: Context menu texts. | |
SET "UserMenuText=Open with Sublime(&-)" | |
SET "AdminMenuText=Open with Sublime As Admin(&+)" |