• function

id

 

steal.id(id, currentWorkingId, [type=js])

Parameters

  1. id {String}

  2. currentWorkingId {String}

  3. type=js {String}Optional

Given a resource id passed to steal( resourceID, currentWorkingId ), this function converts it to the final, unique id. This function can be overwritten to change how unique ids are defined, for example, to be more AMD-like.

The following are the default rules.

Given an ID:

  1. Check the id has an extension like .js or .customext. If it doesn't:
    1. Check if the id is relative, meaning it starts with ../ or ./. If it is not, add "/" plus everything after the last "/". So foo/bar becomes foo/bar/bar
    2. Add .js to the id.
  2. Check if the id is relative, meaning it starts with ../ or ./. If it is relative, set the id to the id joined from the currentWorkingId.
  3. Check the