optional-chaining-tool
v0.1.1
Published
a optional chaining tools for javascript
Downloads
14
Readme
optional-chaining-tool
a simple optional chaining tools for javascript.
use
import oc from 'optional-chaining-tool'
oc(object, 'a?')
oc(object, 'a?.["e"]')
oc(object, 'a?.f?.[0]?.l?.()')
oc(object, 'a?.f?.[0]?.v?.("hello!")?.z')
you can get more use case in test.js
not support Short-circuiting
option
stage 3 🎆🎆!!!
so, you maybe just need a babel-plugin about this proposal.
license
MIT