Code Monkey home page Code Monkey logo

compareaa's Introduction

CompareAA

Compare Associative Array in BrightScript

Instalation

Copy CompareAA.brs file into source folder.

Usage

CompareAA is a function that accepts two arguments and returns Boolean. To compare two objects or lists (types roAssociativeArray or roArray) simply call CompareAA(object1,object2) and check for returned bool.

Example of usage

Check out an example of usage:

obj1 = { foo: "bar", list: ["foo", "bar"]}
obj2 = { foo: "bar", list: ["foo", "bar", "bar"]}

if CompareAA(obj1,obj2) then
  print "Compared objects are equal."
else
  print "Objects are different."
end if

Example above prints "Objects are different."

Notes

Be sure you dont name other function as CompareAA! Use and abuse! And for those who dont know, BrightScript language is used for Roku channels development.

compareaa's People

Contributors

roberto14 avatar rowang1bilue avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

compareaa's Issues

Bug with roString vs String

This change is needed for me:

 typeaa1 = type(aa1[prop])
 typeaa2 = type(aa2[prop])
 if typeaa1 = "roString" then typeaa1 = "String"
 if typeaa2 = "roString" then typeaa2 = "String"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.