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

cheap-dream

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cheap-dream

generate images, text or audio with a Markov chain

  • 0.2.0
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

cheap-dream

build status coverage status

generate images, text or audio with a Markov chain

Installation

$ npm install cheap-dream

API

parseText(text)Object

Parses a string to a model that can be used to generate a new text.

generateText(model, [options])string

Generates a new text from the model

parseImage(image)Object

Parses an ndarray to a model that can be used to generate a new image.

generateImage(model, options)ndarray

Generates a new image from the model

parseText(text) ⇒ Object

Parses a string to a model that can be used to generate a new text.

Kind: global function Returns: Object - The model to be used with generateText

ParamTypeDescription
textstringThe text to parse

generateText(model, [options]) ⇒ string

Generates a new text from the model

Kind: global function Returns: string - The new text

ParamTypeDefaultDescription
modelObjectThe model generated with parseText
[options]ObjectConfiguration options
[options.maxTries]number100The maximum amount of attempts
[options.startWith]stringThe string to start with, random by default
[options.endWith]functionFunction that will be called with the current word, return true to end

parseImage(image) ⇒ Object

Parses an ndarray to a model that can be used to generate a new image.

Kind: global function Returns: Object - The model to be used with generateImage

ParamTypeDescription
imagendarrayThe image to parse

generateImage(model, options) ⇒ ndarray

Generates a new image from the model

Kind: global function Returns: ndarray - The new image

ParamTypeDescription
modelObjectThe model generated with parseImage
optionsObjectConfiguration options
options.widthnumberThe width of the output image
options.heightnumberThe width of the output image
[options.startWith]ArrayThe color to start with, array with [red, green, blue]
[options.endWith]functionFunction that will be called with the current color, return true to end

License

MIT

FAQs

Package last updated on 21 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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