diff --git a/CHANGES.md b/CHANGES.md index 4528a14..7624338 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,5 @@ # Changes Logs -## v0.1.0 +## v0.1.1 -Nothing yet. +- Fixed filter "|length". diff --git a/package-lock.json b/package-lock.json index f925f76..7b2eb1e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { "name": "@litert/typeguard", - "version": "0.1.0", + "version": "0.1.1", "lockfileVersion": 1 } diff --git a/package.json b/package.json index 513a19e..3485718 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@litert/typeguard", - "version": "0.1.0", + "version": "0.1.1", "description": "A type checking code \"JIT\" library.", "main": "dist/index.js", "scripts": { diff --git a/sources/lang.javascript.ts b/sources/lang.javascript.ts index 0cb8a4c..5256be2 100644 --- a/sources/lang.javascript.ts +++ b/sources/lang.javascript.ts @@ -119,7 +119,7 @@ implements Language { case FILTER_ON.LENGTH: ret.push(`${v} !== null`); ret.push(`${v} !== undefined`); - ret.push(`typeof ${v} === "number"`); + ret.push(`typeof ${v}.length === "number"`); v = `${v}.length`; break; case FILTER_ON.ARRAY_LENGTH: