Package Exports
- @katokdoescode/car-slugger
- @katokdoescode/car-slugger/index.ts
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@katokdoescode/car-slugger) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
CAR SLUGGER PACKAGE
Needs to convert complex string with car brand name or car model to slug. Also can convert cyrillic letters to latin.
Usage
# Install dependencies (only typescript needed)
$ npm i
# Generate JS if need
$ npm run build
# To see test cases try this:
$ node ./dist/test.jsSimple translit cyrillic to latin
import { CarSlugger } from "car-slugger";
const slugger = new CarSlugger();
console.log(slugger.translateCyrillic('Привет мир'));
// Output: "Privet mir"Converting to slug
import { CarSlugger } from "car-slugger";
const slugger = new CarSlugger();
console.log(slugger.getSlug('LADA (ВАЗ) 2211 4x4'));
// Output: lada-vaz-2211-4x4