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) { ... })
Members
-
<static> Collection
-
Collection class.
-
<static> Container
-
Container class.
-
<static> DataStore
-
DataStore class.
-
<static> LinkedCollection
-
LinkedCollection class.
-
<static> Mapper
-
Mapper class.
-
<static> Query
-
Query class.
-
<static> Record
-
Record class.
-
<static> Schema
-
Schema class.
-
<static> utils :Object
-
Type:
- Object
- Source:
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
-
<static> version :Object
-
Details of the current version of the
js-data
module.Type:
- Object
- Source:
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.
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