JSPM

node-matrix-file-types

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q32473F
  • License MIT

Map files via file extention to a Squiz Matrix file assets

Package Exports

  • node-matrix-file-types

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-file-types) 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-file-types

Map files via file extention to a Squiz Matrix file assets

Build Status js-standard-style

Example

var fileAsset = require('node-matrix-file-type')

fileAsset('image.jpg') // 'image'
fileAsset('styles.css') // 'css_file'
fileAsset('scripts.js') // 'js_file'
fileAsset('file.txt') // 'text_file'
fileAsset('unknown.file') // 'file'

// etc

API

var fileAsset = require('node-matrix-file-types')

fileAsset(file)

The file argument accepts a String representing the the file you wish to retrieve an appropriate file asset type code for. Returns 'file' by default.

Licence

MIT