Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/joshgillies/node-matrix-asset-list

A requireable object list of Squiz Matrix' core assets
https://github.com/joshgillies/node-matrix-asset-list

Last synced: 5 days ago
JSON representation

A requireable object list of Squiz Matrix' core assets

Awesome Lists containing this project

README

        

# node-matrix-asset-list

A requireable object list of Squiz Matrix' core assets.

Extracted using the [JS API getAssetTypes] function.

[![Build Status](https://travis-ci.org/joshgillies/node-matrix-asset-list.svg)](https://travis-ci.org/joshgillies/node-matrix-asset-list)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

# Usage

```js
var assets = require('node-matrix-asset-list');
```

`node-matrix-asset-list` provides a simple querying interface wich allows you to retrieve
asset info with the following:

```js
console.log(assets('page_standard').name); // asset type code
console.log(assets('Standard Page').name); // capital case name
console.log(assets('standard page').name); // lower case name

// all return 'Standard Page'
```

In addition you can require directly the entire assets object with:

```js
var assets = require('node-matrix-asset-list/assets');
```

with which you can select assets via their type code:

```js
console.log(assets['page_standard'].name);

// 'Standard Page'
```

# License

MIT

[JS API getAssetTypes]: http://manuals.matrix.squizsuite.net/web-services/chapters/javascript-api#getAssetTypes