Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joshgillies/node-matrix-file-types
Map files via file extention to a Squiz Matrix file assets
https://github.com/joshgillies/node-matrix-file-types
Last synced: 5 days ago
JSON representation
Map files via file extention to a Squiz Matrix file assets
- Host: GitHub
- URL: https://github.com/joshgillies/node-matrix-file-types
- Owner: joshgillies
- License: mit
- Created: 2015-06-12T06:28:08.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-25T23:08:52.000Z (about 8 years ago)
- Last Synced: 2024-10-19T00:15:15.134Z (27 days ago)
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-matrix-file-types
Map files via file extention to a Squiz Matrix file assets
[![Build Status](https://travis-ci.org/joshgillies/node-matrix-file-types.svg)](https://travis-ci.org/joshgillies/node-matrix-file-types)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)## Example
```js
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