Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nfischer/shelljs-plugin-tr
:capital_abcd: A ShellJS plugin for the tr command
https://github.com/nfischer/shelljs-plugin-tr
shelljs shelljs-plugin
Last synced: about 1 month ago
JSON representation
:capital_abcd: A ShellJS plugin for the tr command
- Host: GitHub
- URL: https://github.com/nfischer/shelljs-plugin-tr
- Owner: nfischer
- License: mit
- Created: 2016-08-24T22:49:53.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2023-12-07T07:59:24.000Z (about 1 year ago)
- Last Synced: 2024-11-14T16:48:18.671Z (about 2 months ago)
- Topics: shelljs, shelljs-plugin
- Language: JavaScript
- Homepage:
- Size: 22.5 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# shelljs-plugin-tr
[![GitHub Actions](https://img.shields.io/github/actions/workflow/status/nfischer/shelljs-plugin-tr/main.yml?style=flat-square&logo=github)](https://github.com/nfischer/shelljs-plugin-tr/actions/workflows/main.yml)
[![npm](https://img.shields.io/npm/v/shelljs-plugin-tr.svg?style=flat-square)](https://www.npmjs.com/package/shelljs-plugin-tr)
[![shelljs-plugin](https://img.shields.io/badge/shelljs-plugin-brightgreen.svg?style=flat-square)](https://github.com/shelljs/shelljs/wiki/Using-ShellJS-Plugins)A [ShellJS](https://github.com/shelljs/shelljs) plugin for the `tr()` command.
## Installation
```bash
$ npm install --save shelljs
$ npm install --save shelljs-plugin-tr
```## Usage
To use this plugin in your project, include it like so:
```javascript
var shell = require('shelljs');
require('shelljs-plugin-tr');// Ex. usage:
new shell.ShellString('some string').tr('-dc', 'aeiou'); // oei
new shell.ShellString('message').tr('a-z', 'n-za-m'); // zrffntr
```## Writing plugins
If you're interested in taking a look at the current state of the plugin API,
take a look at [index.js](index.js). This has helpful comments explaining the
necessary boilerplate for writing a plugin. For an example usage of the plugin,
take a look at [test/test.js](test/test.js).