default-extname
v0.0.4
Published
get file's extname
Downloads
6
Readme
default-extname
Extension of path.extname
example
resolve
var dExtname = require('default-extname');
var extname = dExtname();
extname.resolve('abd.js');// '.js'
extname.resolve('abd.ddd');// '.js'
opt.defaultType
var dExtname = require('default-extname');
var extname = dExtname({defaultType: 'txt'});
extname.resolve('abd.js');// '.js'
extname.resolve('abd.ddd');// '.txt'
opt.extraTypeList
var dExtname = require('default-extname');
var extname = dExtname({extraTypeList: ['ddd']});
extname.resolve('abd.js');// '.js'
extname.resolve('abd.aaa');// '.js'
extname.resolve('abd.ddd');// '.ddd'
resolveFilePath
var dExtname = require('default-extname');
var extname = dExtname();
extname.resolveFilePath('abd.js');// 'abd.js'
extname.resolveFilePath('abd.ddd');// 'abd.ddd.js'
options
opt.defaultType
default:
js
opt.extraTypeList
default:
[]
, customized type