Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ant-js/replace-emoji
🔍 Replace emojis from string or string[]
https://github.com/ant-js/replace-emoji
emoji replace tools
Last synced: about 1 month ago
JSON representation
🔍 Replace emojis from string or string[]
- Host: GitHub
- URL: https://github.com/ant-js/replace-emoji
- Owner: ant-js
- License: mit
- Created: 2021-05-10T15:58:59.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-07-27T05:08:37.000Z (over 3 years ago)
- Last Synced: 2024-12-13T08:06:07.387Z (about 1 month ago)
- Topics: emoji, replace, tools
- Language: TypeScript
- Homepage:
- Size: 25.4 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 🔍 replace-emoji
🔍 Replace emojis from string or string[]
[![](https://img.shields.io/npm/v/replace-emoji?style=flat-square)](https://www.npmjs.com/package/replace-emoji)
## Usage
```bash
npm i replace-emoji
# or
yarn add replace-emoji
``````js
import replaceEmoji from 'replace-emoji';
// or
const { replaceEmoji } = require('replace-emoji');replaceEmoji('🤖123'); // => 123
replaceEmoji('🤖123', '6'); // => 6123
replaceEmoji(['🤖1', '🤖2']); // => ['1', '2']
``````js
/**
*
* @param s The string or strings to be replaced
* @param r The content to be replaced
* @param reg Customize RegExp
* @returns Replaced result
*/
```## Changelog
[CHANGELOG](./CHANGELOG.md)
## LICENSE
[MIT](.LICENSE)