Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F9582908
access_strategy.id_starts_with_digit.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
418 B
Referenced Files
None
Subscribers
None
access_strategy.id_starts_with_digit.js
View Options
var
Sealious
=
require
(
"sealious"
);
var
Promise
=
require
(
"bluebird"
);
var
is_number
=
/^[0-9]/
;
var
IDStartsWithDigit
=
new
Sealious
.
ChipTypes
.
AccessStrategy
({
name
:
"id_starts_with_digit"
,
checker_function
:
function
(
context
,
item
){
return
new
Promise
(
function
(
resolve
,
reject
){
if
(
is_number
.
test
(
item
.
id
))
{
resolve
(
"id ok!"
);
}
else
{
reject
(
"bad id"
);
}
});
},
item_sensitive
:
true
,
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 11, 08:08 (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
978799
Default Alt Text
access_strategy.id_starts_with_digit.js (418 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment