https://github.com/yano3nora/ts-utils
TypeScript Utilities as a npm dual package by Deno.
https://github.com/yano3nora/ts-utils
deno npm typescript
Last synced: about 1 year ago
JSON representation
TypeScript Utilities as a npm dual package by Deno.
- Host: GitHub
- URL: https://github.com/yano3nora/ts-utils
- Owner: yano3nora
- License: mit
- Created: 2023-05-10T07:21:55.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-06T03:33:27.000Z (over 1 year ago)
- Last Synced: 2025-03-26T02:34:12.272Z (over 1 year ago)
- Topics: deno, npm, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@yano3nora/ts-utils
- Size: 119 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Usage
> [API References - deno.land/x](https://deno.land/x/yano3nora_tsutils)
```sh
$ npm i @yano3nora/ts-utils
```
```ts
import { objectByKeys } from '@yano3nora/ts-utils'
objectByKeys([1, 2, 3], (key) => Number(key) * 10)
// => { '1': 10, '2': 20, '3': 30 }
```
# Development
```sh
$ code libs/new-function.ts # add function
$ code libs/new-function.test.ts # add test
$ code main.ts # add export
$ deno task dev
```
## build & test
```sh
# build
$ deno task build
# link on local
$ deno task link
$ cd ../another-project
$ npm link package-name
```
# Publish
```sh
$ git add .
$ git commit -m 'update'
$ export NPM_VERSION_SUB_COMMAND=minor # major | minor | patch
$ export ONE_TIME_PASSWORD=xxxxxx
# dry run
$ deno task publish:dry ${NPM_VERSION_SUB_COMMAND} ${ONE_TIME_PASSWORD}
# run
$ deno task publish:run ${NPM_VERSION_SUB_COMMAND} ${ONE_TIME_PASSWORD}
$ git push --tags && git push
```