Skip to content

Instantly share code, notes, and snippets.

@thomasboyt
Created March 6, 2014 03:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasboyt/9381769 to your computer and use it in GitHub Desktop.
Save thomasboyt/9381769 to your computer and use it in GitHub Desktop.
scope check
import odd from './b';
export default function even(n) {
// below should be rewritten...
return n === 0 || odd(n - 1);
}
// below should not
function foo(odd) {
odd = 1;
}
// nor should this
function bar() {
var odd;
console.log(odd);
}
// nor should this
function odd() {
}
"use strict";
var __es6_module__ = {}, __imports__ = [];
module.exports = {
__es6_module__: __es6_module__
};
__imports__['./b'] = require('./b');
__imports__['./b'] = __imports__['./b'].__es6_module__ || __imports__['./b'];
__es6_module__["default"] = function even(n) {
// below should be rewritten...
return n === 0 || __imports__['./b'].default(n - 1);
}
// below should not
function foo(odd) {
odd = 1;
}
// nor should this
function bar() {
var odd;
console.log(odd);
}
// nor should this
function odd() {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment