Compare commits

...

2 Commits

Author SHA1 Message Date
Sven Slootweg c3a5c1d886 1.0.1 4 years ago
Sven Slootweg d28810eb64 Fix function handling 4 years ago

@ -125,6 +125,10 @@ Note that this also means that a custom error-throwing handler is not possible i
## Changelog
### v1.0.1 (June 3, 2020)
* __Bugfix:__ Fixed function handling; they were interpreted as literals in non-literal mode and vice versa. It now works correctly, according to what the documentation specifies.
### v1.0.0 (March 23, 2020)
Initial release.

@ -22,9 +22,9 @@ function doMatchValue(value, arms, functionsAreLiterals) {
}
module.exports = function matchValue(value, arms) {
return doMatchValue(value, arms, true);
return doMatchValue(value, arms, false);
};
module.exports.literal = function matchValueLiteral(value, arms) {
return doMatchValue(value, arms, false);
return doMatchValue(value, arms, true);
};

@ -1,8 +1,14 @@
{
"name": "match-value",
"description": "Utility for mapping values to other values or behaviour, a bit like a match statement",
"keywords": ["match", "switch", "case", "map", "mapping"],
"version": "1.0.0",
"keywords": [
"match",
"switch",
"case",
"map",
"mapping"
],
"version": "1.0.1",
"main": "index.js",
"repository": "http://git.cryto.net/joepie91/match-value.git",
"author": "Sven Slootweg <admin@cryto.net>",

Loading…
Cancel
Save