feat: optional chaing

This commit is contained in:
Sven SAULEAU
2017-04-24 21:15:15 +02:00
committed by Justin Ridgewell
parent 5cc1cbf3bc
commit 00f58b9bfa
10 changed files with 98 additions and 0 deletions

View File

@@ -0,0 +1 @@
typeof foo !== "undefined" && foo !== null ? foo.bar : null;

View File

@@ -0,0 +1 @@
typeof (typeof foo !== "undefined" && foo !== null ? foo.bar : null) !== "undefined" && (typeof foo !== "undefined" && foo !== null ? foo.bar : null) !== null ? foo.bar.vroum : null;

View File

@@ -0,0 +1,3 @@
{
"plugins": ["transform-optional-chaining"]
}

View File

@@ -0,0 +1,3 @@
import runner from "babel-helper-plugin-test-runner";
runner(__dirname);