Skip to content
This repository was archived by the owner on Jan 8, 2020. It is now read-only.

v1.2.0

Compare
Choose a tag to compare
@haltcase haltcase released this 25 Apr 21:27
· 79 commits to master since this release

All new features have been added to the online playground!

This release adds the pretty cool feature of setting a custom placeholder by importing or requireing the plugin, but this is removed at compile time so no runtime dependency is required.

import $ from 'babel-plugin-partial-application'

const log = console.log($, $.foo)
log(42, { foo: 'bar' })

// -> 42 bar

This should keep linters off your back without declaring a global, and should help out TypeScript & Flow users also.

Features

  • allow setting a custom placeholder with import or require (0429c67)
  • support template literals (1062b58)
  • support nested structures & multiple placeholders in binary expressions (cf58624)