# rgc-alias

> the function make regularjs-component to have an alias

Latest version **0.0.1** (published 2017-09-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install rgc-alias
pnpm add rgc-alias
yarn add rgc-alias
bun add rgc-alias
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2017-09-06 |
| First published | 2017-09-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | kangdongyang |
| Maintainers | frontdog |
| Keywords | regular, component |

## Links

- npm: https://www.npmjs.com/package/rgc-alias
- npm.io page: https://npm.io/package/rgc-alias

## Recent versions

- 0.0.1 (latest) — 2017-09-06

## README

# rgc-alias
A simple javascript utility for regular component to create an alias.
### Install
```shell
npm install rgc-alias
```
### Usage

```javascript
//commonjs
var alias = require('rgc-alias');
//es6
import alias from 'rgc-alias';
//global
var alias = window['rgc-alias'];
//amd
define([
    'rgc-alias'
], function(alias) {
    ...
})
```
### Function

```javascript
import Regular from 'regularjs';
import alias from 'rgc-alias';

const CustromComponent = Regular.extend({
    
    name: 'custom-component',
    
    config(data) {
    
    }
})

//Component or Components as arguments
//such as alias([Comp1, Comp2...])
alias(CustromComponent);

//then you can get a new Component with your name 
const newComp = CustromComponent.alias('anothe-name');
```

---
_Source: https://npm.io/package/rgc-alias · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
