dff-util
Version:
DesignForFeature Utilities
34 lines (33 loc) • 1.61 kB
JavaScript
;
// bun run src/tests/util.ts
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const util_1 = require("../main/util");
const CallLangCountry = () => {
const lang = "en-US";
const country = (0, util_1.LangCountryCode)(lang);
console.log("LangCountryCode:: ", country);
};
const CallLangText = () => __awaiter(void 0, void 0, void 0, function* () {
const resp = yield (0, util_2.LangText)("Hello, how are you?", "en-US", "hi-IN");
console.log("Resp Kannada:: ", resp);
});
const CallCurrencyConvert = () => __awaiter(void 0, void 0, void 0, function* () {
const resp = yield (0, util_1.CurrencyConvert)("USD", "INR");
console.log("Resp Currency:: ", resp);
});
const util_2 = require("../main/util");
const run = () => __awaiter(void 0, void 0, void 0, function* () {
// await CallLangCountry();
// await CallLangText();
yield CallCurrencyConvert();
});
run();