Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cordova-plugin-local-notifications
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nabil Sadki
cordova-plugin-local-notifications
Commits
30f8f6aa
Commit
30f8f6aa
authored
May 02, 2015
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fully migrate id to int and warn when NaN
parent
0157a9f4
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
49 additions
and
54 deletions
+49
-54
Builder.java
src/android/notification/Builder.java
+1
-1
Notification.java
src/android/notification/Notification.java
+7
-7
Options.java
src/android/notification/Options.java
+6
-10
APPLocalNotification.m
src/ios/APPLocalNotification.m
+5
-5
APPLocalNotificationOptions.h
src/ios/APPLocalNotificationOptions.h
+1
-1
APPLocalNotificationOptions.m
src/ios/APPLocalNotificationOptions.m
+4
-2
UIApplication+APPLocalNotification.h
src/ios/UIApplication+APPLocalNotification.h
+4
-4
UIApplication+APPLocalNotification.m
src/ios/UIApplication+APPLocalNotification.m
+7
-7
local-notification-core.js
www/local-notification-core.js
+6
-12
local-notification-util.js
www/local-notification-util.js
+8
-5
No files found.
src/android/notification/Builder.java
View file @
30f8f6aa
...
@@ -158,7 +158,7 @@ public class Builder {
...
@@ -158,7 +158,7 @@ public class Builder {
return
;
return
;
Intent
deleteIntent
=
new
Intent
(
context
,
clearReceiver
)
Intent
deleteIntent
=
new
Intent
(
context
,
clearReceiver
)
.
setAction
(
options
.
getId
())
.
setAction
(
options
.
getId
Str
())
.
putExtra
(
Options
.
EXTRA
,
options
.
toString
());
.
putExtra
(
Options
.
EXTRA
,
options
.
toString
());
PendingIntent
dpi
=
PendingIntent
.
getBroadcast
(
PendingIntent
dpi
=
PendingIntent
.
getBroadcast
(
...
...
src/android/notification/Notification.java
View file @
30f8f6aa
...
@@ -105,7 +105,7 @@ public class Notification {
...
@@ -105,7 +105,7 @@ public class Notification {
* Get notification ID.
* Get notification ID.
*/
*/
public
int
getId
()
{
public
int
getId
()
{
return
options
.
getId
AsInt
();
return
options
.
getId
();
}
}
/**
/**
...
@@ -168,7 +168,7 @@ public class Notification {
...
@@ -168,7 +168,7 @@ public class Notification {
// Intent gets called when the Notification gets fired
// Intent gets called when the Notification gets fired
Intent
intent
=
new
Intent
(
context
,
receiver
)
Intent
intent
=
new
Intent
(
context
,
receiver
)
.
setAction
(
options
.
getId
())
.
setAction
(
options
.
getId
Str
())
.
putExtra
(
Options
.
EXTRA
,
options
.
toString
());
.
putExtra
(
Options
.
EXTRA
,
options
.
toString
());
PendingIntent
pi
=
PendingIntent
.
getBroadcast
(
PendingIntent
pi
=
PendingIntent
.
getBroadcast
(
...
@@ -208,13 +208,13 @@ public class Notification {
...
@@ -208,13 +208,13 @@ public class Notification {
*/
*/
public
void
cancel
()
{
public
void
cancel
()
{
Intent
intent
=
new
Intent
(
context
,
receiver
)
Intent
intent
=
new
Intent
(
context
,
receiver
)
.
setAction
(
options
.
getId
());
.
setAction
(
options
.
getId
Str
());
PendingIntent
pi
=
PendingIntent
.
PendingIntent
pi
=
PendingIntent
.
getBroadcast
(
context
,
0
,
intent
,
0
);
getBroadcast
(
context
,
0
,
intent
,
0
);
getAlarmMgr
().
cancel
(
pi
);
getAlarmMgr
().
cancel
(
pi
);
getNotMgr
().
cancel
(
options
.
getId
AsInt
());
getNotMgr
().
cancel
(
options
.
getId
());
unpersist
();
unpersist
();
}
}
...
@@ -232,7 +232,7 @@ public class Notification {
...
@@ -232,7 +232,7 @@ public class Notification {
*/
*/
@SuppressWarnings
(
"deprecation"
)
@SuppressWarnings
(
"deprecation"
)
private
void
showNotification
()
{
private
void
showNotification
()
{
int
id
=
getOptions
().
getId
AsInt
();
int
id
=
getOptions
().
getId
();
if
(
Build
.
VERSION
.
SDK_INT
<=
15
)
{
if
(
Build
.
VERSION
.
SDK_INT
<=
15
)
{
// Notification for HoneyComb to ICS
// Notification for HoneyComb to ICS
...
@@ -309,7 +309,7 @@ public class Notification {
...
@@ -309,7 +309,7 @@ public class Notification {
private
void
persist
()
{
private
void
persist
()
{
SharedPreferences
.
Editor
editor
=
getPrefs
().
edit
();
SharedPreferences
.
Editor
editor
=
getPrefs
().
edit
();
editor
.
putString
(
options
.
getId
(),
options
.
toString
());
editor
.
putString
(
options
.
getId
Str
(),
options
.
toString
());
if
(
Build
.
VERSION
.
SDK_INT
<
9
)
{
if
(
Build
.
VERSION
.
SDK_INT
<
9
)
{
editor
.
commit
();
editor
.
commit
();
...
@@ -324,7 +324,7 @@ public class Notification {
...
@@ -324,7 +324,7 @@ public class Notification {
private
void
unpersist
()
{
private
void
unpersist
()
{
SharedPreferences
.
Editor
editor
=
getPrefs
().
edit
();
SharedPreferences
.
Editor
editor
=
getPrefs
().
edit
();
editor
.
remove
(
options
.
getId
());
editor
.
remove
(
options
.
getId
Str
());
if
(
Build
.
VERSION
.
SDK_INT
<
9
)
{
if
(
Build
.
VERSION
.
SDK_INT
<
9
)
{
editor
.
commit
();
editor
.
commit
();
...
...
src/android/notification/Options.java
View file @
30f8f6aa
...
@@ -203,21 +203,17 @@ public class Options {
...
@@ -203,21 +203,17 @@ public class Options {
}
}
/**
/**
* ID for the local notification.
* ID for the local notification
as a number
.
*/
*/
public
String
getId
()
{
public
Integer
getId
()
{
return
options
.
opt
String
(
"id"
,
"0"
);
return
options
.
opt
Int
(
"id"
,
0
);
}
}
/**
/**
* ID for the local notification.
* ID for the local notification
as a string
.
*/
*/
public
int
getIdAsInt
()
{
public
String
getIdStr
()
{
try
{
return
getId
().
toString
();
return
Integer
.
parseInt
(
getId
());
}
catch
(
Exception
ignore
)
{
return
0
;
}
}
}
/**
/**
...
...
src/ios/APPLocalNotification.m
View file @
30f8f6aa
...
@@ -102,7 +102,7 @@
...
@@ -102,7 +102,7 @@
[
self
.
commandDelegate
runInBackground
:
^
{
[
self
.
commandDelegate
runInBackground
:
^
{
for
(
NSDictionary
*
options
in
notifications
)
{
for
(
NSDictionary
*
options
in
notifications
)
{
NS
String
*
id
=
[
options
objectForKey
:
@"id"
];
NS
Number
*
id
=
[
options
objectForKey
:
@"id"
];
UILocalNotification
*
notification
;
UILocalNotification
*
notification
;
notification
=
[
self
.
app
localNotificationWithId
:
id
];
notification
=
[
self
.
app
localNotificationWithId
:
id
];
...
@@ -133,7 +133,7 @@
...
@@ -133,7 +133,7 @@
-
(
void
)
cancel
:(
CDVInvokedUrlCommand
*
)
command
-
(
void
)
cancel
:(
CDVInvokedUrlCommand
*
)
command
{
{
[
self
.
commandDelegate
runInBackground
:
^
{
[
self
.
commandDelegate
runInBackground
:
^
{
for
(
NS
String
*
id
in
command
.
arguments
)
{
for
(
NS
Number
*
id
in
command
.
arguments
)
{
UILocalNotification
*
notification
;
UILocalNotification
*
notification
;
notification
=
[
self
.
app
localNotificationWithId
:
id
];
notification
=
[
self
.
app
localNotificationWithId
:
id
];
...
@@ -170,7 +170,7 @@
...
@@ -170,7 +170,7 @@
-
(
void
)
clear
:(
CDVInvokedUrlCommand
*
)
command
-
(
void
)
clear
:(
CDVInvokedUrlCommand
*
)
command
{
{
[
self
.
commandDelegate
runInBackground
:
^
{
[
self
.
commandDelegate
runInBackground
:
^
{
for
(
NS
String
*
id
in
command
.
arguments
)
{
for
(
NS
Number
*
id
in
command
.
arguments
)
{
UILocalNotification
*
notification
;
UILocalNotification
*
notification
;
notification
=
[
self
.
app
localNotificationWithId
:
id
];
notification
=
[
self
.
app
localNotificationWithId
:
id
];
...
@@ -241,7 +241,7 @@
...
@@ -241,7 +241,7 @@
type
:(
APPLocalNotificationType
)
type
;
type
:(
APPLocalNotificationType
)
type
;
{
{
[
self
.
commandDelegate
runInBackground
:
^
{
[
self
.
commandDelegate
runInBackground
:
^
{
NS
String
*
id
=
[
command
argumentAtIndex
:
0
];
NS
Number
*
id
=
[
command
argumentAtIndex
:
0
];
BOOL
exist
;
BOOL
exist
;
CDVPluginResult
*
result
;
CDVPluginResult
*
result
;
...
@@ -528,7 +528,7 @@
...
@@ -528,7 +528,7 @@
*/
*/
-
(
void
)
cancelForerunnerLocalNotification
:
(
UILocalNotification
*
)
notification
-
(
void
)
cancelForerunnerLocalNotification
:
(
UILocalNotification
*
)
notification
{
{
NS
String
*
id
=
notification
.
options
.
id
;
NS
Number
*
id
=
notification
.
options
.
id
;
UILocalNotification
*
forerunner
;
UILocalNotification
*
forerunner
;
forerunner
=
[
self
.
app
localNotificationWithId
:
id
];
forerunner
=
[
self
.
app
localNotificationWithId
:
id
];
...
...
src/ios/APPLocalNotificationOptions.h
View file @
30f8f6aa
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
-
(
id
)
initWithDict
:(
NSDictionary
*
)
dict
;
-
(
id
)
initWithDict
:(
NSDictionary
*
)
dict
;
@property
(
readonly
,
getter
=
id
)
NS
String
*
id
;
@property
(
readonly
,
getter
=
id
)
NS
Number
*
id
;
@property
(
readonly
,
getter
=
badgeNumber
)
NSInteger
badgeNumber
;
@property
(
readonly
,
getter
=
badgeNumber
)
NSInteger
badgeNumber
;
@property
(
readonly
,
getter
=
alertBody
)
NSString
*
alertBody
;
@property
(
readonly
,
getter
=
alertBody
)
NSString
*
alertBody
;
@property
(
readonly
,
getter
=
soundName
)
NSString
*
soundName
;
@property
(
readonly
,
getter
=
soundName
)
NSString
*
soundName
;
...
...
src/ios/APPLocalNotificationOptions.m
View file @
30f8f6aa
...
@@ -59,9 +59,11 @@ NSString* const DEFAULT_SOUND = @"res://platform_default";
...
@@ -59,9 +59,11 @@ NSString* const DEFAULT_SOUND = @"res://platform_default";
/**
/**
* The notification's ID.
* The notification's ID.
*/
*/
-
(
NS
String
*
)
id
-
(
NS
Number
*
)
id
{
{
return
[
dict
objectForKey
:
@"id"
];
NSInteger
id
=
[[
dict
objectForKey
:
@"id"
]
integerValue
];
return
[
NSNumber
numberWithInteger
:
id
];
}
}
/**
/**
...
...
src/ios/UIApplication+APPLocalNotification.h
View file @
30f8f6aa
...
@@ -37,14 +37,14 @@
...
@@ -37,14 +37,14 @@
-
(
NSArray
*
)
localNotificationIdsByType
:(
APPLocalNotificationType
)
type
;
-
(
NSArray
*
)
localNotificationIdsByType
:(
APPLocalNotificationType
)
type
;
// If local notification with ID exists
// If local notification with ID exists
-
(
BOOL
)
localNotificationExist
:(
NS
String
*
)
id
;
-
(
BOOL
)
localNotificationExist
:(
NS
Number
*
)
id
;
// If local notification with ID and type exists
// If local notification with ID and type exists
-
(
BOOL
)
localNotificationExist
:(
NS
String
*
)
id
type
:(
APPLocalNotificationType
)
type
;
-
(
BOOL
)
localNotificationExist
:(
NS
Number
*
)
id
type
:(
APPLocalNotificationType
)
type
;
// Local notification by ID
// Local notification by ID
-
(
UILocalNotification
*
)
localNotificationWithId
:(
NS
String
*
)
id
;
-
(
UILocalNotification
*
)
localNotificationWithId
:(
NS
Number
*
)
id
;
// Local notification by ID and type
// Local notification by ID and type
-
(
UILocalNotification
*
)
localNotificationWithId
:(
NS
String
*
)
id
andType
:(
APPLocalNotificationType
)
type
;
-
(
UILocalNotification
*
)
localNotificationWithId
:(
NS
Number
*
)
id
andType
:(
APPLocalNotificationType
)
type
;
// Property list from all local notifications
// Property list from all local notifications
-
(
NSArray
*
)
localNotificationOptions
;
-
(
NSArray
*
)
localNotificationOptions
;
...
...
src/ios/UIApplication+APPLocalNotification.m
View file @
30f8f6aa
...
@@ -159,7 +159,7 @@
...
@@ -159,7 +159,7 @@
* @param id
* @param id
* Notification ID
* Notification ID
*/
*/
-
(
BOOL
)
localNotificationExist
:
(
NS
String
*
)
id
-
(
BOOL
)
localNotificationExist
:
(
NS
Number
*
)
id
{
{
return
[
self
localNotificationWithId
:
id
]
!=
NULL
;
return
[
self
localNotificationWithId
:
id
]
!=
NULL
;
}
}
...
@@ -171,7 +171,7 @@
...
@@ -171,7 +171,7 @@
* @param type
* @param type
* Notification life cycle type
* Notification life cycle type
*/
*/
-
(
BOOL
)
localNotificationExist
:
(
NS
String
*
)
id
type
:
(
APPLocalNotificationType
)
type
-
(
BOOL
)
localNotificationExist
:
(
NS
Number
*
)
id
type
:
(
APPLocalNotificationType
)
type
{
{
return
[
self
localNotificationWithId
:
id
andType
:
type
]
!=
NULL
;
return
[
self
localNotificationWithId
:
id
andType
:
type
]
!=
NULL
;
}
}
...
@@ -182,13 +182,13 @@
...
@@ -182,13 +182,13 @@
* @param id
* @param id
* Notification ID
* Notification ID
*/
*/
-
(
UILocalNotification
*
)
localNotificationWithId
:
(
NS
String
*
)
id
-
(
UILocalNotification
*
)
localNotificationWithId
:
(
NS
Number
*
)
id
{
{
NSArray
*
notifications
=
self
.
localNotifications
;
NSArray
*
notifications
=
self
.
localNotifications
;
for
(
UILocalNotification
*
notification
in
notifications
)
for
(
UILocalNotification
*
notification
in
notifications
)
{
{
if
([
notification
.
options
.
id
isEqualTo
String
:
id
])
{
if
([
notification
.
options
.
id
isEqualTo
Number
:
id
])
{
return
notification
;
return
notification
;
}
}
}
}
...
@@ -204,7 +204,7 @@
...
@@ -204,7 +204,7 @@
* @param type
* @param type
* Notification life cycle type
* Notification life cycle type
*/
*/
-
(
UILocalNotification
*
)
localNotificationWithId
:
(
NS
String
*
)
id
andType
:
(
APPLocalNotificationType
)
type
-
(
UILocalNotification
*
)
localNotificationWithId
:
(
NS
Number
*
)
id
andType
:
(
APPLocalNotificationType
)
type
{
{
UILocalNotification
*
notification
=
[
self
localNotificationWithId
:
id
];
UILocalNotification
*
notification
=
[
self
localNotificationWithId
:
id
];
...
@@ -262,7 +262,7 @@
...
@@ -262,7 +262,7 @@
UILocalNotification
*
notification
;
UILocalNotification
*
notification
;
NSMutableArray
*
options
=
[[
NSMutableArray
alloc
]
init
];
NSMutableArray
*
options
=
[[
NSMutableArray
alloc
]
init
];
for
(
NS
String
*
id
in
ids
)
for
(
NS
Number
*
id
in
ids
)
{
{
notification
=
[
self
localNotificationWithId
:
id
];
notification
=
[
self
localNotificationWithId
:
id
];
...
@@ -287,7 +287,7 @@
...
@@ -287,7 +287,7 @@
UILocalNotification
*
notification
;
UILocalNotification
*
notification
;
NSMutableArray
*
options
=
[[
NSMutableArray
alloc
]
init
];
NSMutableArray
*
options
=
[[
NSMutableArray
alloc
]
init
];
for
(
NS
String
*
id
in
ids
)
for
(
NS
Number
*
id
in
ids
)
{
{
notification
=
[
self
localNotificationWithId
:
id
];
notification
=
[
self
localNotificationWithId
:
id
];
...
...
www/local-notification-core.js
View file @
30f8f6aa
...
@@ -172,9 +172,7 @@ exports.cancelAll = function (callback, scope) {
...
@@ -172,9 +172,7 @@ exports.cancelAll = function (callback, scope) {
* The scope for the callback function
* The scope for the callback function
*/
*/
exports
.
isPresent
=
function
(
id
,
callback
,
scope
)
{
exports
.
isPresent
=
function
(
id
,
callback
,
scope
)
{
var
notId
=
(
id
||
'0'
).
toString
();
this
.
exec
(
'isPresent'
,
id
||
0
,
callback
,
scope
);
this
.
exec
(
'isPresent'
,
notId
,
callback
,
scope
);
};
};
/**
/**
...
@@ -188,9 +186,7 @@ exports.isPresent = function (id, callback, scope) {
...
@@ -188,9 +186,7 @@ exports.isPresent = function (id, callback, scope) {
* The scope for the callback function
* The scope for the callback function
*/
*/
exports
.
isScheduled
=
function
(
id
,
callback
,
scope
)
{
exports
.
isScheduled
=
function
(
id
,
callback
,
scope
)
{
var
notId
=
(
id
||
'0'
).
toString
();
this
.
exec
(
'isScheduled'
,
id
||
0
,
callback
,
scope
);
this
.
exec
(
'isScheduled'
,
notId
,
callback
,
scope
);
};
};
/**
/**
...
@@ -204,9 +200,7 @@ exports.isScheduled = function (id, callback, scope) {
...
@@ -204,9 +200,7 @@ exports.isScheduled = function (id, callback, scope) {
* The scope for the callback function
* The scope for the callback function
*/
*/
exports
.
isTriggered
=
function
(
id
,
callback
,
scope
)
{
exports
.
isTriggered
=
function
(
id
,
callback
,
scope
)
{
var
notId
=
(
id
||
'0'
).
toString
();
this
.
exec
(
'isTriggered'
,
id
||
0
,
callback
,
scope
);
this
.
exec
(
'isTriggered'
,
notId
,
callback
,
scope
);
};
};
/**
/**
...
@@ -275,7 +269,7 @@ exports.get = function () {
...
@@ -275,7 +269,7 @@ exports.get = function () {
scope
=
args
[
2
];
scope
=
args
[
2
];
if
(
!
Array
.
isArray
(
ids
))
{
if
(
!
Array
.
isArray
(
ids
))
{
this
.
exec
(
'getSingle'
,
ids
.
toString
(
),
callback
,
scope
);
this
.
exec
(
'getSingle'
,
Number
(
ids
),
callback
,
scope
);
return
;
return
;
}
}
...
@@ -323,7 +317,7 @@ exports.getScheduled = function () {
...
@@ -323,7 +317,7 @@ exports.getScheduled = function () {
}
}
if
(
!
Array
.
isArray
(
ids
))
{
if
(
!
Array
.
isArray
(
ids
))
{
this
.
exec
(
'getSingleScheduled'
,
ids
.
toString
(
),
callback
,
scope
);
this
.
exec
(
'getSingleScheduled'
,
Number
(
ids
),
callback
,
scope
);
return
;
return
;
}
}
...
@@ -371,7 +365,7 @@ exports.getTriggered = function () {
...
@@ -371,7 +365,7 @@ exports.getTriggered = function () {
}
}
if
(
!
Array
.
isArray
(
ids
))
{
if
(
!
Array
.
isArray
(
ids
))
{
this
.
exec
(
'getSingleTriggered'
,
ids
.
toString
(
),
callback
,
scope
);
this
.
exec
(
'getSingleTriggered'
,
Number
(
ids
),
callback
,
scope
);
return
;
return
;
}
}
...
...
www/local-notification-util.js
View file @
30f8f6aa
...
@@ -35,7 +35,7 @@ exports._defaults = {
...
@@ -35,7 +35,7 @@ exports._defaults = {
title
:
''
,
title
:
''
,
sound
:
'res://platform_default'
,
sound
:
'res://platform_default'
,
badge
:
0
,
badge
:
0
,
id
:
"0"
,
id
:
0
,
data
:
undefined
,
data
:
undefined
,
every
:
undefined
,
every
:
undefined
,
at
:
undefined
at
:
undefined
...
@@ -133,8 +133,9 @@ exports.convertProperties = function (options) {
...
@@ -133,8 +133,9 @@ exports.convertProperties = function (options) {
if
(
options
.
id
)
{
if
(
options
.
id
)
{
if
(
isNaN
(
options
.
id
))
{
if
(
isNaN
(
options
.
id
))
{
options
.
id
=
this
.
getDefaults
().
id
;
options
.
id
=
this
.
getDefaults
().
id
;
console
.
warn
(
'Id is not a number: '
+
options
.
id
);
}
else
{
}
else
{
options
.
id
=
options
.
id
.
toString
(
);
options
.
id
=
Number
(
options
.
id
);
}
}
}
}
...
@@ -149,6 +150,7 @@ exports.convertProperties = function (options) {
...
@@ -149,6 +150,7 @@ exports.convertProperties = function (options) {
if
(
options
.
badge
)
{
if
(
options
.
badge
)
{
if
(
isNaN
(
options
.
badge
))
{
if
(
isNaN
(
options
.
badge
))
{
options
.
badge
=
this
.
getDefaults
().
badge
;
options
.
badge
=
this
.
getDefaults
().
badge
;
console
.
warn
(
'Badge number is not a number: '
+
options
.
id
);
}
else
{
}
else
{
options
.
badge
=
Number
(
options
.
badge
);
options
.
badge
=
Number
(
options
.
badge
);
}
}
...
@@ -181,6 +183,7 @@ exports.convertProperties = function (options) {
...
@@ -181,6 +183,7 @@ exports.convertProperties = function (options) {
* The new callback function
* The new callback function
*/
*/
exports
.
createCallbackFn
=
function
(
callbackFn
,
scope
)
{
exports
.
createCallbackFn
=
function
(
callbackFn
,
scope
)
{
if
(
typeof
callbackFn
!=
'function'
)
if
(
typeof
callbackFn
!=
'function'
)
return
;
return
;
...
@@ -190,17 +193,17 @@ exports.createCallbackFn = function (callbackFn, scope) {
...
@@ -190,17 +193,17 @@ exports.createCallbackFn = function (callbackFn, scope) {
};
};
/**
/**
* Convert the IDs to
String
s.
* Convert the IDs to
number
s.
*
*
* @param {String/Number[]} ids
* @param {String/Number[]} ids
*
*
* @return Array of
String
s
* @return Array of
Number
s
*/
*/
exports
.
convertIds
=
function
(
ids
)
{
exports
.
convertIds
=
function
(
ids
)
{
var
convertedIds
=
[];
var
convertedIds
=
[];
for
(
var
i
=
0
;
i
<
ids
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
ids
.
length
;
i
++
)
{
convertedIds
.
push
(
ids
[
i
].
toString
(
));
convertedIds
.
push
(
Number
(
ids
[
i
]
));
}
}
return
convertedIds
;
return
convertedIds
;
...
...
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