feat(module): Improve module exports and compatibility

- Add explicit ES Module and CommonJS exports in index.js
- Update package.json to support both import and require
- Ensure consistent function exports across module systems
This commit is contained in:
2025-02-21 10:50:04 +08:00
parent 8e018f34be
commit 22d3931665
2 changed files with 43 additions and 2 deletions

View File

@@ -4,6 +4,12 @@
"description": "A utility library that provides commonly used functions to simplify everyday development tasks. Whether it's string manipulation, array operations, or other frequent functionalities, `ddmt-tool` helps you work more efficiently.",
"main": "index.js",
"type": "module",
"exports": {
".": {
"import": "./index.js",
"require": "./index.js"
}
},
"types": "types/index.d.ts",
"scripts": {
"dev": "node index.js"