is-kit 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # is-kit
2
2
 
3
3
  <p align="center">
4
- <img src="https://raw.githubusercontent.com/nyaomaru/is-kit/main/docs/public/iskit-logo_700_500.png" width="700px" align="center" alt="is-kit logo" />
4
+ <img src="https://raw.githubusercontent.com/nyaomaru/is-kit/main/docs/public/iskit_image.png" width="600px" align="center" alt="is-kit logo" />
5
5
  </p>
6
6
 
7
7
  <p align="center">
package/dist/index.js CHANGED
@@ -275,8 +275,8 @@ function struct(schema, options) {
275
275
  if (!isPlainObject(input)) return false;
276
276
  const obj = input;
277
277
  for (const key of Object.keys(schema)) {
278
- const guard = schema[key];
279
278
  if (!(key in obj)) return false;
279
+ const guard = schema[key];
280
280
  if (!guard(obj[key])) return false;
281
281
  }
282
282
  if (options?.exact) {
package/dist/index.mjs CHANGED
@@ -200,8 +200,8 @@ function struct(schema, options) {
200
200
  if (!isPlainObject(input)) return false;
201
201
  const obj = input;
202
202
  for (const key of Object.keys(schema)) {
203
- const guard = schema[key];
204
203
  if (!(key in obj)) return false;
204
+ const guard = schema[key];
205
205
  if (!guard(obj[key])) return false;
206
206
  }
207
207
  if (options?.exact) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "is-kit",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Make 'isXXX' easier. Let's make your code type safe and more readable!",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",