Inspired by Haskell, I wanted to see if I could replicate, using ES6 features, the repeat
function:
repeat :: a -> [a]
So as you can see in repeat.js
, I have done exactly that. However there are some caveats.
function process(rule) { | |
if(rule.cssRules) { | |
for(var i=rule.cssRules.length-1; i>=0; i--) { | |
process(rule.cssRules[i]); | |
} | |
} | |
if(rule.type == CSSRule.MEDIA_RULE) { | |
if(window.matchMedia(rule.media.mediaText).matches) { | |
rule.media.mediaText = "all"; | |
} else { |
var ref = require('ref'); | |
module.exports = FixedString; | |
/** | |
* Fixed length "String" type, for use in Struct type definitions. | |
* Null-terminates by default. | |
* Throws an Error if there's not enough space available when setting a string. | |
*/ |
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<appSettings> | |
<!-- Virtual Directory Setup | |
assign virtualDirPath below a value like '/{path}' | |
Add below to your app code and then prepend routes with virtualDirPath | |
var virtualDirPath = process.env.virtualDirPath || ''; --> |
(function () { | |
var system = require('system'); | |
var casper = require('casper').create({ | |
clientScripts : [ 'jquery.min.js' ], | |
waitTimeout : 30000, // ms | |
logLevel : 'debug', // info, debug, warning, or error | |
verbose : system.args.indexOf('-v') >= 0 | |
}); |
'use strict'; | |
var AppDispatcher = require('../AppDispatcher'); | |
var ActionTypes = require('../constants/ActionTypes'); | |
var AuthActions = { | |
signin: function(data) { | |
AppDispatcher.handleViewAction({ | |
actionType: ActionTypes.AUTH_SIGNIN, | |
data: data |
/* @flow */ | |
var React = require("react") | |
var Immutable = require("immutable") | |
// In order to use any type as props, including Immutable objects, we | |
// wrap our prop type as the sole "data" key passed as props. | |
type Component<P> = ReactClass<{},{ data: P },{}> | |
type Element = ReactElement<any, any, any> |
Inspired by Haskell, I wanted to see if I could replicate, using ES6 features, the repeat
function:
repeat :: a -> [a]
So as you can see in repeat.js
, I have done exactly that. However there are some caveats.
'use strict'; | |
var React = require('react'); | |
function createAsyncHandler(getHandlerAsync, displayName) { | |
var Handler = null; | |
return React.createClass({ | |
displayName: displayName, |
// Node.js CheatSheet. | |
// Download the Node.js source code or a pre-built installer for your platform, and start developing today. | |
// Download: http://nodejs.org/download/ | |
// More: http://nodejs.org/api/all.html | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html | |