return.macro
v0.1.1
Published
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) [![dependency status](https://david-dm.org/proteriax/return.macro/status.svg)](https://david-dm.org/proteriax/return.macro#info=dependencies) [![
Downloads
1
Readme
return.macro
Example
import _return from "return.macro"
const value = getValue() ?? _return()
const [left, right] = getValue() ?? _return(false)
const { node } = getValue() ?? _return()
desugars to
const value = getValue();
if (value == null) return;
const [left, right] = getValue();
if (left == null || right == null) return false;
const { node} = getValue();
if (node == null) return;