Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tomáš Peterka
jio
Commits
4f6b5e11
Commit
4f6b5e11
authored
Aug 07, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
splitstorage.js amd compatible now
parent
42953eed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
33 deletions
+10
-33
src/jio.storage/splitstorage.js
src/jio.storage/splitstorage.js
+10
-33
No files found.
src/jio.storage/splitstorage.js
View file @
4f6b5e11
...
...
@@ -16,23 +16,15 @@
* "storage_list": [<storage description>, ...]
* }
*/
(
function
()
{
// define([module_name], [dependencies], module);
(
function
(
dependencies
,
module
)
{
"
use strict
"
;
var
queries
;
/**
* Get the real type of an object
*
* @param {Any} value The value to check
* @return {String} The value type
*/
function
type
(
value
)
{
// returns "String", "Object", "Array", "RegExp", ...
return
(
/^
\[
object
([
a-zA-Z
]
+
)\]
$/
).
exec
(
Object
.
prototype
.
toString
.
call
(
value
)
)[
1
];
if
(
typeof
define
===
'
function
'
&&
define
.
amd
)
{
return
define
(
dependencies
,
module
);
}
module
(
jIO
);
}([
'
jio
'
],
function
(
jIO
)
{
"
use strict
"
;
/**
* Generate a new uuid
...
...
@@ -299,7 +291,7 @@
}
};
}
if
(
type
(
doc
)
!==
"
Array
"
)
{
if
(
!
Array
.
isArray
(
doc
)
)
{
for
(
i
=
0
;
i
<
priv
.
storage_list
.
length
;
i
+=
1
)
{
that
.
addJob
(
method
,
...
...
@@ -592,20 +584,5 @@
return
that
;
}
// end of splitStorage
//////////////////////////////
// exports to JIO
if
(
typeof
define
===
"
function
"
&&
define
.
amd
)
{
define
([
'
jio
'
],
function
(
jio
)
{
try
{
queries
=
require
(
'
complex_queries
'
);
}
catch
(
e
)
{}
jio
.
addStorageType
(
'
split
'
,
splitStorage
);
});
}
else
if
(
typeof
require
===
"
function
"
)
{
require
(
'
jio
'
).
addStorageType
(
'
split
'
,
splitStorage
);
}
else
if
(
typeof
jIO
===
"
object
"
)
{
jIO
.
addStorageType
(
'
split
'
,
splitStorage
);
}
else
{
throw
new
Error
(
"
Unable to export splitStorage to JIO.
"
);
}
}());
jIO
.
addStorageType
(
'
split
'
,
splitStorage
);
}));
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment