Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F3010085
field-type.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
916 B
Referenced Files
None
Subscribers
None
field-type.js
View Options
var
Promise
=
require
(
"bluebird"
);
/**
* Stores field type metadata, as well as validation methods
* @class
*/
function
FieldType
(
longid
){
this
.
longid
=
longid
;
}
FieldType
.
prototype
=
new
function
(){
/**
* Whether a given value can be stored in this field type instance
* @memberOf FieldType
* @abstract
* @param {any} value value of this variable will be tested for compatibility with this field
* @return {Promise}
*/
this
.
isProperValue
=
function
(
value
){
console
.
log
(
"field-type.js foka"
)
return
new
Promise
(
function
(
resolve
,
reject
){
resolve
(
value
);
});
}
this
.
encode
=
function
(
value_in_code
){
return
new
Promise
(
function
(
resolve
,
reject
){
resolve
(
value_in_code
);
})
}
this
.
decode
=
function
(
value_in_database
){
return
new
Promise
(
function
(
resolve
,
reject
){
resolve
(
value_in_database
);
})
}
}
FieldType
.
is_a_constructor
=
true
;
module
.
exports
=
FieldType
;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, May 7, 19:36 (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
672010
Default Alt Text
field-type.js (916 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment