1.1.3 • Published 1 year ago

vietnamese-url v1.1.3

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Vietnamese Slug

  • Package hỗ trợ chuyển đổi từ tiếng Việt có dấu sang dạng không dấu, hỗ trợ SEO, URL thân thiện, hỗ trợ chuyển đổi tên file sang định dạng thân thiện.

Installation

$ npm i vietnamese-url --save

Documentation

Example

const { toVietnameseSlug } = require("vietnamese-url");
const input = "Tiêu đề này được viết bằng tiếng    Việt   ";
const output = toVietnameseSlug(input);
console.log(output);
// tieu-de-nay-duoc-viet-bang-tieng-viet

Custom slug character

const { toVietnameseSlug } = require("vietnamese-url");
const input = "Tiêu đề này được viết bằng tiếng    Việt   ";
const output = toVietnameseSlug(input, "*");
console.log(output);
// tieu*de*nay*duoc*viet*bang*tieng*viet

ES6

import { toVietnameseSlug } from "vietnamese-url";
const slug = toVietnameseSlug("Tiêu đề này được viết bằng tiếng    Việt   ");
console.log("slug: ", slug);
// tieu-de-nay-duoc-viet-bang-tieng-viet

ToSlugFile

const { toSlugFile } = require("vietnamese-url");
const slug = toSlugFile("Đường dẫn ảnh viết bằng tiếng    Việt   .jpg");
console.log("slug: ", slug);
// duong-dan-anh-viet-bang-tieng-viet-dr1kz.jpg
import { toSlugFile } from "vietnamese-url";
const slug = toSlugFile("Đường dẫn ảnh viết bằng tiếng    Việt   .jpg");
console.log("slug: ", slug);
// duong-dan-anh-viet-bang-tieng-viet-dr1kz.jpg
1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago