# jdata

> A clean way to consume data

Latest version **2.0.0** (published 2015-03-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install jdata
pnpm add jdata
yarn add jdata
bun add jdata
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2015-03-25 |
| First published | 2015-02-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Truong Huu-Tien |
| Maintainers | truonghuutien |
| Keywords | javascript, data, json, rest, template, restful, map |

## Links

- npm: https://www.npmjs.com/package/jdata
- Repository: https://github.com/TruongHuuTien/jdata
- Issues: https://github.com/TruongHuuTien/jdata/issues
- npm.io page: https://npm.io/package/jdata

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 2.0.0 (latest) — 2015-03-25
- 0.2.0 — 2015-03-05
- 0.1.10 — 2015-02-28
- 0.1.9 — 2015-02-27
- 0.1.8 — 2015-02-27
- 0.1.7 — 2015-02-27
- 0.1.6 — 2015-02-26
- 0.1.5 — 2015-02-26
- 0.1.4 — 2015-02-19
- 0.1.3 — 2015-02-19
- 0.1.2 — 2015-02-19
- 0.1.1 — 2015-02-12
- 0.1.0 — 2015-02-12
- 0.0.2 — 2015-02-12
- 0.0.1 — 2015-02-12

## README

# jdata
A clean way to consume Data [http://truonghuutien.github.io/jdata/](http://truonghuutien.github.io/jdata/)

## String Extend

### jdata.apply
Simply create an dynamics String. Like printf.

    jdata.print("My Name is {name.first}.uppercase()", {name:{first:"John"}});

## jdata.map

### Bind an Object.
If your data is an Object, like an Instance.

    var templatedObject = new jdata({
        firstname	: "{name.first}",
        lastname	: "{name.last}"
    }, {
        name		: {
            first	: "John",
            last	: "Doe"
        }
    });

### Bind an Collection of object.
If your data is an complex Array. Like a Collection of ressources.

    var dataArray = new jdata({
        firstname	: "{name.first}"
    }, [
        {
            name	: {
                first	: "John"
            }
        }, {
            name	: {
                first	: "Peter"
            }
        },{
            name	: {
                first	: "Oliver"
            }
        }
    ]);
    
 
# Client's side
If you need some json's template in your interface, checkout the [github repository](https://github.com/TruongHuuTien/jdata.git) to see what you can do with jQuery and Bootstrap.

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