Importing libraries?

Options

Is it possible to import libraries? (npm, nodejs, etc.)

I'm struggling with some Dates calculations, and using an external lib would help greatly.

Best Answer

  • Alimama
    Alimama Member
    Answer ✓
    Options

    Hi @Ambroise I think you can use lambda with some already supported excellent date libraries from js, moments and luxon. Find below link to the docs:

    https://docs.xano.com/working-with-data/lambdas-javascript/libraries-and-functions

Answers

  • Ambroise
    Ambroise Member
    Options

    I must say having moment/luxon available is a game changer. I spent hours writing a buggy script to identify current and next week numbers, but nothing beats using a properly maintained library for data management.

    Rewrote my buggy code in 1h, and now it does work properly. Thumbs up! 👍