Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "suicchi", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Switch case on steroids", | ||
@@ -14,3 +14,3 @@ "main": "dist/index.js", | ||
}, | ||
"types": "dist/wrapper.d.ts", | ||
"types": "dist/index.d.ts", | ||
"keywords": [ | ||
@@ -17,0 +17,0 @@ "switch-case", |
@@ -158,2 +158,3 @@ # suicchi | ||
} | ||
// aSwitch | ||
@@ -275,3 +276,26 @@ switch(x) { | ||
## EvaluateCase (a.k.a Evaluate) | ||
The EvaluateCase (or Evaluate, as it's still supported atm) method lets you run a specific case by passing in the case as a parameter. | ||
if the provided parameter is does not match any of the cases, it will run the default routine. | ||
Also, the case parameter is case-sensitive. | ||
```javascript | ||
const x = new Suicchi({ | ||
default: "Awesome", | ||
Rye: "Gay", | ||
rye: "Gay", | ||
rYe: "Gay", | ||
ryE: "Gay" | ||
}); | ||
x.EvaluateCase("Ray"); // => "Awesome" | ||
x.EvaluateCase("Jacob"); // => "Awesome" | ||
x.EvaluateCase("Rye"); // => "Gay" | ||
x.EvaluateCase("rye"); // => "Gay" | ||
x.EvaluateCase("rYe"); // => "Gay" | ||
x.EvaluateCase("ryE"); // => "Gay" | ||
``` | ||
# Forking the repo | ||
@@ -278,0 +302,0 @@ 1. Fork it https://github.com/yakovmeister/suicchi/fork |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12121
312