@hypernym/utils 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.
- package/README.md +1 -0
- package/dist/utils.d.ts +5 -4
- package/dist/utils.mjs +3 -2
- package/package.json +8 -7
package/README.md
CHANGED
package/dist/utils.d.ts
CHANGED
|
@@ -12,10 +12,6 @@ type BuiltIn = Primitive | Date | RegExp;
|
|
|
12
12
|
* Checks if the code is running in the browser.
|
|
13
13
|
*/
|
|
14
14
|
declare const isClient: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* An empty arrow function that performs no operation.
|
|
17
|
-
*/
|
|
18
|
-
declare const noop: () => void;
|
|
19
15
|
/**
|
|
20
16
|
* Returns a boolean if the given value is a `null`.
|
|
21
17
|
*/
|
|
@@ -175,4 +171,9 @@ type RequiredObjectDeep<T extends object, Options extends OptionsDeep = {
|
|
|
175
171
|
[K in keyof T]-?: RequiredDeep<T[K], Options>;
|
|
176
172
|
};
|
|
177
173
|
|
|
174
|
+
/**
|
|
175
|
+
* An empty arrow function that performs no operation.
|
|
176
|
+
*/
|
|
177
|
+
declare const noop: () => void;
|
|
178
|
+
|
|
178
179
|
export { BuiltIn, IsAny, IsNever, IsNull, PartialDeep, Primitive, RequiredDeep, isArray, isArrayEmpty, isBigint, isBoolean, isClient, isDate, isElement, isError, isFunction, isHtmlCollection, isHtmlCollectionEmpty, isInfinity, isMap, isNaNValue, isNodeList, isNodeListEmpty, isNull, isNumber, isObject, isObjectEmpty, isPrimitive, isRegExp, isSet, isString, isStringEmpty, isSymbol, isURL, isUndefined, noop };
|
package/dist/utils.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
const getType = (v) => Object.prototype.toString.call(v).slice(8, -1);
|
|
2
|
-
const isClient = typeof window !== "undefined";
|
|
3
1
|
const noop = () => {
|
|
4
2
|
};
|
|
3
|
+
|
|
4
|
+
const getType = (v) => Object.prototype.toString.call(v).slice(8, -1);
|
|
5
|
+
const isClient = typeof window !== "undefined";
|
|
5
6
|
const isNull = (v) => v === null;
|
|
6
7
|
const isUndefined = (v) => typeof v === "undefined";
|
|
7
8
|
const isString = (v) => typeof v === "string";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hypernym/utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"author": "Hypernym Studio",
|
|
5
5
|
"description": "A collection of reusable utilities.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"dev": "vite playgrounds/client",
|
|
32
32
|
"dev:node": "vite-node -w playgrounds/node/main.ts",
|
|
33
33
|
"build": "rollup -c",
|
|
34
|
+
"test:types": "vitest typecheck",
|
|
34
35
|
"prepublishOnly": "npm run build",
|
|
35
36
|
"format": "prettier --write .",
|
|
36
37
|
"lint": "eslint .",
|
|
@@ -38,18 +39,18 @@
|
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"@types/node": "^20.2.5",
|
|
41
|
-
"@typescript-eslint/eslint-plugin": "^5.59.
|
|
42
|
-
"@typescript-eslint/parser": "^5.59.
|
|
43
|
-
"eslint": "^8.
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^5.59.9",
|
|
43
|
+
"@typescript-eslint/parser": "^5.59.9",
|
|
44
|
+
"eslint": "^8.42.0",
|
|
44
45
|
"eslint-config-prettier": "^8.8.0",
|
|
45
|
-
"expect-type": "^0.16.0",
|
|
46
46
|
"prettier": "^2.8.8",
|
|
47
|
-
"rollup": "^3.
|
|
47
|
+
"rollup": "^3.24.0",
|
|
48
48
|
"rollup-plugin-dts": "^5.3.0",
|
|
49
49
|
"rollup-plugin-esbuild": "^5.0.0",
|
|
50
50
|
"typescript": "^5.0.4",
|
|
51
51
|
"vite": "^4.3.9",
|
|
52
|
-
"vite-node": "^0.
|
|
52
|
+
"vite-node": "^0.32.0",
|
|
53
|
+
"vitest": "^0.32.0"
|
|
53
54
|
},
|
|
54
55
|
"publishConfig": {
|
|
55
56
|
"access": "public"
|