babel-plugin-remove-object-properties
Babel plugin for removing object properties
Last updated 3 years ago by bdupharm .
MIT · Original npm · Tarball · package.json
$ cnpm install babel-plugin-remove-object-properties 
SYNC missed versions from official npm registry.

#Babel Plugin for Removing Object Properties

Removes nodes in the AST (abstract syntax tree) that match a supplied regex if the node is of type ObjectProperty.

Why?

For testing, we want to add attributes to react elements like:

<div
    data-id="test">
</div>

We wanted a plugin that would then strip these attributes during the transpilation phase.

Installation

$ npm install babel-plugin-remove-object-properties

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": [["remove-object-properties", { "regexp": "data-*" }]]
}

Current Tags

  • 1.0.2                                ...           latest (3 years ago)

3 Versions

  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 5
Dependencies (4)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |