Module: js-data

Registered as js-data in NPM and Bower.

Script tag

window.JSData

CommonJS

var JSData = require('js-data')

ES6 Modules

import JSData from 'js-data'

AMD

define('myApp', ['js-data'], function (JSData) { ... })
Source:

Members


<static> Collection

Collection class.

Source:

<static> Container

Container class.

Source:

<static> DataStore

DataStore class.

Source:

<static> LinkedCollection

Source:

<static> Mapper

Mapper class.

Source:

<static> Query

Query class.

Source:

<static> Record

Record class.

Source:

<static> Schema

Schema class.

Source:

<static> utils :Object

Type:
  • Object
Properties:
Name Type Description
addHiddenPropsToTarget function

TODO

classCallCheck function

TODO

copy function

TODO

deepMixIn function

TODO

eventify function

TODO

extend function

TODO

fillIn function

TODO

fromJson function

TODO

get function

TODO

getSuper function

TODO

intersection function

TODO

isArray function

TODO

isBlacklisted function

TODO

isBrowser boolean

TODO

isBoolean function

TODO

isFunction function

TODO

isInteger function

TODO

isNull function

TODO

isNumber function

TODO

isObject function

TODO

isRegExp function

TODO

isSorN function

TODO

isString function

TODO

isUndefined function

TODO

possibleConstructorReturn function

TODO

reject function

TODO

resolve function

TODO

set function

TODO

toJson function

TODO

uuid function

TODO

Source:

<static> version :Object

Details of the current version of the js-data module.

Type:
  • Object
Properties:
Name Type Description
full string

The full semver value.

major number

The major version number.

minor number

The minor version number.

patch number

The patch version number.

alpha string | boolean

The alpha version value, otherwise false if the current version is not alpha.

beta string | boolean

The beta version value, otherwise false if the current version is not beta.

Source:

Methods


<static> belongsTo(related, opts)

TODO

Parameters:
Name Type Description
related Mapper

The relation the target belongs to.

opts Object

Configuration options.

Properties
Name Type Description
foreignKey string

The field that holds the primary key of the related record.

localField string

The field that holds a reference to the related record object.

Source:
Returns:

Invocation function, which accepts the target as the only parameter.

Type
function

<static> hasMany(related, opts)

TODO

Parameters:
Name Type Description
related Mapper

The relation of which the target has many.

opts Object

Configuration options.

Properties
Name Type Argument Description
foreignKey string <optional>

The field that holds the primary key of the related record.

localField string

The field that holds a reference to the related record object.

Source:
Returns:

Invocation function, which accepts the target as the only parameter.

Type
function

<static> hasOne(related, opts)

TODO

Parameters:
Name Type Description
related Mapper

The relation of which the target has one.

opts Object

Configuration options.

Properties
Name Type Argument Description
foreignKey string <optional>

The field that holds the primary key of the related record.

localField string

The field that holds a reference to the related record object.

Source:
Returns:

Invocation function, which accepts the target as the only parameter.

Type
function