Open sant527 opened 4 years ago
I have to exectue javascript from linux bash shell. So i have decided to use node
I have downloaded a js file from https://raw.githubusercontent.com/sanskrit/sanscript.js/master/src/sanscript.js as sanskrit.js
sanskrit.js
Below is my js file to be run using node:
latin_to_devnagari.js
var sanskrit = require("./sanscript.js"); console.log(sanskrit.t("śrotram cakṣuḥ sparśanam ca", 'iast', 'devanagari'))
I run this using
node latin_to_devnagari.js
It shows
श्रोत्रम् चक्ष
instead of श्रोत्रम् चक्षुः स्पर्शनम् च
श्रोत्रम् चक्षुः स्पर्शनम् च
Where as when i try this in browser
<!DOCTYPE html> <html> <head> <script src="sanscript.js"></script> <script> console.log(Sanscript.t("śrotram cakṣuḥ sparśanam ca", 'iast', 'devanagari')) </script> </head> <body> Testing </body> </html>
and open this file in a browser then in the browser console i see
So how to show the correct output using node.
facing the same issue someone please help
I have to exectue javascript from linux bash shell. So i have decided to use node
I have downloaded a js file from https://raw.githubusercontent.com/sanskrit/sanscript.js/master/src/sanscript.js as
sanskrit.js
Below is my js file to be run using node:
latin_to_devnagari.js
I run this using
It shows
श्रोत्रम् चक्ष
instead of
श्रोत्रम् चक्षुः स्पर्शनम् च
Where as when i try this in browser
and open this file in a browser then in the browser console i see
श्रोत्रम् चक्षुः स्पर्शनम् च
So how to show the correct output using node.