update types
This commit is contained in:
parent
397888b4a8
commit
2f0847eddf
2
.gitignore
vendored
2
.gitignore
vendored
@ -133,4 +133,4 @@ dist
|
||||
TODO.md
|
||||
|
||||
# Built libraries
|
||||
/lib
|
||||
/lib
|
||||
|
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 Eric Woodward [https://www.itsericwoodward.com]
|
||||
Copyright (c) 2024 Eric Woodward [https://www.itsericwoodward.com]
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
21
README.md
21
README.md
@ -0,0 +1,21 @@
|
||||
# ItsEricWoodward's Utils
|
||||
|
||||
A small collection of common libraries and functions I like to use in my Node applications.
|
||||
|
||||
I figure that publishing them in a [public repo](https://git.itsericwoodward.com/eric/utils) on [my gitea instance](https://git.itsericwoodward.com/eric/) will make them easier to use.
|
||||
|
||||
The functions exported by this library are:
|
||||
|
||||
- **convertCamelToUpperSnakeCase**(`str``: _string_)
|
||||
- Converts textLikeThis (or TextLikeThis) to TEXT_LIKE_THIS.
|
||||
- _Returns_: Converted version of `str`
|
||||
- **getDirname**()
|
||||
- Reads and returns variables `__dirname` and `__filename`, as with CJS Node.
|
||||
- _Returns_: { `__dirname`: _string_, `__filename`: string }
|
||||
- **getTime**()
|
||||
- _Returns_: the current time in a standardized format.
|
||||
- **log**(`...msg`: _unknown[]_)
|
||||
- Prints the contents of `msg` to the console with my preferred formatting.
|
||||
- **readJsonIfExists**(`filePath`: _string | URL_)
|
||||
- Reads the contents of the JSON or JSON5 file at indicated `filePath`.
|
||||
- _Returns_: the `JSON.parse`d contents of the file.
|
@ -1,9 +1,10 @@
|
||||
{
|
||||
"name": "@itsericwoodward/utils",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"version": "0.1.1",
|
||||
"description": "A small collection of common libraries and functions the author likes to use in his Node applications.",
|
||||
"main": "./lib/cjs/index.js",
|
||||
"module": "./lib/esm/index.js",
|
||||
"types": "./lib/esm/index.d.ts",
|
||||
"files": [
|
||||
"lib/"
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user