@nyaomaru/divider 1.8.8 → 1.8.9

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/dist/index.cjs CHANGED
@@ -43,8 +43,11 @@ function isString(arg) {
43
43
  function isNumber(arg) {
44
44
  return typeof arg === "number";
45
45
  }
46
+ function isObject(arg) {
47
+ return typeof arg === "object" && arg !== null;
48
+ }
46
49
  function isOptions(value) {
47
- if (typeof value !== "object" || value === null) return false;
50
+ if (!isObject(value)) return false;
48
51
  const options = value;
49
52
  return dividerOptionKeys.some((key) => Object.hasOwn(options, key));
50
53
  }
package/dist/index.js CHANGED
@@ -13,8 +13,11 @@ function isString(arg) {
13
13
  function isNumber(arg) {
14
14
  return typeof arg === "number";
15
15
  }
16
+ function isObject(arg) {
17
+ return typeof arg === "object" && arg !== null;
18
+ }
16
19
  function isOptions(value) {
17
- if (typeof value !== "object" || value === null) return false;
20
+ if (!isObject(value)) return false;
18
21
  const options = value;
19
22
  return dividerOptionKeys.some((key) => Object.hasOwn(options, key));
20
23
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nyaomaru/divider",
3
3
  "type": "module",
4
- "version": "1.8.8",
4
+ "version": "1.8.9",
5
5
  "description": "To divide string or string[] with a given separator",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",