diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml new file mode 100644 index 0000000000..14a7a01d5c --- /dev/null +++ b/.github/workflows/js.yml @@ -0,0 +1,23 @@ +name: Format JavaScript Code using Prettier + +on: + pull_request: + branches: [main] + +jobs: + prettier: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} + fetch-depth: 0 + + - name: Prettify code + uses: creyD/prettier_action@v4.3 + with: + working_directory: fastn-js/js + prettier_options: --write **/*.{js,md} + only_changed: True diff --git a/fastn-js/js/ftd.js b/fastn-js/js/ftd.js index dff2749eec..0bb7073f53 100644 --- a/fastn-js/js/ftd.js +++ b/fastn-js/js/ftd.js @@ -13,6 +13,8 @@ const ftd = (function () { exports.riveNodes = riveNodes; + console.log('this is a test'); + exports.is_empty = (value) => { value = fastn_utils.getFlattenStaticValue(value); return fastn_utils.isNull(value) || value.length === 0;