Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-cerebral-proxy-tags

Package Overview
Dependencies
Maintainers
3
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-cerebral-proxy-tags

Babel plugin that convertes proxy access to cerebral tagged templates.

  • 1.0.1-beta.3
  • beta
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
decreased by-7.69%
Maintainers
3
Weekly downloads
 
Created
Source

babel-plugin-cerebral-proxy-tags

In Cerebral v2 tags are a way to target input, state, props or signals. They are implemented using a new ES2015 feature called template tags.

I implemented these using Proxy Object in cerebral-proxy-tags. This babel-plugin is tracking the usage of these specific proxy tags and translates them into the tagged template syntax.

Usage

Instead of this way:

import {set} from 'cerebral/operators'
import {state} from 'cerebral/tags'

export default [
  set(state`foo.bar`, 'baz')
]

You can write the same like shown below and it will get transpiled automatically.

import {set} from 'cerebral/operators'
import {state} from 'cerebral-proxy-tags' // or 'cerebral/proxies'

export default [
  set(state.foo.bar, 'baz') // <-- usage
]

FAQs

Package last updated on 29 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc