0.1.1 • Published 5 years ago
fsff v0.1.1
To add this package in your project, use the npm install command.
npm i fsffBefore, do a require in your code and use the type(filepath: string, options: object) function.
const fsff = require('fsff');
// or... more practical...
const { type } = require('fsff');
console.log(fsff.type('./my.file.path.js')); // jsYou can use the dot option (as a boolean value or a any value) to return the file format with a dot in the string first char.
Using this option, that return .*format.
console.log(fsff.type('./my.filee.path.js', { dot: true })); // .js