Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Version Downloads Total

gatsby-optional-chaining

const obj = {
  foo: {
    bar: {
      baz: 42,
    },
  },
};

const baz = obj?.foo?.bar?.baz; // 42

const safe = obj?.qux?.baz; // undefined

Provide the optional-chaining babel plugin in gatsby, just install and put in gatsby-config.

Install

$ npm i gatsby-optional-chaining

or

$ yarn add gatsby-optional-chaining

How to use

Add the plugin to your gatsby-config.js.

module.exports = {
  plugins: [
    `gatsby-optional-chaining`,
  ]
}

About

Provide babel optional chaining plugin on Gatsby

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages