Skip to content

Commit

Permalink
Fix charlist path resolving problem
Browse files Browse the repository at this point in the history
  • Loading branch information
masnormen committed Sep 4, 2020
1 parent 5cd8ae7 commit 150fd90
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
"use strict"

// Compatibility issues
const matchAll = require("string.prototype.matchall");
const path = require("path");
const {NGLEGENA, SWARA, PASANGAN, SANDHANGAN, PADA, ANGKA} = require(path.join(__dirname, "charlist.js"));
const {
NGLEGENA,
SWARA,
PASANGAN,
SANDHANGAN,
PADA,
ANGKA
} = require("./charlist.js");

const getInitial = (glyph) => {
if (glyph == null)
Expand Down Expand Up @@ -305,7 +312,7 @@ const doTrans = (current, residue, input, isLast = true) => {
return output();
};

exports.toCarakan = (value, useDiacritics = false, useSwaraMurda = true) => {
export const toCarakan = (value, useDiacritics = false, useSwaraMurda = true) => {
if (typeof value !== "string")
throw new TypeError("Expected a string");

Expand Down

0 comments on commit 150fd90

Please sign in to comment.