nl_tokens: creates and entity or entities immediately on the server w / attributes and returns the entity / entities attributes may be an attribute object or an array of entity objects or attribute objects
pl_tokens: function ( attributes , cb ) { if ( _ . isArray ( attributes ) ) { var self = this ; for ( var i = 0 ; i < attributes . length ; i ++ ) { // validate all var each = attributes [ i ] ; var entity = ( this . isInstance ( each ) ) ? each : self . new ( attributes [ i ] ) ; if ( ! entity . isValid ( ) ) { return cb ( entity . getErrors ( ) ) ; } // todo: collect all entities errors? } client . batchCreate ( this . _usergrid . type , attributes , function ( err , entities ) { // create with single call if ( err ) { return cb ( err ) ; } var wrapped = _ . map ( entities , function ( entity ) { return wrap ( self , entity ) ; } ) ; cb ( null , wrapped ) ; } ) ; } else { this . new ( attributes ) . <mask> ( cb ) ; } }