New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

minifaker

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minifaker - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

68

dist/index.d.ts
export declare const addLocale: (name: string, locale: any) => void;
export declare const setDefaultLocale: (locale: string) => void;
export declare const randomNumber: (options?: {
export declare const number: (options?: {
min?: number;

@@ -8,2 +8,3 @@ max?: number;

}) => number;
export declare const boolean: () => boolean;
export declare const arrayElement: <T>(array: T[]) => T;

@@ -18,6 +19,52 @@ export declare const firstName: (options?: {

}) => string;
export declare const city: (options?: {
locale?: string;
}) => string;
export declare const cityName: (options?: {
locale?: string;
}) => string;
export declare const cityPrefix: (options?: {
locale?: string;
}) => string;
export declare const citySufix: (options?: {
locale?: string;
}) => string;
export declare enum PlaceImgCategory {
ANY = "any",
ANIMALS = "animals",
ARCHITECTURE = "architecture",
NATURE = "nature",
PEOPLE = "people",
TECH = "tech"
}
export declare enum PlaceImgFilter {
GRAYSCALE = "grayscale",
SEPIA = "sepia"
}
export declare const imageUrlFromPlaceIMG: (options: {
width: number;
height: number;
category?: PlaceImgCategory;
filter?: PlaceImgFilter;
}) => string;
export declare const imageUrlFromPlaceholder: (options: {
width: number;
height?: number;
backColor?: string;
textColor?: string;
textValue?: string;
}) => string;
declare const _default: {
setDefaultLocale: (locale: string) => void;
addLocale: (name: string, locale: any) => void;
randomNumber: (options?: {
cityName: (options?: {
locale?: string;
}) => string;
citySufix: (options?: {
locale?: string;
}) => string;
cityPrefix: (options?: {
locale?: string;
}) => string;
number: (options?: {
min?: number;

@@ -36,3 +83,20 @@ max?: number;

arrayElement: <T>(array: T[]) => T;
boolean: () => boolean;
city: (options?: {
locale?: string;
}) => string;
imageUrlFromPlaceIMG: (options: {
width: number;
height: number;
category?: PlaceImgCategory;
filter?: PlaceImgFilter;
}) => string;
imageUrlFromPlaceholder: (options: {
width: number;
height?: number;
backColor?: string;
textColor?: string;
textValue?: string;
}) => string;
};
export default _default;

@@ -11,8 +11,17 @@ var __defProp = Object.defineProperty;

__export(exports, {
PlaceImgCategory: () => PlaceImgCategory,
PlaceImgFilter: () => PlaceImgFilter,
addLocale: () => addLocale,
arrayElement: () => arrayElement,
boolean: () => boolean,
city: () => city,
cityName: () => cityName,
cityPrefix: () => cityPrefix,
citySufix: () => citySufix,
default: () => src_default,
firstName: () => firstName,
imageUrlFromPlaceIMG: () => imageUrlFromPlaceIMG,
imageUrlFromPlaceholder: () => imageUrlFromPlaceholder,
number: () => number,
phoneNumber: () => phoneNumber,
randomNumber: () => randomNumber,
setDefaultLocale: () => setDefaultLocale

@@ -28,2 +37,5 @@ });

};
var throwNotImplemented = () => {
throw new Error(`Not implemented yet.`);
};
var getLocaleData = ({ locale: _locale, key }) => {

@@ -49,3 +61,3 @@ const locale = _locale || defaultLocale;

};
var randomNumber = (options = {}) => {
var number = (options = {}) => {
const { min, max, float } = { min: 0, max: 1, float: false, ...options };

@@ -57,4 +69,7 @@ const value = min + Math.random() * (max - min);

};
var boolean = () => {
return !!number({ max: 1 });
};
var arrayElement = (array) => {
return array[randomNumber({ max: array.length - 1 })];
return array[number({ max: array.length - 1 })];
};

@@ -80,22 +95,90 @@ var firstName = (options = {}) => {

if (c === "#")
return randomNumber({ max: 9 });
return number({ max: 9 });
return c;
}).join("");
};
var city = (options = {}) => {
return throwNotImplemented();
};
var cityName = (options = {}) => {
const { locale } = options;
const cityNames = getLocaleData({ locale, key: "cityNames" });
return arrayElement(cityNames);
};
var cityPrefix = (options = {}) => {
const { locale } = options;
const cityPrefixes = getLocaleData({ locale, key: "cityPrefixes" });
return arrayElement(cityPrefixes);
};
var citySufix = (options = {}) => {
const { locale } = options;
const citySufixes = getLocaleData({ locale, key: "citySufixes" });
return arrayElement(citySufixes);
};
var PlaceImgCategory;
(function(PlaceImgCategory2) {
PlaceImgCategory2["ANY"] = "any";
PlaceImgCategory2["ANIMALS"] = "animals";
PlaceImgCategory2["ARCHITECTURE"] = "architecture";
PlaceImgCategory2["NATURE"] = "nature";
PlaceImgCategory2["PEOPLE"] = "people";
PlaceImgCategory2["TECH"] = "tech";
})(PlaceImgCategory || (PlaceImgCategory = {}));
var PlaceImgFilter;
(function(PlaceImgFilter2) {
PlaceImgFilter2["GRAYSCALE"] = "grayscale";
PlaceImgFilter2["SEPIA"] = "sepia";
})(PlaceImgFilter || (PlaceImgFilter = {}));
var imageUrlFromPlaceIMG = (options) => {
const { width, height, category, filter } = { category: PlaceImgCategory.ANY, ...options };
const url = `https://placeimg.com/${width}/${height}/${category}`;
if (filter)
url + `/${filter}`;
return url;
};
var imageUrlFromPlaceholder = (options) => {
const { width, height, backColor, textColor, textValue } = options;
let url = `https://via.placeholder.com/${width}`;
if (height)
url + `x${height}`;
if (backColor)
url + `/${backColor}`;
if (textColor)
url + `/${textColor}`;
if (textValue)
url + `?text=${textValue}`;
return url;
};
var src_default = {
setDefaultLocale,
addLocale,
randomNumber,
cityName,
citySufix,
cityPrefix,
number,
phoneNumber,
firstName,
arrayElement
arrayElement,
boolean,
city,
imageUrlFromPlaceIMG,
imageUrlFromPlaceholder
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PlaceImgCategory,
PlaceImgFilter,
addLocale,
arrayElement,
boolean,
city,
cityName,
cityPrefix,
citySufix,
firstName,
imageUrlFromPlaceIMG,
imageUrlFromPlaceholder,
number,
phoneNumber,
randomNumber,
setDefaultLocale
});

@@ -1069,2 +1069,967 @@ var __create = Object.create;

// src/locale/en/address/cityNames.ts
var cityNames_default = [
"Abilene",
"Akron",
"Alafaya",
"Alameda",
"Albany",
"Albuquerque",
"Alexandria",
"Alhambra",
"Aliso Viejo",
"Allen",
"Allentown",
"Aloha",
"Alpharetta",
"Altadena",
"Altamonte Springs",
"Altoona",
"Amarillo",
"Ames",
"Anaheim",
"Anchorage",
"Anderson",
"Ankeny",
"Ann Arbor",
"Annandale",
"Antelope",
"Antioch",
"Apex",
"Apopka",
"Apple Valley",
"Appleton",
"Arcadia",
"Arden-Arcade",
"Arecibo",
"Arlington",
"Arlington Heights",
"Arvada",
"Ashburn",
"Asheville",
"Aspen Hill",
"Atascocita",
"Athens-Clarke County",
"Atlanta",
"Attleboro",
"Auburn",
"Augusta-Richmond County",
"Aurora",
"Austin",
"Avondale",
"Azusa",
"Bakersfield",
"Baldwin Park",
"Baltimore",
"Barnstable Town",
"Bartlett",
"Baton Rouge",
"Battle Creek",
"Bayamon",
"Bayonne",
"Baytown",
"Beaumont",
"Beavercreek",
"Beaverton",
"Bedford",
"Bel Air South",
"Bell Gardens",
"Belleville",
"Bellevue",
"Bellflower",
"Bellingham",
"Bend",
"Bentonville",
"Berkeley",
"Berwyn",
"Bethesda",
"Bethlehem",
"Billings",
"Biloxi",
"Binghamton",
"Birmingham",
"Bismarck",
"Blacksburg",
"Blaine",
"Bloomington",
"Blue Springs",
"Boca Raton",
"Boise City",
"Bolingbrook",
"Bonita Springs",
"Bossier City",
"Boston",
"Bothell",
"Boulder",
"Bountiful",
"Bowie",
"Bowling Green",
"Boynton Beach",
"Bozeman",
"Bradenton",
"Brandon",
"Brentwood",
"Bridgeport",
"Bristol",
"Brockton",
"Broken Arrow",
"Brookhaven",
"Brookline",
"Brooklyn Park",
"Broomfield",
"Brownsville",
"Bryan",
"Buckeye",
"Buena Park",
"Buffalo",
"Buffalo Grove",
"Burbank",
"Burien",
"Burke",
"Burleson",
"Burlington",
"Burnsville",
"Caguas",
"Caldwell",
"Camarillo",
"Cambridge",
"Camden",
"Canton",
"Cape Coral",
"Carlsbad",
"Carmel",
"Carmichael",
"Carolina",
"Carrollton",
"Carson",
"Carson City",
"Cary",
"Casa Grande",
"Casas Adobes",
"Casper",
"Castle Rock",
"Castro Valley",
"Catalina Foothills",
"Cathedral City",
"Catonsville",
"Cedar Hill",
"Cedar Park",
"Cedar Rapids",
"Centennial",
"Centreville",
"Ceres",
"Cerritos",
"Champaign",
"Chandler",
"Chapel Hill",
"Charleston",
"Charlotte",
"Charlottesville",
"Chattanooga",
"Cheektowaga",
"Chesapeake",
"Chesterfield",
"Cheyenne",
"Chicago",
"Chico",
"Chicopee",
"Chino",
"Chino Hills",
"Chula Vista",
"Cicero",
"Cincinnati",
"Citrus Heights",
"Clarksville",
"Clearwater",
"Cleveland",
"Cleveland Heights",
"Clifton",
"Clovis",
"Coachella",
"Coconut Creek",
"Coeur d'Alene",
"College Station",
"Collierville",
"Colorado Springs",
"Colton",
"Columbia",
"Columbus",
"Commerce City",
"Compton",
"Concord",
"Conroe",
"Conway",
"Coon Rapids",
"Coral Gables",
"Coral Springs",
"Corona",
"Corpus Christi",
"Corvallis",
"Costa Mesa",
"Council Bluffs",
"Country Club",
"Covina",
"Cranston",
"Cupertino",
"Cutler Bay",
"Cuyahoga Falls",
"Cypress",
"Dale City",
"Dallas",
"Daly City",
"Danbury",
"Danville",
"Davenport",
"Davie",
"Davis",
"Dayton",
"Daytona Beach",
"DeKalb",
"DeSoto",
"Dearborn",
"Dearborn Heights",
"Decatur",
"Deerfield Beach",
"Delano",
"Delray Beach",
"Deltona",
"Denton",
"Denver",
"Des Moines",
"Des Plaines",
"Detroit",
"Diamond Bar",
"Doral",
"Dothan",
"Downers Grove",
"Downey",
"Draper",
"Dublin",
"Dubuque",
"Duluth",
"Dundalk",
"Dunwoody",
"Durham",
"Eagan",
"East Hartford",
"East Honolulu",
"East Lansing",
"East Los Angeles",
"East Orange",
"East Providence",
"Eastvale",
"Eau Claire",
"Eden Prairie",
"Edina",
"Edinburg",
"Edmond",
"El Cajon",
"El Centro",
"El Dorado Hills",
"El Monte",
"El Paso",
"Elgin",
"Elizabeth",
"Elk Grove",
"Elkhart",
"Ellicott City",
"Elmhurst",
"Elyria",
"Encinitas",
"Enid",
"Enterprise",
"Erie",
"Escondido",
"Euclid",
"Eugene",
"Euless",
"Evanston",
"Evansville",
"Everett",
"Fairfield",
"Fall River",
"Fargo",
"Farmington",
"Farmington Hills",
"Fayetteville",
"Federal Way",
"Findlay",
"Fishers",
"Flagstaff",
"Flint",
"Florence-Graham",
"Florin",
"Florissant",
"Flower Mound",
"Folsom",
"Fond du Lac",
"Fontana",
"Fort Collins",
"Fort Lauderdale",
"Fort Myers",
"Fort Pierce",
"Fort Smith",
"Fort Wayne",
"Fort Worth",
"Fountain Valley",
"Fountainebleau",
"Framingham",
"Franklin",
"Frederick",
"Freeport",
"Fremont",
"Fresno",
"Frisco",
"Fullerton",
"Gainesville",
"Gaithersburg",
"Galveston",
"Garden Grove",
"Gardena",
"Garland",
"Gary",
"Gastonia",
"Georgetown",
"Germantown",
"Gilbert",
"Gilroy",
"Glen Burnie",
"Glendale",
"Glendora",
"Glenview",
"Goodyear",
"Grand Forks",
"Grand Island",
"Grand Junction",
"Grand Prairie",
"Grand Rapids",
"Grapevine",
"Great Falls",
"Greeley",
"Green Bay",
"Greensboro",
"Greenville",
"Greenwood",
"Gresham",
"Guaynabo",
"Gulfport",
"Hacienda Heights",
"Hackensack",
"Haltom City",
"Hamilton",
"Hammond",
"Hampton",
"Hanford",
"Harlingen",
"Harrisburg",
"Harrisonburg",
"Hartford",
"Hattiesburg",
"Haverhill",
"Hawthorne",
"Hayward",
"Hemet",
"Hempstead",
"Henderson",
"Hendersonville",
"Hesperia",
"Hialeah",
"Hicksville",
"High Point",
"Highland",
"Highlands Ranch",
"Hillsboro",
"Hilo",
"Hoboken",
"Hoffman Estates",
"Hollywood",
"Homestead",
"Honolulu",
"Hoover",
"Houston",
"Huntersville",
"Huntington",
"Huntington Beach",
"Huntington Park",
"Huntsville",
"Hutchinson",
"Idaho Falls",
"Independence",
"Indianapolis",
"Indio",
"Inglewood",
"Iowa City",
"Irondequoit",
"Irvine",
"Irving",
"Jackson",
"Jacksonville",
"Janesville",
"Jefferson City",
"Jeffersonville",
"Jersey City",
"Johns Creek",
"Johnson City",
"Joliet",
"Jonesboro",
"Joplin",
"Jupiter",
"Jurupa Valley",
"Kalamazoo",
"Kannapolis",
"Kansas City",
"Kearny",
"Keller",
"Kendale Lakes",
"Kendall",
"Kenner",
"Kennewick",
"Kenosha",
"Kent",
"Kentwood",
"Kettering",
"Killeen",
"Kingsport",
"Kirkland",
"Kissimmee",
"Knoxville",
"Kokomo",
"La Crosse",
"La Habra",
"La Mesa",
"La Mirada",
"Lacey",
"Lafayette",
"Laguna Niguel",
"Lake Charles",
"Lake Elsinore",
"Lake Forest",
"Lake Havasu City",
"Lake Ridge",
"Lakeland",
"Lakeville",
"Lakewood",
"Lancaster",
"Lansing",
"Laredo",
"Largo",
"Las Cruces",
"Las Vegas",
"Lauderhill",
"Lawrence",
"Lawton",
"Layton",
"League City",
"Lee's Summit",
"Leesburg",
"Lehi",
"Lehigh Acres",
"Lenexa",
"Levittown",
"Lewisville",
"Lexington-Fayette",
"Lincoln",
"Linden",
"Little Rock",
"Littleton",
"Livermore",
"Livonia",
"Lodi",
"Logan",
"Lombard",
"Lompoc",
"Long Beach",
"Longmont",
"Longview",
"Lorain",
"Los Angeles",
"Louisville/Jefferson County",
"Loveland",
"Lowell",
"Lubbock",
"Lynchburg",
"Lynn",
"Lynwood",
"Macon-Bibb County",
"Madera",
"Madison",
"Malden",
"Manchester",
"Manhattan",
"Mansfield",
"Manteca",
"Maple Grove",
"Margate",
"Maricopa",
"Marietta",
"Marysville",
"Mayaguez",
"McAllen",
"McKinney",
"McLean",
"Medford",
"Melbourne",
"Memphis",
"Menifee",
"Mentor",
"Merced",
"Meriden",
"Meridian",
"Mesa",
"Mesquite",
"Metairie",
"Methuen Town",
"Miami",
"Miami Beach",
"Miami Gardens",
"Middletown",
"Midland",
"Midwest City",
"Milford",
"Millcreek",
"Milpitas",
"Milwaukee",
"Minneapolis",
"Minnetonka",
"Minot",
"Miramar",
"Mishawaka",
"Mission",
"Mission Viejo",
"Missoula",
"Missouri City",
"Mobile",
"Modesto",
"Moline",
"Monroe",
"Montebello",
"Monterey Park",
"Montgomery",
"Moore",
"Moreno Valley",
"Morgan Hill",
"Mount Pleasant",
"Mount Prospect",
"Mount Vernon",
"Mountain View",
"Muncie",
"Murfreesboro",
"Murray",
"Murrieta",
"Nampa",
"Napa",
"Naperville",
"Nashua",
"Nashville-Davidson",
"National City",
"New Bedford",
"New Braunfels",
"New Britain",
"New Brunswick",
"New Haven",
"New Orleans",
"New Rochelle",
"New York",
"Newark",
"Newport Beach",
"Newport News",
"Newton",
"Niagara Falls",
"Noblesville",
"Norfolk",
"Normal",
"Norman",
"North Bethesda",
"North Charleston",
"North Highlands",
"North Las Vegas",
"North Lauderdale",
"North Little Rock",
"North Miami",
"North Miami Beach",
"North Port",
"North Richland Hills",
"Norwalk",
"Novato",
"Novi",
"O'Fallon",
"Oak Lawn",
"Oak Park",
"Oakland",
"Oakland Park",
"Ocala",
"Oceanside",
"Odessa",
"Ogden",
"Oklahoma City",
"Olathe",
"Olympia",
"Omaha",
"Ontario",
"Orange",
"Orem",
"Orland Park",
"Orlando",
"Oro Valley",
"Oshkosh",
"Overland Park",
"Owensboro",
"Oxnard",
"Palatine",
"Palm Bay",
"Palm Beach Gardens",
"Palm Coast",
"Palm Desert",
"Palm Harbor",
"Palm Springs",
"Palmdale",
"Palo Alto",
"Paradise",
"Paramount",
"Parker",
"Parma",
"Pasadena",
"Pasco",
"Passaic",
"Paterson",
"Pawtucket",
"Peabody",
"Pearl City",
"Pearland",
"Pembroke Pines",
"Pensacola",
"Peoria",
"Perris",
"Perth Amboy",
"Petaluma",
"Pflugerville",
"Pharr",
"Philadelphia",
"Phoenix",
"Pico Rivera",
"Pine Bluff",
"Pine Hills",
"Pinellas Park",
"Pittsburg",
"Pittsburgh",
"Pittsfield",
"Placentia",
"Plainfield",
"Plano",
"Plantation",
"Pleasanton",
"Plymouth",
"Pocatello",
"Poinciana",
"Pomona",
"Pompano Beach",
"Ponce",
"Pontiac",
"Port Arthur",
"Port Charlotte",
"Port Orange",
"Port St. Lucie",
"Portage",
"Porterville",
"Portland",
"Portsmouth",
"Potomac",
"Poway",
"Providence",
"Provo",
"Pueblo",
"Quincy",
"Racine",
"Raleigh",
"Rancho Cordova",
"Rancho Cucamonga",
"Rancho Palos Verdes",
"Rancho Santa Margarita",
"Rapid City",
"Reading",
"Redding",
"Redlands",
"Redmond",
"Redondo Beach",
"Redwood City",
"Reno",
"Renton",
"Reston",
"Revere",
"Rialto",
"Richardson",
"Richland",
"Richmond",
"Rio Rancho",
"Riverside",
"Riverton",
"Riverview",
"Roanoke",
"Rochester",
"Rochester Hills",
"Rock Hill",
"Rockford",
"Rocklin",
"Rockville",
"Rockwall",
"Rocky Mount",
"Rogers",
"Rohnert Park",
"Rosemead",
"Roseville",
"Roswell",
"Round Rock",
"Rowland Heights",
"Rowlett",
"Royal Oak",
"Sacramento",
"Saginaw",
"Salem",
"Salina",
"Salinas",
"Salt Lake City",
"Sammamish",
"San Angelo",
"San Antonio",
"San Bernardino",
"San Bruno",
"San Buenaventura (Ventura)",
"San Clemente",
"San Diego",
"San Francisco",
"San Jacinto",
"San Jose",
"San Juan",
"San Leandro",
"San Luis Obispo",
"San Marcos",
"San Mateo",
"San Rafael",
"San Ramon",
"San Tan Valley",
"Sandy",
"Sandy Springs",
"Sanford",
"Santa Ana",
"Santa Barbara",
"Santa Clara",
"Santa Clarita",
"Santa Cruz",
"Santa Fe",
"Santa Maria",
"Santa Monica",
"Santa Rosa",
"Santee",
"Sarasota",
"Savannah",
"Sayreville",
"Schaumburg",
"Schenectady",
"Scottsdale",
"Scranton",
"Seattle",
"Severn",
"Shawnee",
"Sheboygan",
"Shoreline",
"Shreveport",
"Sierra Vista",
"Silver Spring",
"Simi Valley",
"Sioux City",
"Sioux Falls",
"Skokie",
"Smyrna",
"Somerville",
"South Bend",
"South Gate",
"South Hill",
"South Jordan",
"South San Francisco",
"South Valley",
"South Whittier",
"Southaven",
"Southfield",
"Sparks",
"Spokane",
"Spokane Valley",
"Spring",
"Spring Hill",
"Spring Valley",
"Springdale",
"Springfield",
"St. Charles",
"St. Clair Shores",
"St. Cloud",
"St. George",
"St. Joseph",
"St. Louis",
"St. Louis Park",
"St. Paul",
"St. Peters",
"St. Petersburg",
"Stamford",
"State College",
"Sterling Heights",
"Stillwater",
"Stockton",
"Stratford",
"Strongsville",
"Suffolk",
"Sugar Land",
"Summerville",
"Sunnyvale",
"Sunrise",
"Sunrise Manor",
"Surprise",
"Syracuse",
"Tacoma",
"Tallahassee",
"Tamarac",
"Tamiami",
"Tampa",
"Taunton",
"Taylor",
"Taylorsville",
"Temecula",
"Tempe",
"Temple",
"Terre Haute",
"Texas City",
"The Hammocks",
"The Villages",
"The Woodlands",
"Thornton",
"Thousand Oaks",
"Tigard",
"Tinley Park",
"Titusville",
"Toledo",
"Toms River",
"Tonawanda",
"Topeka",
"Torrance",
"Town 'n' Country",
"Towson",
"Tracy",
"Trenton",
"Troy",
"Trujillo Alto",
"Tuckahoe",
"Tucson",
"Tulare",
"Tulsa",
"Turlock",
"Tuscaloosa",
"Tustin",
"Twin Falls",
"Tyler",
"Union City",
"University",
"Upland",
"Urbana",
"Urbandale",
"Utica",
"Vacaville",
"Valdosta",
"Vallejo",
"Vancouver",
"Victoria",
"Victorville",
"Vineland",
"Virginia Beach",
"Visalia",
"Vista",
"Waco",
"Waipahu",
"Waldorf",
"Walnut Creek",
"Waltham",
"Warner Robins",
"Warren",
"Warwick",
"Washington",
"Waterbury",
"Waterloo",
"Watsonville",
"Waukegan",
"Waukesha",
"Wauwatosa",
"Wellington",
"Wesley Chapel",
"West Allis",
"West Babylon",
"West Covina",
"West Des Moines",
"West Hartford",
"West Haven",
"West Jordan",
"West Lafayette",
"West New York",
"West Palm Beach",
"West Sacramento",
"West Seneca",
"West Valley City",
"Westfield",
"Westland",
"Westminster",
"Weston",
"Weymouth Town",
"Wheaton",
"White Plains",
"Whittier",
"Wichita",
"Wichita Falls",
"Wilmington",
"Wilson",
"Winston-Salem",
"Woodbury",
"Woodland",
"Worcester",
"Wylie",
"Wyoming",
"Yakima",
"Yonkers",
"Yorba Linda",
"York",
"Youngstown",
"Yuba City",
"Yucaipa",
"Yuma"
];
// src/locale/en/address/cityPrefixes.ts
var cityPrefixes_default = [
"North",
"East",
"West",
"South",
"New",
"Lake",
"Port"
];
// src/locale/en/address/citySufixes.ts
var citySufixes_default = [
"town",
"ton",
"land",
"ville",
"berg",
"burgh",
"borough",
"bury",
"view",
"port",
"mouth",
"stad",
"furt",
"chester",
"mouth",
"fort",
"haven",
"side",
"shire"
];
// src/locale/en/index.ts

@@ -1075,3 +2040,6 @@ var locale = {

firstNames: firstNames_default,
phoneFormats: formats_default
phoneFormats: formats_default,
cityNames: cityNames_default,
cityPrefixes: cityPrefixes_default,
citySufixes: citySufixes_default
};

@@ -1078,0 +2046,0 @@ import__.default.addLocale("en", locale);

@@ -1010,2 +1010,105 @@ var __create = Object.create;

// src/locale/fr/address/cityNames.ts
var cityNames_default = [
"Aix-en-Provence",
"Ajaccio",
"Amiens",
"Angers",
"Antibes",
"Antony",
"Argenteuil",
"Asni\xE8res-sur-Seine",
"Aubervilliers",
"Aulnay-sous-Bois",
"Avignon",
"Beauvais",
"Besan\xE7on",
"B\xE9ziers",
"Bordeaux",
"Boulogne-Billancourt",
"Bourges",
"Brest",
"Caen",
"Calais",
"Cannes",
"Cayenne",
"Cergy",
"Chamb\xE9ry",
"Champigny-sur-Marne",
"Cholet",
"Clermont-Ferrand",
"Clichy",
"Colmar",
"Colombes",
"Courbevoie",
"Cr\xE9teil",
"Dijon",
"Drancy",
"Dunkerque",
"Fort-de-France",
"Grenoble",
"Hy\xE8res",
"Issy-les-Moulineaux",
"Ivry-sur-Seine",
"La Rochelle",
"La Seyne-sur-Mer",
"Le Havre",
"Le Mans",
"Le Tampon",
"Les Abymes",
"Levallois-Perret",
"Lille",
"Limoges",
"Lorient",
"Lyon",
"Marseille",
"M\xE9rignac",
"Metz",
"Montauban",
"Montpellier",
"Montreuil",
"Mulhouse",
"Nancy",
"Nanterre",
"Nantes",
"Neuilly-sur-Seine",
"Nice",
"N\xEEmes",
"Niort",
"Noisy-le-Grand",
"Orl\xE9ans",
"Paris",
"Pau",
"Perpignan",
"Pessac",
"Poitiers",
"Quimper",
"Reims",
"Rennes",
"Roubaix",
"Rouen",
"Rueil-Malmaison",
"Saint-Denis",
"Saint-\xC9tienne",
"Saint-Maur-des-Foss\xE9s",
"Saint-Nazaire",
"Saint-Paul",
"Saint-Pierre",
"Saint-Quentin",
"Sarcelles",
"Strasbourg",
"Toulon",
"Toulouse",
"Tourcoing",
"Tours",
"Troyes",
"Valence",
"V\xE9nissieux",
"Versailles",
"Villejuif",
"Villeneuve-d'Ascq",
"Villeurbanne",
"Vitry-sur-Seine"
];
// src/locale/fr/index.ts

@@ -1016,3 +1119,4 @@ var locale = {

firstNames: firstNames_default,
phoneFormats: formats_default
phoneFormats: formats_default,
cityNames: cityNames_default
};

@@ -1019,0 +1123,0 @@ import__.default.addLocale("fr", locale);

2

package.json
{
"name": "minifaker",
"version": "1.1.0",
"version": "1.2.0",
"description": "lightweight faker.js",

@@ -5,0 +5,0 @@ "types": "./dist/index.d.ts",

# minifaker
Generate fake data.
An alternative to faker.js with cjs or esm syntax
An alternative to faker.js but with cjs or esm syntax
## npm
## NPM
`npm i minifaker`
## why
## Why

@@ -15,5 +15,7 @@ faker.js is too big and there is no tree shaking.

### why not create a pull request to faker.js?
### Why not create a pull request to faker.js?
Too much work to make it all work in one pull request. Instead, I will be adding new functions here from time to time.
Too much work to get the pull request denied. Instead, I will be adding new functions here from time to time.
I will deprecate functions with better alternatives.
For example, use `nanoid` to generate string ID

@@ -27,2 +29,3 @@ ## Example / usage

import minifaker, { arrayElement } from 'minifaker'
// const minifaker = require('minifaker')

@@ -44,3 +47,3 @@ minifaker.number()

## functions
## Function mapping

@@ -50,4 +53,5 @@ |Function|Locale|Faker.js|

|arrayElement|n/a|arrayElement
|number,float|n/a|number
|number|n/a|number,float
|boolean|n/a|boolean
|use `nanoid`|n/a|uuid
|firstName|en,fr|firstName

@@ -58,1 +62,2 @@ |phoneNumber|en,fr,fr_CA|phoneNumber

|citySufix|en,fr|citySufix
|imageUrlFromPlaceIMG, imageUrlFromPlaceholder|n/a|imageUrl

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc