Skip to content

Commit

Permalink
Use the same name for the transliterate function
Browse files Browse the repository at this point in the history
  • Loading branch information
Dremora authored and dzcpy committed Jan 18, 2019
1 parent e734662 commit 8b17b81
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ slugify('你好, world!'); // ni-hao-world
```html
<!-- ESM build -->
<script type="module">
import { transl } from 'https://cdn.jsdelivr.net/npm/transliteration@2.0.4/dist/browser/bundle.esm.min.js';
console.log(transl('你好'));
import { transliterate } from 'https://cdn.jsdelivr.net/npm/transliteration@2.0.4/dist/browser/bundle.esm.min.js';
console.log(transliterate('你好'));
</script>
```

Expand Down
2 changes: 1 addition & 1 deletion src/browser/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import { slugify, transliterate } from '../node';
export { transliterate as transl, slugify };
export { transliterate as transl, transliterate, slugify };
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,6 @@ export type SlugifyFunction = TransliterationFunction<OptionsSlugify>;

export interface BrowserGlobalObject {
transl: TransliterateFunction;
transliterate: TransliterateFunction;
slugify: SlugifyFunction;
}

0 comments on commit 8b17b81

Please sign in to comment.