Skip to content

Commit

Permalink
Remove unused variable (#10)
Browse files Browse the repository at this point in the history
* remove unused variable

* Update dist file

* Fix dist file

Co-authored-by: Brian Leighty <[email protected]>
  • Loading branch information
triwav and triwav authored Mar 7, 2022
1 parent 52679bb commit 7d51d74
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
25 changes: 12 additions & 13 deletions dist/rodash.cat.brs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
' LICENSE: distribute, sublicense, and/or sell copies of the Software, and to
' LICENSE: permit persons to whom the Software is furnished to do so, subject to
' LICENSE: the following conditions:
' LICENSE:
' LICENSE:
' LICENSE: The above copyright notice and this permission notice shall be
' LICENSE: included in all copies or substantial portions of the Software.
' LICENSE:
' LICENSE:
' LICENSE: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
' LICENSE: EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
' LICENSE: MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
Expand Down Expand Up @@ -53,7 +53,7 @@ return destination.GetString()
end if
End Function
Function rodash_clone_(source)
if source <> invalid
if source <> invalid
if type(source) = "roSGNode"
return m.cloneNode_(source)
else if type(source) = "roAssociativeArray"
Expand Down Expand Up @@ -199,7 +199,7 @@ adId = ""
end if
if FindMemberFunction(di, "IsRIDADisabled") <> invalid
tracking = di.IsRIDADisabled()
else
else
tracking = false
end if
profile = {
Expand Down Expand Up @@ -253,7 +253,7 @@ audioDecodeInfo: {} 'deprecated
return profile
End Function
Function rodash_difference_(first, second)
result = []
result = []
for each f in first
result.push(f)
for each s in second
Expand Down Expand Up @@ -306,11 +306,11 @@ incomparable = {
atype = lcase(type(a))
btype = lcase(type(b))
if all[atype] = invalid and all[btype] = invalid
if incomparable[lcase(type(a))] = invalid or incomparable[lcase(type(a))][lcase(type(b))] = invalid
if incomparable[lcase(type(a))] = invalid or incomparable[lcase(type(a))][lcase(type(b))] = invalid
if incomparable[lcase(type(b))] = invalid or incomparable[lcase(type(b))][lcase(type(a))] = invalid
if a = b
return true
else if type(a) = type(b) and type(a) = invalid
else if type(a) = type(b) and type(a) = invalid
return true
end if
end if
Expand Down Expand Up @@ -349,7 +349,7 @@ end for
return -1
End Function
Function rodash_intersection_(first, second)
result = []
result = []
for each f in first
for each s in second
if m.equal(s,f) then result.push(f)
Expand Down Expand Up @@ -478,7 +478,6 @@ End Function
Function rodash_regRead_(sectionName As String, key As String) As Dynamic
sectionName = LCase(sectionName)
key = LCase(key)
registry = CreateObject("roRegistry")
section = CreateObject("roRegistrySection", sectionName)
if section.Exists(key) then
return ParseJson(section.Read(key))
Expand All @@ -489,7 +488,7 @@ End Function
Function rodash_regWrite_(sectionName As String, key As String, value As Dynamic) As Void
sectionName = LCase(sectionName)
key = LCase(key)
registry = CreateObject("roRegistry")
registry = CreateObject("roRegistry")
section = CreateObject("roRegistrySection", sectionName)
section.Write(key, FormatJson(value))
section.Flush()
Expand Down Expand Up @@ -609,15 +608,15 @@ value = ""
else
value = value.toStr() ' force to roString
if FindMemberFunction(value, "EncodeUriComponent") <> invalid then
value = value.EncodeUriComponent()
value = value.EncodeUriComponent()
else
transferEncoder = CreateObject("roUrlTransfer")
value = transferEncoder.Escape(value)
end if
end if
encoded = encoded + param.toStr() + "=" + value + "&"
end for
if Right(encoded, 1) = "&" then
if Right(encoded, 1) = "&" then
encoded = Left(encoded, Len(encoded)-1)
end if
end if
Expand Down Expand Up @@ -653,7 +652,7 @@ result.port = input.mid(1, port_end-1) ' take the ':' prefix off
input = input.mid(port_end)
end if
path_end = input.instr("?")
if path_end = -1 then
if path_end = -1 then
path_end = input.instr("#")
if path_end = -1 then path_end = input.len()
end if
Expand Down
15 changes: 7 additions & 8 deletions src/registry.brs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
' * @instance
' * @description Read registry at key in sectionName and deserialize from JSON string.
' * @example
' *
' *
' * _.regRead("auth", "password")
' * ' => "secret123abc!"
' *
Expand All @@ -33,12 +33,11 @@
' *
' * _.regRead("user", "settings")
' * ' => {a:1, b:2}
' *
' *
' */
Function rodash_regRead_(sectionName As String, key As String) As Dynamic
sectionName = LCase(sectionName)
key = LCase(key)
registry = CreateObject("roRegistry")
section = CreateObject("roRegistrySection", sectionName)
if section.Exists(key) then
return ParseJson(section.Read(key))
Expand All @@ -53,18 +52,18 @@ End Function
' * @instance
' * @description Serialize value to JSON string and write to the registry at key in sectionName.
' * @example
' *
' *
' * _.regWrite("auth", "password", "secret123abc!")
' *
' * _.regWrite("user", "bookmarkIds", [1,2,3])
' *
' * _.regWrite("user", "settings", {a:1, b:2})
' *
' *
' */
Function rodash_regWrite_(sectionName As String, key As String, value As Dynamic) As Void
sectionName = LCase(sectionName)
key = LCase(key)
registry = CreateObject("roRegistry")
registry = CreateObject("roRegistry")
section = CreateObject("roRegistrySection", sectionName)
section.Write(key, FormatJson(value))
section.Flush()
Expand Down Expand Up @@ -125,8 +124,8 @@ End Function
' * @member regWriteAll
' * @memberof module:rodash
' * @instance
' * @description
' * Write the entire registry for the channel. By default this overwrites
' * @description
' * Write the entire registry for the channel. By default this overwrites
' * any existing data, but will not remove any sections or keys
' *
' * @example
Expand Down

0 comments on commit 7d51d74

Please sign in to comment.