An open API service indexing awesome lists of open source software.

https://github.com/artskydj/cfdump

A speedy alternative to ColdFusion's <cfdump> tag
https://github.com/artskydj/cfdump

Last synced: about 1 month ago
JSON representation

A speedy alternative to ColdFusion's <cfdump> tag

Awesome Lists containing this project

README

          

# cfdump

A speedy alternative to ColdFusion's `` tag

## usage

```html

#new cfdump(myVar)#
#new cfdump(myVar, { expand = false })#

```

## api

### `var html = cfdump(variable, [options])`

- `variable` *any* **required** An array, struct, query, or a simple value to dump
- `options` *struct* **optional**
- `expand` *boolean* **optional** Expanded view (defaults to true)
- `sort` *boolean* **optional** Sort the query column names (defaults to true)
- **Returns** `html` *string*

## speed

The main reason for this project is that `` can be ridiculously slow.
This is easily 100x faster than `` on mid/large queries.
I have not yet tested the time difference for arrays and structs.

I tested the time difference with a query of 52 columns and 25 rows.

| code | usual time range | spiked up to |
|------------------------|------------------|--------------|
| `` |2400 ms - 2900 ms | 3800 ms |
| `#new cfdump(qry)#` | 3 ms - 7 ms | 40 ms |

I haven't tested the latest version, which added some functionality, but I expect the difference is trivial.

# license

[MIT](https://choosealicense.com/licenses/mit/)