made with esnextbin
Last active
October 4, 2016 13:31
-
-
Save tusharmath/524d76bc20393507e8dedbc559ca1be0 to your computer and use it in GitHub Desktop.
esnextbin sketch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>ESNextbin Sketch</title> | |
<!-- put additional styles and scripts here --> | |
</head> | |
<body> | |
<!-- put markup and other contents here --> | |
<large-button></large-button> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// write ES2015 code and import modules from npm | |
// and then press "Execute" to run your program | |
// write ES2015 code and import modules from npm | |
// and then press "Execute" to run your program | |
console.clear() | |
import * as M from 'most' | |
M.from([1, 2, 3, 4]) | |
.map(x => x.demo()) | |
.subscribe({ | |
next: x => console.log(x), | |
error: x => console.error(x), | |
complete: () => console.log('COMPLETE') | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "rwc-observable-support", | |
"dependencies": { | |
"most": "1.0.3" | |
}, | |
"version": "0.0.0" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var _most = require('most'); | |
var M = _interopRequireWildcard(_most); | |
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } | |
// write ES2015 code and import modules from npm | |
// and then press "Execute" to run your program | |
// write ES2015 code and import modules from npm | |
// and then press "Execute" to run your program | |
console.clear(); | |
M.from([1, 2, 3, 4]).map(function (x) { | |
return x.demo(); | |
}).subscribe({ | |
next: function next(x) { | |
return console.log(x); | |
}, | |
error: function error(x) { | |
return console.error(x); | |
}, | |
complete: function complete() { | |
return console.log('COMPLETE'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment