src/entity/Location.js
/**
   * Return overridden resource factory for Locations. Locations are
   * sub-resources of Thngs and are not allowed on top level Scope classes.
   * This factory also override the default Resource's update method to allow
   * empty invocations that send the current browser's location as the payload.
   *
   * @static
   * @return {{locations: Function}}
   */
Return overridden resource factory for Locations. Locations are
sub-resources of Thngs and are not allowed on top level Scope classes.
This factory also override the default Resource's update method to allow
empty invocations that send the current browser's location as the payload.

@static
@return {{locations: Function}}
Return overridden resource factory for Locations . Locations are sub - resources of Thngs and are not allowed on top level Scope classes . This factory also override the default Resource ' s update method to allow empty invocations that send the current browser ' s location as the payload . @static @return {{ locations : Function }}
static resourceFactory () {
    return {
      locations () {
        if (isString(arguments[0])) {
          throw new TypeError('There is no single resource for Locations')
        }
        const thngPath = this instanceof Scope ? this[symbols.path] : ''
        return Object.assign(Resource.factoryFor(Location, thngPath + path).call(this), {
          update (...args) {
            return updateLocation.call(this, ...args)
          }
        })
      }
    }
  }
static resourceFactory ( ) { return { locations ( ) { if ( isString ( arguments [ 0 ] ) ) { throw new TypeError ( 'There is no single resource for Locations' ) } const thngPath = this instanceof Scope ? this [ symbols . path ] : '' return Object . assign ( Resource . factoryFor ( Location , thngPath + path ) . call ( this ) , { update ( ... args ) { return updateLocation . call ( this , ... args ) } } ) } } }
Return overridden resource factory for Locations.
Return overridden resource factory for Locations .
// Locations don't have single resource endpoint (e.g.: /locations/:id) // Creates and returns Resource of type Location. // Override property resource update to allow empty updates. // See `updateLocation()`.