# jsonata-functions

> A collection of jsonata functions

Latest version **0.7.1** (published 2024-07-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install jsonata-functions
pnpm add jsonata-functions
yarn add jsonata-functions
bun add jsonata-functions
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.7.1 |
| Published | 2024-07-11 |
| First published | 2024-01-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 33.4 KB |
| Known vulnerabilities | 0 (+6 in 2 direct dependencies) |
| Install scripts | no |
| Author | Alex Jäger |
| Maintainers | alexander.jaeger.the-fittest.de |
| Keywords | jsonata, moment, lodash, uuid, momentjs, uuid |

## Links

- npm: https://www.npmjs.com/package/jsonata-functions
- Homepage: https://github.com/the-fittest/jsonata-functions
- npm.io page: https://npm.io/package/jsonata-functions

## Dependencies (6)

- [uuid](https://npm.io/package/uuid.md) ^9.0.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [moment](https://npm.io/package/moment.md) ^2.30.1
- [jsonata](https://npm.io/package/jsonata.md) 2.0.5
- [underscore.string](https://npm.io/package/underscore.string.md) ^3.3.6
- [@aws-sdk/util-dynamodb](https://npm.io/package/@aws-sdk/util-dynamodb.md) ^3.496.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.7.1 (latest) — 2024-07-11
- 0.7.0 — 2024-07-11
- 0.6.0 — 2024-06-30
- 0.5.0 — 2024-03-24
- 0.4.1 — 2024-03-08
- 0.4.0 — 2024-01-22
- 0.3.2 — 2024-01-11
- 0.3.1 — 2024-01-11
- 0.3.0 — 2024-01-11
- 0.2.3 — 2024-01-10
- 0.2.2 — 2024-01-09
- 0.2.1 — 2024-01-09
- 0.2.0 — 2024-01-09
- 0.1.2 — 2024-01-09
- 0.1.1 — 2024-01-09
- … 1 more at https://npm.io/package/jsonata-functions/versions

## README

Jsonata Functions
=========

A small library that adds lodash, moment and uuid to jsonata

## Installation

`npm install jsonata-functions`

`yarn add jsonata-functions`
## Usage

To use lodash and moment functions in jsonata, you can do the following:

    import jsonata from "jsonata";
    import functions from "jsonata-functions";

    const data = {
        text: "bla bla bla"
    };

    (async () => {
        let expression = jsonata('$_camelCase($.text)', {});
        expression = functions(expression);
        const result = await expression.evaluate(data);
        console.log(result);
    })()

Output should be `blaBlaBla`

To only use lodash functions, you can do the following:

    import jsonata from "jsonata";
    import lodash from "jsonata-functions";

    const data = {
        text: "bla bla bla"
    };

    (async () => {
        let expression = jsonata('$_camelCase($.text)', {});
        expression = lodash(expression, { moment: false });
        const result = await expression.evaluate(data);
        console.log(result);
    })()

## Tests

`yarn run test`

## Publishing

1. make changes...

1. `git add [changes]`

1. change version in `package.json`

1. `git commit -m "[message]"`

1. `git tag [version]`

1. `git push origin [version]`

1. `npm publish`

## Goodbyes

May the love be with you!

---
_Source: https://npm.io/package/jsonata-functions · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
