babel-helper-evaluate-path
path.evaluate wrapped in a try catch
Last updated 7 years ago by boopathi .
MIT · Repository · Bugs · Original npm
$ cnpm install babel-helper-evaluate-path 
SYNC missed versions from official npm registry.

babel-helper-evaluate-path

A wrapper for babel's path.evaluate

Fixes / Features:

  • Detect usages before initialization / declaration
function foo() {
  console.log(b); // ReferenceError
  let b = 1;
}

function bar() {
  console.log(a); // a is void 0
  var a = 5;
  console.log(a); // 5
}
  • Detect usages in scopes outside of initialization for vars (hoisted)
function foo() {
  if (a) var x = 5;
  console.log(x); // cannot determine
}

Installation

npm install babel-helper-evaluate-path --save-dev

Current Tags

  • 0.5.0                                ...           latest (7 years ago)

2 Versions

  • 0.5.0-alpha.9                                ...           7 years ago
  • 0.5.0                                ...           7 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org