# ng-string-rotate

> String rotater for [Angular](http://angular.io); Rotate the string in clockwise/ anti-clockwise * john -> ohnj * john -> hnjo * jacob -> bjaco (anti-clockwise)

Latest version **2.0.0** (published 2019-04-19) · 0 weekly downloads

## Install

```sh
npm install ng-string-rotate
pnpm add ng-string-rotate
yarn add ng-string-rotate
bun add ng-string-rotate
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2019-04-19 |
| First published | 2019-04-18 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 70.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | lijudev |
| Keywords | Angular2, Angular4, Angular6, Angular, ionic, ng, string, string shifter, string rotater |

## Links

- npm: https://www.npmjs.com/package/ng-string-rotate
- npm.io page: https://npm.io/package/ng-string-rotate

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.9.0

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2019-04-19
- 1.2.0 — 2019-04-18
- 1.1.0 — 2019-04-18
- 1.0.0 — 2019-04-18
- 0.0.0 — 2019-04-18

## README

# String rotater

String rotater for [Angular](http://angular.io); Rotate the string in clockwise/ anti-clockwise
* john -> ohnj
* john -> hnjo
* jacob -> bjaco  (anti-clockwise)

# Installation
```js
npm install --save ng-string-rotate
```

# Usage

### Import `StringRotateModule`

You need to import the `StringRotateModule` in the module of your app where you want to use it.

```js
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { StringRotateModule } from 'ng-string-rotate';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    StringRotateModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
```

### Use the `ng-string-rotate` selector
Place the `ng-string-rotate` and pass the string as an input to `ngString` and also the number of times need  to rotate as `shifts`

```html
<ng-string-rotate [ngString]="'john'" [shifts]="2"></ng-string-rotate>
```
For anti-clockwise pass the `rotate` input as 'reverse'

```html
<ng-string-rotate [ngString]="'jacob'" [rotate]="'reverse'"></ng-string-rotate>
```

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