nl_tokens: Cast item
pl_tokens: function cast ( { id , attributes , relationships , defaultAttrs , defaultRels } ) { return ( data , { onlyMappedValues } ) => { if ( ! data ) { return undefined } const attrs = castAttributes ( data . attributes , attributes , ( onlyMappedValues ) ? { } : { ... defaultAttrs } ) if ( ! onlyMappedValues ) { setDates ( attrs ) } const rels = castRelationships ( data . relationships , relationships , ( onlyMappedValues ) ? { } : { ... defaultRels } ) const castId = data . <mask> || attrs . id || uuid ( ) delete attrs . id const casted = { id : castId , type : id , attributes : attrs , relationships : rels } if ( data . isNew ) { casted . isNew = true } if ( data . isDeleted ) { casted . isDeleted = true } return casted } }