Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

..
Octocat-spinner-32 README.md
Octocat-spinner-32 client.md
README.md

API documentation

Versions.version

The current running version of Versions


Versions.async

Async helper.


Versions.read(path String)

Read in a configuration file and merge it with our internal configuration.

Arguments

  • path String

Versions.listen(port Number, callback Function)

Listen instructs Versions to setup the static server. This function should
only be called once you are done with all your modifications.

Arguments

  • port Number Optional port number, if you didn't set in a config file
  • callback Function Callback for when the server has started

Versions.allows(what String, req Request)

Checks if the client allows x based on the details from the given
request.

Arguments

  • what String What do we need to test for
  • req Request HTTP server request

Versions.get(key String)

Read out the configuration.

Arguments

  • key String

Versions.set(key String, to Mixed)

Updates a configuration value and emits a change:<key> event.

Arguments

  • key String Configuration property that needs to be updated
  • to Mixed The new value

Versions.merge(target Object, additional Object)

Merge in objects.

Arguments

  • target Object The object that receives the props
  • additional Object Extra object that needs to be merged in the target

Versions.forEach(collection Mixed, iterator Function)

Iterate over a collection. When you return false, it will stop the iteration.

Arguments

  • collection Mixed Either an Array or Object.
  • iterator Function Function to be called for each item

Versions.connect(server String, options Object)

Establish a connection with a Versions server so it can sync version numbers
between the server and clients.

Arguments

  • server String The domain name of the Versions server.
  • options Object Connection options.

Versions.end(callback Function)

Clean up all internal connections and references.

Arguments

  • callback Function
Something went wrong with that request. Please try again.