Socket
Socket
Sign inDemoInstall

@types/chance

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/chance - npm Package Compare versions

Comparing version 0.7.35 to 0.7.36

64

chance/index.d.ts

@@ -1,4 +0,5 @@

// Type definitions for Chance 0.7.3
// Type definitions for Chance 0.7.4
// Project: http://chancejs.com
// Definitions by: Chris Bowdon <https://github.com/cbowdon>
// Brice BERNARD <https://github.com/brikou>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

@@ -16,13 +17,12 @@

interface ChanceStatic {
(): Chance
(seed: Seed): SeededChance
(generator: () => any): Chance
(): Chance;
(seed: Seed): SeededChance;
(generator: () => any): Chance;
new(): Chance;
new(seed: Seed): SeededChance;
new(generator: () => any): Chance;
new (): Chance;
new (seed: Seed): SeededChance;
new (generator: () => any): Chance;
}
interface Chance {
// Basics

@@ -46,3 +46,3 @@ bool(opts?: Options): boolean;

birthday(): Date;
birthday(opts?: Options): Date|string;
birthday(opts?: Options): Date | string;
cpf(): string;

@@ -100,3 +100,3 @@ first(opts?: Options): string;

date(): Date;
date(opts: DateOptions): Date|string;
date(opts: DateOptions): Date | string;
hammertime(): number;

@@ -115,8 +115,8 @@ hour(opts?: Options): number;

cc_type(): string;
cc_type(opts: Options): string|CreditCardType;
cc_type(opts: Options): string | CreditCardType;
currency(): Currency;
currency_pair(): [ Currency, Currency ];
currency_pair(): [Currency, Currency];
dollar(opts?: Options): string;
exp(): string;
exp(opts: Options): string|CreditCardExpiration;
exp(opts: Options): string | CreditCardExpiration;
exp_month(opts?: Options): string;

@@ -131,7 +131,7 @@ exp_year(opts?: Options): string;

* @deprecated Use pickone
*/
*/
pick<T>(arr: T[]): T;
pickone<T>(arr: T[]): T;
/**
* @deprecated Use pickset
* @deprecated Use pickset
*/

@@ -152,3 +152,3 @@ pick<T>(arr: T[], count: number): T[];

d100(): number;
guid(): string;
guid(options?: { version: 4 | 5 }): string;
hash(opts?: Options): string;

@@ -159,3 +159,3 @@ n<T>(generator: () => T, count: number, opts?: Options): T[];

rpg(dice: string): number[];
rpg(dice: string, opts?: Options): number[]|number;
rpg(dice: string, opts?: Options): number[] | number;
tv(opts?: Options): string;

@@ -178,3 +178,5 @@ unique<T>(generator: () => T, count: number, opts?: Options): T[];

// the correct options interfaces for each method
interface Options { [id: string]: any; }
interface Options {
[id: string]: any;
}

@@ -212,15 +214,17 @@ interface DateOptions {

interface MixinDescriptor { [id: string]: () => any; }
interface MixinDescriptor {
[id: string]: () => any;
}
interface Setter {
(key: 'firstNames', values: string[]): any;
(key: 'lastNames', values: string[]): any;
(key: 'provinces', values: string[]): any;
(key: 'us_states_and_dc', values: string[]): any;
(key: 'territories', values: string[]): any;
(key: 'armed_forces', values: string[]): any;
(key: 'street_suffixes', values: string[]): any;
(key: 'months', values: string[]): any;
(key: 'cc_types', values: string[]): any;
(key: 'currency_types', values: string[]): any;
(key: "firstNames", values: string[]): any;
(key: "lastNames", values: string[]): any;
(key: "provinces", values: string[]): any;
(key: "us_states_and_dc", values: string[]): any;
(key: "territories", values: string[]): any;
(key: "armed_forces", values: string[]): any;
(key: "street_suffixes", values: string[]): any;
(key: "months", values: string[]): any;
(key: "cc_types", values: string[]): any;
(key: "currency_types", values: string[]): any;
<T>(key: string, values: T[]): any;

@@ -240,3 +244,3 @@ }

// import Chance = require('chance');
declare module 'chance' {
declare module "chance" {
interface ExportedChance extends Chance.ChanceStatic {

@@ -243,0 +247,0 @@ Chance: ExportedChance;

{
"name": "@types/chance",
"version": "0.7.35",
"version": "0.7.36",
"description": "TypeScript definitions for Chance",

@@ -9,3 +9,9 @@ "license": "MIT",

"name": "Chris Bowdon",
"url": "https://github.com/cbowdon"
"url": "https://github.com/cbowdon",
"githubUsername": "cbowdon"
},
{
"name": "Brice BERNARD",
"url": "https://github.com/brikou",
"githubUsername": "brikou"
}

@@ -20,4 +26,4 @@ ],

"dependencies": {},
"typesPublisherContentHash": "437f894409d350703b4d9a28de00a6b8609e0fe765894bf65f958c265c4f5201",
"typesPublisherContentHash": "0adf63ddecc10db4262bc9441d6efa2bdbbd30f7576e0b4d5d51d81b057469ec",
"typeScriptVersion": "2.0"
}

@@ -11,3 +11,3 @@ # Installation

Additional Details
* Last updated: Mon, 21 Aug 2017 21:49:18 GMT
* Last updated: Wed, 03 Jan 2018 08:47:03 GMT
* Dependencies: none

@@ -17,2 +17,2 @@ * Global values: Chance, chance

# Credits
These definitions were written by Chris Bowdon <https://github.com/cbowdon>.
These definitions were written by Chris Bowdon <https://github.com/cbowdon>, Brice BERNARD <https://github.com/brikou>.
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