Skip to content

Instantly share code, notes, and snippets.

@IpWebmaster
IpWebmaster / 0_reuse_code.js
Created February 20, 2016 13:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
'use strict';
const NODE_ENV = process.env.NODE_ENV || 'development',
webpack = require('webpack'),
ExtractTextPlugin = require('extract-text-webpack-plugin'),
AssetsPlugin = require('assets-webpack-plugin'),
CompressionPlugin = require("compression-webpack-plugin"),
rimraf = require('rimraf'),
autoprefixer = require('autoprefixer');
'use strict';
if (process.env.TRACE) {
require('./libs/trace');
}
const koa = require('koa'),
router = require('koa-router')(),
path = require('path'),
fs = require('fs'),
@IpWebmaster
IpWebmaster / destructuring.js
Created November 20, 2015 13:41 — forked from mikaelbr/destructuring.js
Several demos and usages for ES6 destructuring.
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => {
return [1, 2, 3];