@stryke/types 0.2.1 → 0.3.1

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.
@@ -9,14 +9,14 @@ const parseTypeDefinition = e => {
9
9
  if ((0, _typeChecks.isString)(e)) {
10
10
  if (e.includes(":")) {
11
11
  const i = e.split(":");
12
- if (i.length > 2 && i[0]) return {
12
+ if (i.length > 1 && i[0]) return {
13
13
  file: i[0],
14
14
  name: i[1]
15
15
  };
16
16
  }
17
17
  if (e.includes("#")) {
18
18
  const i = e.split("#");
19
- if (i.length > 2 && i[0]) return {
19
+ if (i.length > 1 && i[0]) return {
20
20
  file: i[0],
21
21
  name: i[1]
22
22
  };
@@ -25,7 +25,7 @@ const parseTypeDefinition = e => {
25
25
  file: e
26
26
  };
27
27
  }
28
- if (e) return {
28
+ if ((0, _typeChecks.isObject)(e)) return {
29
29
  file: e.file,
30
30
  name: e.name
31
31
  };
@@ -1 +1 @@
1
- import{isString as n}from"../type-checks";export const parseTypeDefinition=e=>{if(n(e)){if(e.includes(":")){const i=e.split(":");if(i.length>2&&i[0])return{file:i[0],name:i[1]}}if(e.includes("#")){const i=e.split("#");if(i.length>2&&i[0])return{file:i[0],name:i[1]}}return{file:e}}if(e)return{file:e.file,name:e.name}};
1
+ import{isObject as n,isString as t}from"../type-checks";export const parseTypeDefinition=e=>{if(t(e)){if(e.includes(":")){const i=e.split(":");if(i.length>1&&i[0])return{file:i[0],name:i[1]}}if(e.includes("#")){const i=e.split("#");if(i.length>1&&i[0])return{file:i[0],name:i[1]}}return{file:e}}if(n(e))return{file:e.file,name:e.name}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/types",
3
- "version": "0.2.1",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "description": "A package containing many base TypeScript type definitions that are shared across many projects.",
6
6
  "repository": {