Skip to content

Commit

Permalink
Added noodle.equalTo()
Browse files Browse the repository at this point in the history
  • Loading branch information
shysolocup authored Aug 25, 2023
1 parent 412dc80 commit f262950
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* :: Stews :: Version 1.7.0 | 08/18/23 :: */
/* :: Stews :: Version 1.7.1 | 08/25/23 :: */
// https://github.com/paigeroid/stews


Expand Down Expand Up @@ -2549,7 +2549,7 @@ class Noodle {
this.content = object;
}
else if (typeof object == "number") {
this.content = object.toString();
this.content = object.toString();
}
else if (object instanceof Array) {
this.content = object.join(joiner);
Expand Down Expand Up @@ -2974,6 +2974,19 @@ class Noodle {
}
return false;
}


// equalTo
equalTo(/**/) {
let args = Array.from(arguments);
if (args[0] instanceof Array) args = args[0];
let stuff = this.content;

for (let i = 0; i < args.length; i++) {
if (stuff == args[i]) return true;
}
return false;
}


// toUpperCase
Expand Down Expand Up @@ -3663,12 +3676,12 @@ Object.defineProperty(Soup.prototype, "random", {

try { // check if it's a .js file

module.exports = {
Stew,
Soup,
module.exports = {
Stew,
Soup,
Noodle,
random,
StewFunctionMaker, SoapFunctionMaker, NoodFunctionMaker,
random,
StewFunctionMaker, SoapFunctionMaker, NoodFunctionMaker,
StewPropertyMaker, SoapPropertyMaker, NoodPropertyMaker
};

Expand Down

0 comments on commit f262950

Please sign in to comment.