https://github.com/mohit23x/islug
A npm package to make slugs in Engish, Hindi and various Indian Langauges.
https://github.com/mohit23x/islug
Last synced: 4 months ago
JSON representation
A npm package to make slugs in Engish, Hindi and various Indian Langauges.
- Host: GitHub
- URL: https://github.com/mohit23x/islug
- Owner: mohit23x
- Created: 2019-09-28T18:14:57.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-01T16:01:19.000Z (about 6 years ago)
- Last Synced: 2025-09-27T09:48:25.196Z (4 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/islug
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# :star: iSlug
A npm package to make slugs in Engish, Hindi and various Indian Langauges.
[](https://www.npmjs.com/package/islug)
[](https://www.npmjs.com/package/islug)
### :file_folder: Installation
```sh
# Using npm
npm install islug
# Using yarn
yarn add islug
```
### :orange_book: Usage
```javascript
const islug = require('islug');
// Hindi
console.log(islug("हैलो वर्ल्ड यह सैंपल टेस्ट है"));
// हैलो-वर्ल्ड-यह-सैंपल-टेस्ट-है
// Urdu
console.log(islug("ہیلو ورلڈ یہ نمونہ ٹیسٹ ہے"));
// ہیلو-ورلڈ-یہ-نمونہ-ٹیسٹ-ہے
// Tamil
console.log(islug("ஹலோ வேர்ல்ட் இது மாதிரி சோதனை"));
// ஹலோ-வேர்ல்ட்-இது-மாதிரி-சோதனை
// Punjabi
console.log(islug("ਹੈਲੋ ਵਰਲਡ ਇਹ ਨਮੂਨਾ ਟੈਸਟ ਹੈ"));
// ਹੈਲੋ-ਵਰਲਡ-ਇਹ-ਨਮੂਨਾ-ਟੈਸਟ-ਹੈ
// Malayalam
console.log(islug("ഹലോ വേൾഡ് ഇതാണ് സാമ്പിൾ ടെസ്റ്റ്"));
// ഹലോ-വേൾഡ്-ഇതാണ്-സാമ്പിൾ-ടെസ്റ്റ്
// Bengali
console.log(islug("হ্যালো ওয়ার্ল্ড এটি নমুনা পরীক্ষা"));
// হ্যালো-ওয়ার্ল্ড-এটি-নমুনা-পরীক্ষা
// English
console.log(islug("Hello World, this is a sample test"));
// hello-world-this-is-a-sample-test
// Special Characters
console.log(islug("!@#$%^&*()_-=+all special characters will be removed.][}{/>.<,;:"));
// all-special-characters-will-be-removed
```