JSPM

node-matrix-asset-list

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q33097F
  • License MIT

A requireable object list of Squiz Matrix' core assets

Package Exports

  • node-matrix-asset-list

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-matrix-asset-list) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

node-matrix-asset-list

A requireable object list of Squiz Matrix' core assets.

Extracted using the JS API getAssetTypes function.

Build Status js-standard-style

Usage

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:

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:

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

with which you can select assets via their type code:

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

// 'Standard Page'

License

MIT