@snaplet/copycat
Advanced tools
Comparing version 0.5.1 to 0.6.0
@@ -8,7 +8,16 @@ export * from './primitives'; | ||
export * from './uuid'; | ||
export * from './phoneNumber'; | ||
export * from './city'; | ||
export * from './country'; | ||
export * from './countryCode'; | ||
export * from './timezone'; | ||
export * from './streetName'; | ||
export * from './streetAddress'; | ||
export * from './postalAddress'; | ||
export * from './password'; | ||
export * from './ipv4'; | ||
export * from './mac'; | ||
export * from './userAgent'; | ||
export * from './scramble'; | ||
export * from './setSalt'; | ||
//# sourceMappingURL=copycat.d.ts.map |
@@ -24,6 +24,15 @@ var __defProp = Object.defineProperty; | ||
__reExport(copycat_exports, require("./uuid"), module.exports); | ||
__reExport(copycat_exports, require("./phoneNumber"), module.exports); | ||
__reExport(copycat_exports, require("./city"), module.exports); | ||
__reExport(copycat_exports, require("./country"), module.exports); | ||
__reExport(copycat_exports, require("./countryCode"), module.exports); | ||
__reExport(copycat_exports, require("./timezone"), module.exports); | ||
__reExport(copycat_exports, require("./streetName"), module.exports); | ||
__reExport(copycat_exports, require("./streetAddress"), module.exports); | ||
__reExport(copycat_exports, require("./postalAddress"), module.exports); | ||
__reExport(copycat_exports, require("./password"), module.exports); | ||
__reExport(copycat_exports, require("./ipv4"), module.exports); | ||
__reExport(copycat_exports, require("./mac"), module.exports); | ||
__reExport(copycat_exports, require("./userAgent"), module.exports); | ||
__reExport(copycat_exports, require("./scramble"), module.exports); | ||
__reExport(copycat_exports, require("./setSalt"), module.exports); |
@@ -1,2 +0,1 @@ | ||
var import__ = require("."); | ||
var import_testutils = require("./testutils"); | ||
@@ -12,3 +11,3 @@ test("determinism", () => { | ||
}; | ||
Object.keys(import__.copycat).forEach(check); | ||
Object.keys(import_testutils.TRANSFORMATIONS).forEach(check); | ||
}); | ||
@@ -77,2 +76,14 @@ test("generated values", () => { | ||
], | ||
"countryCode": Array [ | ||
"RW", | ||
"AS", | ||
"AW", | ||
"GI", | ||
"BF", | ||
"SI", | ||
"LK", | ||
"MG", | ||
"NU", | ||
"PN", | ||
], | ||
"dateString": Array [ | ||
@@ -90,2 +101,14 @@ "1989-02-14T01:52:57.000Z", | ||
], | ||
"digit": Array [ | ||
"9", | ||
"1", | ||
"3", | ||
"6", | ||
"1", | ||
"7", | ||
"0", | ||
"9", | ||
"1", | ||
"9", | ||
], | ||
"email": Array [ | ||
@@ -139,2 +162,14 @@ "Dewayne_Yost801@yahoo.com", | ||
], | ||
"hex": Array [ | ||
"1", | ||
"7", | ||
"9", | ||
"0", | ||
"f", | ||
"1", | ||
"8", | ||
"f", | ||
"d", | ||
"9", | ||
], | ||
"int": Array [ | ||
@@ -152,2 +187,14 @@ 3112761889, | ||
], | ||
"ipv4": Array [ | ||
"102.10.231.51", | ||
"93.246.120.113", | ||
"84.229.87.193", | ||
"127.164.208.123", | ||
"113.228.29.80", | ||
"88.22.40.190", | ||
"79.111.132.33", | ||
"19.227.143.15", | ||
"11.59.60.100", | ||
"121.79.68.82", | ||
], | ||
"lastName": Array [ | ||
@@ -165,2 +212,14 @@ "Cruickshank", | ||
], | ||
"mac": Array [ | ||
"aa:b9:89:25:89:3b", | ||
"fe:9a:a2:01:d6:15", | ||
"9f:6b:93:03:19:43", | ||
"0f:27:52:21:17:6c", | ||
"7b:d3:a4:77:3b:37", | ||
"1f:83:74:41:1b:10", | ||
"80:48:a2:8f:10:c5", | ||
"13:37:e5:e8:01:2d", | ||
"6d:73:64:64:4f:a0", | ||
"bb:84:09:6f:1b:db", | ||
], | ||
"oneOf": Array [ | ||
@@ -190,2 +249,26 @@ "blue", | ||
], | ||
"password": Array [ | ||
"*sp[GaF7Jj{%V9", | ||
"Y{HKWKI6[QM6OZ", | ||
"k$3GV0YkLioE", | ||
"yWY&KN93^y{PLo", | ||
"5meoVdqUh[&u%t", | ||
"Tdoo5wLM{H5XA#", | ||
"a8W&T}it}o7e6B", | ||
"pXFGCTEsXV2VZx", | ||
"RAGmBD}aKp@6eO", | ||
"w[2G!EoUN]JX[", | ||
], | ||
"phoneNumber": Array [ | ||
"+4344587214015", | ||
"+112513898127", | ||
"+96886848678793", | ||
"+09777826973412", | ||
"+2462989476266", | ||
"+51908693459543", | ||
"+735172736793519", | ||
"+0419348444915", | ||
"+08002038022628", | ||
"+64521165915763", | ||
], | ||
"postalAddress": Array [ | ||
@@ -203,2 +286,14 @@ "932 Krista Union, Santa Fe 8316, Maldives", | ||
], | ||
"scramble": Array [ | ||
"Evpitkg Zhans", | ||
"Qqgh Ajmfw", | ||
"Ltquwqj Buirwwg", | ||
"Lsh Jgtnrwe", | ||
"Bic Fkgqzfgsi", | ||
"Hqtqyey Kvvbprgjc", | ||
"Mgwo Ebzx", | ||
"Npyeas Fzgdwx", | ||
"Igc Lrkslv", | ||
"Kratw Trbekhh", | ||
], | ||
"sentence": Array [ | ||
@@ -240,2 +335,92 @@ "Vivano mera nanichiha ni moshiyu sochi kinrame kinma.", | ||
], | ||
"times": Array [ | ||
Array [ | ||
"Chihy", | ||
"Chime", | ||
"Miraekochi", | ||
"Raemia", | ||
], | ||
Array [ | ||
"Ceamemo", | ||
"Mahykona", | ||
"Mamimoki", | ||
"Shinoma", | ||
], | ||
Array [ | ||
"Kinakiha", | ||
"Hykaika", | ||
"Vinoraehy", | ||
"Hykinmo", | ||
"Mahy", | ||
], | ||
Array [ | ||
"Kakinyukai", | ||
"Ravimume", | ||
"Kaiaceako", | ||
"Mehy", | ||
], | ||
Array [ | ||
"Keshikai", | ||
"Vavichia", | ||
"Chisokichi", | ||
"Kira", | ||
], | ||
Array [ | ||
"Raki", | ||
"Mimea", | ||
"Namiyoha", | ||
"Shimoki", | ||
], | ||
Array [ | ||
"Vikeno", | ||
"Vayo", | ||
"Nakema", | ||
"Mahyno", | ||
], | ||
Array [ | ||
"Chiyota", | ||
"Raekiaki", | ||
"Kakera", | ||
"Hya", | ||
"Nonaceayo", | ||
], | ||
Array [ | ||
"Mayo", | ||
"Rakinshi", | ||
"Tamunashi", | ||
"Mivayoni", | ||
"Tamerashi", | ||
], | ||
Array [ | ||
"Kaitashiyu", | ||
"Namu", | ||
"Kinki", | ||
"Vikovi", | ||
"Makehy", | ||
], | ||
], | ||
"timezone": Array [ | ||
"Asia/Kuwait", | ||
"Asia/Kolkata", | ||
"Australia/Perth", | ||
"America/Godthab", | ||
"America/Juneau", | ||
"America/Denver", | ||
"America/Argentina/Buenos_Aires", | ||
"Europe/Paris", | ||
"America/Halifax", | ||
"Asia/Yakutsk", | ||
], | ||
"userAgent": Array [ | ||
"Mozilla/5.0 (Windows NT 6.0; WOW64; rv:6.6) Gecko/20100101 Firefox/6.6.5", | ||
"Mozilla/5.0 (Windows NT 6.0; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0.1", | ||
"Mozilla/5.0 (Windows NT 5.0; rv:13.0) Gecko/20100101 Firefox/13.0.0", | ||
"Mozilla/5.0 (Windows; U; Windows NT 5.1) AppleWebKit/534.1.0 (KHTML, like Gecko) Chrome/30.0.802.0 Safari/534.1.0", | ||
"Mozilla/5.0 (Windows NT 5.1; rv:14.3) Gecko/20100101 Firefox/14.3.1", | ||
"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_7_5) AppleWebKit/531.2.2 (KHTML, like Gecko) Chrome/38.0.829.0 Safari/531.2.2", | ||
"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0)", | ||
"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_10_6 rv:6.0; BR) AppleWebKit/535.1.0 (KHTML, like Gecko) Version/6.0.4 Safari/535.1.0", | ||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6.7; rv:5.6) Gecko/20100101 Firefox/5.6.8", | ||
"Mozilla/5.0 (Windows; U; Windows NT 6.2) AppleWebKit/537.1.1 (KHTML, like Gecko) Chrome/38.0.852.0 Safari/537.1.1", | ||
], | ||
"username": Array [ | ||
@@ -242,0 +427,0 @@ "Dewayne_Yost801", |
@@ -1,4 +0,4 @@ | ||
export * as faker from '@faker-js/faker'; | ||
export { faker } from '@faker-js/faker'; | ||
export * as copycat from './copycat'; | ||
export * from './types'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -25,6 +25,6 @@ var __create = Object.create; | ||
copycat: () => copycat, | ||
faker: () => faker | ||
faker: () => import_faker.faker | ||
}); | ||
module.exports = __toCommonJS(src_exports); | ||
var faker = __toESM(require("@faker-js/faker")); | ||
var import_faker = require("@faker-js/faker"); | ||
var copycat = __toESM(require("./copycat")); | ||
@@ -31,0 +31,0 @@ __reExport(src_exports, require("./types"), module.exports); |
import fictional from 'fictional'; | ||
import { Input } from './types'; | ||
export declare const int: fictional.Int; | ||
@@ -7,2 +8,3 @@ export declare const bool: typeof fictional.bool; | ||
export declare const char: fictional.Char; | ||
export declare const digit: fictional.CharFn; | ||
export declare const word: fictional.Word; | ||
@@ -13,2 +15,4 @@ export declare const words: fictional.Words; | ||
export declare const oneOf: fictional.OneOf; | ||
export declare const times: fictional.Times; | ||
export declare const hex: (input: Input) => string; | ||
//# sourceMappingURL=primitives.d.ts.map |
@@ -26,3 +26,5 @@ var __create = Object.create; | ||
dateString: () => dateString, | ||
digit: () => digit, | ||
float: () => float, | ||
hex: () => hex, | ||
int: () => int, | ||
@@ -32,2 +34,3 @@ oneOf: () => oneOf, | ||
sentence: () => sentence, | ||
times: () => times, | ||
word: () => word, | ||
@@ -43,2 +46,3 @@ words: () => words | ||
const char = import_fictional.default.char; | ||
const digit = import_fictional.default.char.digit; | ||
const word = import_fictional.default.word.options({ unicode: false }); | ||
@@ -52,2 +56,7 @@ const words = import_fictional.default.words.options({ | ||
const oneOf = import_fictional.default.oneOf; | ||
const times = import_fictional.default.times; | ||
const hex = (input) => int(input, { | ||
min: 0, | ||
max: 15 | ||
}).toString(16); | ||
// Annotate the CommonJS export names for ESM import in node: | ||
@@ -58,3 +67,5 @@ 0 && (module.exports = { | ||
dateString, | ||
digit, | ||
float, | ||
hex, | ||
int, | ||
@@ -64,4 +75,5 @@ oneOf, | ||
sentence, | ||
times, | ||
word, | ||
words | ||
}); |
import { Input } from './types'; | ||
import { JSONSerializable } from 'fictional'; | ||
export declare const TRANSFORMATIONS: { | ||
[name: string]: (input: Input) => JSONSerializable; | ||
[name: string]: (input: Input) => unknown; | ||
}; | ||
@@ -6,0 +5,0 @@ export declare const NUM_CHECKS: number; |
@@ -40,4 +40,7 @@ var __defProp = Object.defineProperty; | ||
var import__ = require("."); | ||
const TRANSFORMATIONS = __spreadValues(__spreadValues({}, import__.copycat), { | ||
oneOf: (input) => import__.copycat.oneOf(input, ["red", "green", "blue"]) | ||
const EXCLUDED_METHODS = /* @__PURE__ */ new Set(["setSalt"]); | ||
const TRANSFORMATIONS = __spreadValues(__spreadValues({}, Object.fromEntries(Object.keys(import__.copycat).filter((k) => !EXCLUDED_METHODS.has(k)).map((k) => [k, import__.copycat[k]]))), { | ||
times: (input) => import__.copycat.times(input, [4, 5], import__.copycat.word), | ||
oneOf: (input) => import__.copycat.oneOf(input, ["red", "green", "blue"]), | ||
scramble: (input) => import__.copycat.scramble(import__.copycat.fullName(input)) | ||
}); | ||
@@ -44,0 +47,0 @@ const NUM_CHECKS = +(process.env.COPYCAT_NUM_CHECKS || 50); |
{ | ||
"name": "@snaplet/copycat", | ||
"version": "0.5.1", | ||
"version": "0.6.0", | ||
"description": "", | ||
@@ -17,3 +17,3 @@ "main": "dist/index.js", | ||
"@faker-js/faker": "^6.2.0", | ||
"fictional": "^0.4.15", | ||
"fictional": "^0.5.0", | ||
"uuid": "^8.3.2" | ||
@@ -20,0 +20,0 @@ }, |
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
146217
94
2174
1
+ Addeddecimal.js@10.4.3(transitive)
+ Addedfictional@0.5.0(transitive)
- Removedfictional@0.4.15(transitive)
- Removedstring-hash@1.1.3(transitive)
Updatedfictional@^0.5.0