Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Fake data generators, used by dyson and dyson-image

NotificationsYou must be signed in to change notification settings

webpro/dyson-generators

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Fake data generators, used bydyson anddyson-image.

Installation

Install dyson-generators locally by including it inpackage.json as adevDependency:

"devDependencies": {    "dyson-generators": "~0.1"}

Examples

var g = require('dyson-generators');g.id()              // 1 (consecutive calls return 2, 3, 4, ..)g.random(20)        // 13g.name()            // 'John', 'Olivia`g.address.city()    // 'Mexico City', 'Beijing'g.address.zipUS()   // '53142', '71238'g.address.zipNL()   // '4715 FW', '7551 VT'g.time.byQuarter()  // '14:45', '9:00'

Theg.image.base64() method is a proxy tohttp://dummyimage.com by default:

// Returns 'data:image/png;base64,iVBORw0KGgoAAAANSUh...'g.image.base64({width:200, height: 200});// See http://dummyimage.com for documentationg.image.base64({path:'/200x300&text=dummyimage.com+rocks!'});// Return base64 image string from a custom image serviceg.image.base64({    host: 'http://lorempixel.com',    path: '/150/150/abstract/' + g.random(10)});

About

Fake data generators, used by dyson and dyson-image

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp