Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/joshgillies/node-matrix-asset-list
- Owner: joshgillies
- License: mit
- Created: 2015-02-20T09:18:30.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-23T10:48:48.000Z (about 9 years ago)
- Last Synced: 2024-10-19T00:15:12.711Z (27 days ago)
- Language: JavaScript
- Homepage:
- Size: 176 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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