Keybase proof
I hereby claim:
- I am thanpolas on github.
- I am thanpolas (https://keybase.io/thanpolas) on keybase.
- I have a public key ASCWHXwoj4IjP1CA1lp-qmFAHe3t_kebLO6KeNNWzK5XBgo
To claim this, I am signing this object:
/** | |
* Will normalize quotes in a given string. There are many variations of quotes | |
* in the unicode character set, this function attempts to convert any variation | |
* of quote to the standard Quotation Mark - U+0022 Standard Universal: " | |
* | |
* @param {string} str The string to normalize | |
* @return {string} Normalized string. | |
* @see https://unicode-table.com/en/sets/quotation-marks/ | |
*/ | |
helpers.stdQuote = (str) => { |
I hereby claim:
To claim this, I am signing this object:
/** | |
* @fileOverview Singleton pattern on ES6. | |
*/ | |
import logger from './logger.midd'; | |
/** | |
* The class statement. | |
* | |
*/ |
// http://www.paulirish.com/2009/throttled-smartresize-jquery-event-handler/ | |
// | |
// debouncing function from John Hann | |
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/ | |
var debounce = function (func, threshold, execAsap) { | |
var timeout; | |
return function debounced () { | |
var obj = this, args = arguments; |
/** | |
* @fileOverview A CSRF Implementation for WebSocket calls. | |
*/ | |
var Promise = require('bluebird'); | |
var config = require('config'); | |
var lusca = require('lusca'); | |
var Middleware = require('./middleware'); |
// example using the raf module from npm. try changing some values! | |
var requestAnimationFrame = require("raf") | |
var canvas = document.createElement("canvas") | |
canvas.width = 500 | |
canvas.height = 500 | |
document.body.appendChild(canvas) | |
var context = canvas.getContext("2d") |
This script is ment to work with the node-config package, it will export whatever configuration data you set on the herokuOverride
Object, as a JSON serialized string, onto the NODE_CONFIG
environment variable on Heroku.
This results in the config package to use those values instead, thus enabling you to keep sensitive data out of your tracked files.
env.js
to your .gitignore
fileThis will work with the config package.
var mantri = require('mantri'); | |
var mantriCompile = require('mantri/lib/mantri-build-compile'); | |
mantriCompile.getDepsFiles({ | |
jsRoot: './js', | |
src: './js/app.js', | |
gmockDir: mantri.helpers.getPath('closure-mock'), | |
}, function(status, results) { | |
console.log('Status should be true:', status); |