optional-chaining-tool
a optional chaining tools for javascript
Last updated a year ago by huangteng .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install optional-chaining-tool 
SYNC missed versions from official npm registry.

optional-chaining-tool

Build Status Coverage Status

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 ????????!!!

proposal-optional-chaining

so, you maybe just need a babel-plugin about this proposal.

license

MIT

Current Tags

  • 0.1.1                                ...           latest (a year ago)

2 Versions

  • 0.1.1                                ...           a year ago
  • 0.1.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |