JavaScript get-lunar supports npm under the name get-lunar
.
$ npm i get-lunar
<script type="module" src="./interchange.js"></script>
<script type="module">
var date = getLunar("2050-10-11 10:15:23");
console.log(date); //农历八月廿六
</script>
import {getLunar} from 'get-lunar'
export default {
name: 'test',
mounted() {
var date = getLunar("2050-10-11 10:15:23");
console.log(date); //农历八月廿六
},
}