Comparing version
@@ -212,2 +212,7 @@ import { CreditCardProvider } from './data/creditCardProviders'; | ||
export declare const bitcoinAddress: () => string; | ||
export declare const mimeType: () => string; | ||
export declare const fileExt: () => string; | ||
export declare const dirPath: () => string; | ||
export declare const fileName: () => string; | ||
export declare const filePath: () => string; | ||
declare const _default: { | ||
@@ -375,3 +380,8 @@ setDefaultLocale: (locale: string) => void; | ||
bitcoinAddress: () => string; | ||
mimeType: () => string; | ||
fileExt: () => string; | ||
dirPath: () => string; | ||
filePath: () => string; | ||
fileName: () => string; | ||
}; | ||
export default _default; |
@@ -51,2 +51,3 @@ var __create = Object.create; | ||
default: () => src_default, | ||
dirPath: () => dirPath, | ||
direction: () => direction, | ||
@@ -57,2 +58,5 @@ domainName: () => domainName, | ||
email: () => email, | ||
fileExt: () => fileExt, | ||
fileName: () => fileName, | ||
filePath: () => filePath, | ||
firstName: () => firstName, | ||
@@ -72,2 +76,3 @@ imageUrlFromPlaceIMG: () => imageUrlFromPlaceIMG, | ||
macAddress: () => macAddress, | ||
mimeType: () => mimeType, | ||
month: () => month, | ||
@@ -242,2 +247,134 @@ name: () => name, | ||
// src/data/dirPaths.ts | ||
var dirPaths_default = [ | ||
"/Applications", | ||
"/bin", | ||
"/boot", | ||
"/boot/defaults", | ||
"/dev", | ||
"/etc", | ||
"/etc/defaults", | ||
"/etc/mail", | ||
"/etc/namedb", | ||
"/etc/periodic", | ||
"/etc/ppp", | ||
"/home", | ||
"/home/user", | ||
"/home/user/dir", | ||
"/lib", | ||
"/Library", | ||
"/lost+found", | ||
"/media", | ||
"/mnt", | ||
"/net", | ||
"/Network", | ||
"/opt", | ||
"/opt/bin", | ||
"/opt/include", | ||
"/opt/lib", | ||
"/opt/sbin", | ||
"/opt/share", | ||
"/private", | ||
"/private/tmp", | ||
"/private/var", | ||
"/proc", | ||
"/rescue", | ||
"/root", | ||
"/sbin", | ||
"/selinux", | ||
"/srv", | ||
"/sys", | ||
"/System", | ||
"/tmp", | ||
"/Users", | ||
"/usr", | ||
"/usr/X11R6", | ||
"/usr/bin", | ||
"/usr/include", | ||
"/usr/lib", | ||
"/usr/libdata", | ||
"/usr/libexec", | ||
"/usr/local/bin", | ||
"/usr/local/src", | ||
"/usr/obj", | ||
"/usr/ports", | ||
"/usr/sbin", | ||
"/usr/share", | ||
"/usr/src", | ||
"/var", | ||
"/var/log", | ||
"/var/mail", | ||
"/var/spool", | ||
"/var/tmp", | ||
"/var/yp" | ||
]; | ||
// src/data/commonMimeTypes.ts | ||
var commonMimeTypes_default = { | ||
".apk": "application/vnd.android.package-archive", | ||
".avi": "video/x-msvideo", | ||
".bin": "application/octet-stream", | ||
".bmp": "image/bmp", | ||
".conf": "text/plain", | ||
".css": "text/css", | ||
".csv": "text/csv", | ||
".deb": "application/x-debian-package", | ||
".dll": "application/x-msdownload", | ||
".dmg": "application/octet-stream", | ||
".doc": "application/msword", | ||
".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", | ||
".dump": "application/octet-stream", | ||
".dvi": "application/x-dvi", | ||
".eps": "application/postscript", | ||
".epub": "application/epub+zip", | ||
".exe": "application/x-msdownload", | ||
".f4v": "video/x-f4v", | ||
".flv": "video/x-flv", | ||
".gif": "image/gif", | ||
".h264": "video/h264", | ||
".html": "text/html", | ||
".ico": "image/x-icon", | ||
".iso": "application/octet-stream", | ||
".jar": "application/java-archive", | ||
".jpeg": "image/jpeg", | ||
".jpg": "image/jpeg", | ||
".js": "application/javascript", | ||
".json": "application/json", | ||
".log": "text/plain", | ||
".mov": "video/quicktime", | ||
".mp3": "audio/mpeg", | ||
".mp4": "video/mp4", | ||
".msi": "application/x-msdownload", | ||
".odb": "application/vnd.oasis.opendocument.database", | ||
".odc": "application/vnd.oasis.opendocument.chart", | ||
".odf": "application/vnd.oasis.opendocument.formula", | ||
".odft": "application/vnd.oasis.opendocument.formula-template", | ||
".odg": "application/vnd.oasis.opendocument.graphics", | ||
".odi": "application/vnd.oasis.opendocument.image", | ||
".odp": "application/vnd.oasis.opendocument.presentation", | ||
".ods": "application/vnd.oasis.opendocument.spreadsheet", | ||
".odt": "application/vnd.oasis.opendocument.text", | ||
".ogg": "audio/ogg", | ||
".ogv": "video/ogg", | ||
".png": "image/png", | ||
".ppt": "application/vnd.ms-powerpoint", | ||
".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation", | ||
".psd": "image/vnd.adobe.photoshop", | ||
".qt": "video/quicktime", | ||
".rss": "application/rss+xml", | ||
".svg": "image/svg+xml", | ||
".svgz": "image/svg+xml", | ||
".tar": "application/x-tar", | ||
".tgz": "application/x-gzip", | ||
".tiff": "image/tiff", | ||
".torrent": "application/x-bittorrent", | ||
".ttf": "application/x-font-ttf", | ||
".txt": "text/plain", | ||
".udeb": "application/x-debian-package", | ||
".xls": "application/vnd.ms-excel", | ||
".xml": "application/xml", | ||
".xsl": "application/xml", | ||
".zip": "application/zip" | ||
}; | ||
// src/index.ts | ||
@@ -654,2 +791,18 @@ var locales = {}; | ||
}; | ||
var mimeType = () => { | ||
return arrayElement2(Object.values(commonMimeTypes_default)); | ||
}; | ||
var fileExt = () => { | ||
return arrayElement2(Object.keys(commonMimeTypes_default)); | ||
}; | ||
var dirPath = () => { | ||
return arrayElement2(dirPaths_default); | ||
}; | ||
var fileName = () => { | ||
const words = array2(number2({ max: 3 }), () => word()); | ||
return `${words.join("_").toLocaleLowerCase()}${fileExt()}`; | ||
}; | ||
var filePath = () => { | ||
return `${dirPath()}/${fileName()}`; | ||
}; | ||
var src_default = { | ||
@@ -706,3 +859,8 @@ setDefaultLocale, | ||
date, | ||
bitcoinAddress | ||
bitcoinAddress, | ||
mimeType, | ||
fileExt, | ||
dirPath, | ||
filePath, | ||
fileName | ||
}; | ||
@@ -734,2 +892,3 @@ // Annotate the CommonJS export names for ESM import in node: | ||
date, | ||
dirPath, | ||
direction, | ||
@@ -740,2 +899,5 @@ domainName, | ||
email, | ||
fileExt, | ||
fileName, | ||
filePath, | ||
firstName, | ||
@@ -755,2 +917,3 @@ imageUrlFromPlaceIMG, | ||
macAddress, | ||
mimeType, | ||
month, | ||
@@ -757,0 +920,0 @@ name, |
{ | ||
"name": "minifaker", | ||
"version": "1.21.0", | ||
"version": "1.22.0", | ||
"description": "lightweight faker.js", | ||
@@ -5,0 +5,0 @@ "types": "./dist/index.d.ts", |
@@ -128,3 +128,2 @@ # minifaker | ||
password|n/a|use `generate-password` | ||
betweens|n/a|date | ||
month|en,fr|month | ||
@@ -134,1 +133,6 @@ weekday|en,fr|weekday | ||
bitcoinAddress|n/a|bitcoinAddress | ||
fileExt,commonFileExt|n/a|fileExt | ||
fileName,commonFileName|en|fileName | ||
filePath|en|filePath | ||
mimeType,commonMimeType|n/a|mimeType | ||
dirPath|n/a|dirPath |
Sorry, the diff of this file is not supported yet
684347
4.17%19
18.75%47480
2.63%137
3.01%