Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@unmock/jaymock

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unmock/jaymock - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

52

index.d.ts
declare namespace jaymock {
type ExtensionName = string | {[key: string]: Function};
type Functions = {[key: string]: Function};
type Instance = {template: jaymock.Template, functions: jaymock.Functions}
interface Template {

@@ -11,33 +10,32 @@ [key: string]: string | number | Template;

}
interface Method {
/**
Populates the template object with fake data.
@param template - A [`template`](https://github.com/unmock/jaymock#template) object to populate.
@returns An `object` populated with fake data.
*/
populate(template: jaymock.Template): jaymock.Populated;
}
/**
Adds a custom data generation function that can be called in the `populate` `template` object using the value of its `name`.
@param name - A `string` used to refer to the `body` function.
@param body - A `function` that can be referred to in the `template` object.
*/
extend(name: jaymock.ExtensionName, body?: Function): void;
declare function jaymock(): {
/**
Populates the template object with fake data.
@param template - A [`template`](https://github.com/unmock/jaymock#template) object to populate.
@returns An `object` populated with fake data.
*/
populate(template: jaymock.Template): jaymock.Populated;
/**
Sets `Faker.js`'s language locale.
@param locale - `Faker.js` locale.
*/
setFakerLocale(locale: string): void;
/**
Adds a custom data generation function that can be called in the `populate` `template` object using the value of its `name`.
@param name - A `string` used to refer to the `body` function.
@param body - A `function` that can be referred to in the `template` object.
*/
extend(name: jaymock.ExtensionName, body?: Function): void;
/**
Sets `Faker.js`'s randomness seed.
@param seed - `Faker.js` randomness seed.
*/
setFakerSeed(seed: number): void;
}
}
/**
Sets `Faker.js`'s language locale.
@param locale - `Faker.js` locale.
*/
setFakerLocale(locale: string): void;
declare function jaymock(): jaymock.Instance & jaymock.Method;
/**
Sets `Faker.js`'s randomness seed.
@param seed - `Faker.js` randomness seed.
*/
setFakerSeed(seed: number): void;
};
export = jaymock;
{
"name": "@unmock/jaymock",
"version": "1.0.5",
"version": "1.0.6",
"description": "Minimal fake JSON test data generator",

@@ -5,0 +5,0 @@ "main": "index.js",

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