New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

retagger

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

retagger

Experimental way to define components

latest
Source
npmnpm
Version
0.5.0
Version published
Weekly downloads
1
-90%
Maintainers
1
Weekly downloads
 
Created
Source

Retagger

Wtf is going on.

Retagger can create any component with any className

License npm package npm downloads

npm install retagger
# or
yarn add retagger

Examples

import Retagger from 'retagger';

const Container = Retagger.div.Container;
// <div className="Container" {...restProps} />

function MyComponent() {
  return (
    // Accept any other props
    <Container role="presentation">
      <OtherComponent />
    </Container>
  );
}
import Retagger from 'retagger';

const Container = Retagger.div.Container.OtherClass.foo;
// <div className="Container OtherClass foo" {...restProps} />

function MyComponent() {
  return (
    <Container>
      <OtherComponent />
    </Container>
  );
}
import Retagger from 'retagger';

const classes = {
  container: '__foo',
};

const Container = Retagger.div[classes.container].OtherClass.foo;
// <div className="__foo OtherClass foo" {...restProps} />

function MyComponent() {
  return (
    <Container>
      <OtherComponent />
    </Container>
  );
}
import Retagger from 'retagger';

const Container = Retagger(YourComponent).Container.foo;
// YourComponent should accept className prop
// <YourComponent className="Container foo" {...restProps} />

function MyComponent() {
  return (
    <Container>
      <OtherComponent />
    </Container>
  );
}

See LICENSE for more information.

FAQs

Package last updated on 31 Jul 2019

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