Repository: unjs/unkit
Branch: main
Commit: c3bff5de46cc
Files: 20
Total size: 9.0 KB
Directory structure:
gitextract__yzsjdcw/
├── .editorconfig
├── .eslintignore
├── .eslintrc
├── .github/
│ └── workflows/
│ └── ci.yml
├── .gitignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── package.json
├── renovate.json
├── src/
│ ├── env.ts
│ ├── esm.ts
│ ├── fetch.ts
│ ├── http.ts
│ ├── index.ts
│ ├── object.ts
│ ├── promise.ts
│ ├── string.ts
│ └── url.ts
└── tsconfig.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
root = true
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
[*.js]
indent_style = space
indent_size = 2
[{package.json,*.yml,*.cjson}]
indent_style = space
indent_size = 2
================================================
FILE: .eslintignore
================================================
dist
================================================
FILE: .eslintrc
================================================
{
"extends": [
"@nuxtjs/eslint-config-typescript"
]
}
================================================
FILE: .github/workflows/ci.yml
================================================
name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14'
cache: yarn
- run: yarn install
- run: yarn lint
================================================
FILE: .gitignore
================================================
.vscode
node_modules
*.log
.DS_Store
coverage
dist
types
.conf*
================================================
FILE: CHANGELOG.md
================================================
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [0.1.0](https://github.com/unjs/unkit/compare/v0.0.2...v0.1.0) (2021-08-26)
### ⚠ BREAKING CHANGES
* update ohmyfetch to 0.3.x
### Features
* update ohmyfetch to 0.3.x ([96d3193](https://github.com/unjs/unkit/commit/96d319385dacdef5cea8f2fc01c02a5dcfe28102))
### [0.0.2](https://github.com/unjs/unkit/compare/v0.0.1...v0.0.2) (2021-08-25)
### 0.0.1 (2021-08-25)
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2022 UnJS
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# unkit
> UnJS standard library
This package aggregates a collection of useful packages from [unjs](https://github.com/unjs) for ease of use.
## 💿 Install
Install using npm or yarn:
```bash
npm i unkit
# or
yarn add unkit
```
Import a subpath:
```js
// ESM / Typescript
import { pascalCase } from 'unkit/string'
// CommonJS
const { pascalCase } = require('unkit/string')
```
**💡 Note:** Please **always** explicitly install `unkit` dependency even if it is already installed by another package in `node_modules`.
Check [⬆️ Upgrading Guide](#%EF%B8%8F-upgrading) for upgrading versions.
## 📙 Libraries
Libraries are exposed via semantic subpaths. Refer to each package documentation for available utilities.
Subpath | Packages
--------|-------------
[`unkit/env`](#env) | [unjs/std-env](https://github.com/unjs/std-env)
[`unkit/esm`](#esm) | [unjs/mlly](https://github.com/unjs/mlly)
[`unkit/fetch`](#fetch) | [unjs/ohmyfetch](https://github.com/unjs/ohmyfetch)
[`unkit/http`](#http) | [unjs/h3](https://github.com/unjs/h3), [unjs/is-https](https://github.com/unjs/is-https)
[`unkit/object`](#object) | [unjs/defu](https://github.com/unjs/defu), [unjs/destr](https://github.com/unjs/destr)
[`unkit/promise`](#promise) | [unjs/items-promise](https://github.com/unjs/items-promise)
[`unkit/string`](#string) | [unjs/scule](https://github.com/unjs/scule)
[`unkit/url`](#url) | [unjs/ufo](https://github.com/unjs/ufo)
### `/env`
> Useful environment information of running code.
👉 See [unjs/std-env](https://github.com/unjs/std-env) for more information.
```js
// ESM / Typescript
import { production, dev } from 'unkit/env'
// CommonJS
const { production, dev } = require('unkit/env')
```
### `/esm`
> Missing ECMaScript module utils for Node.js
👉 See [unjs/mlly](https://github.com/unjs/mlly) for more information.
```js
// ESM / Typescript
import { createCommonJS, resolve } from 'unkit/esm'
```
### `/fetch`
> A better fetch API. Works on node, browser, and workers
👉 See [unjs/ohmyfetch](https://github.com/unjs/ohmyfetch) for more information.
```js
// ESM / Typescript
import { $fetch } from 'unkit/fetch'
// CommonJS
const { $fetch } = require('unkit/fetch')
```
### `/http`
> Helpers for creating HTTP servers
👉 See [unjs/h3](https://github.com/unjs/h3) and [unjs/is-https](https://github.com/unjs/is-https) for more information.
```js
// ESM / Typescript
import { useBody, isHTTPS } from 'unkit/http'
// CommonJS
const { useBody, isHTTPS } = require('unkit/http')
```
### `/object`
> Utilities for working with objects and serialization
👉 See [unjs/defu](https://github.com/unjs/defu) and [unjs/destr](https://github.com/unjs/destr) for more information.
```js
// ESM / Typescript
import { defaults, parseJSON } from 'unkit/object'
// CommonJS
const { defaults, parseJSON } = require('unkit/object')
```
### `/promise`
> Promise utils
👉 See [unjs/items-promise](https://github.com/unjs/items-promise) for more information.
```js
// ESM / Typescript
import { serial, parallel } from 'unkit/promise'
// CommonJS
const { serial, parallel } = require('unkit/promise')
```
### `/string`
> String manipulation utils
👉 See [unjs/scule](https://github.com/unjs/scule) for more information.
```js
// ESM / Typescript
import { snakeCase, upperFirst } from 'unkit/string'
// CommonJS
const { snakeCase, upperFirst } = require('unkit/string')
```
### `/url`
> Utilities to work with URLs
👉 See [unjs/ufo](https://github.com/unjs/ufo) for more information.
```js
// ESM / Typescript
import { joinURL, withQuery } from 'unkit/url'
// CommonJS
const { joinURL, withQuery } = require('unkit/url')
```
## ⬆️ Upgrading
Unkit uses npm dependencies with [caret range](https://nodesource.com/blog/semver-tilde-and-caret#caretflexibleminorandpatch),
this means when you freshly install `unkit`, the latest features and fixes of sub-dependencies are installed. For upgrading we have two choices:
- Use `npm up unkit` or `yarn upgrade unkit`: This will update the lock-file with minimal risk to the latest versions.
- Remove `package-lock.json` or `yarn.lock` and reinstall dependencies with `npm i` or `yarn` this will update all nested dependencies to the latest.
## License
[MIT](./LICENSE)
================================================
FILE: package.json
================================================
{
"name": "unkit",
"version": "0.1.0",
"description": "UnJS standard library",
"repository": "unjs/unkit",
"license": "MIT",
"sideEffects": false,
"type": "module",
"exports": {
"./env": {
"import": "./dist/env.mjs",
"require": "./dist/env.cjs",
"types": "./dist/env.d.ts"
},
"./esm": {
"import": "./dist/esm.mjs",
"require": "./dist/esm.cjs",
"types": "./dist/esm.d.ts"
},
"./fetch": {
"import": "./dist/fetch.mjs",
"require": "./dist/fetch.cjs",
"types": "./dist/fetch.d.ts"
},
"./http": {
"import": "./dist/http.mjs",
"require": "./dist/http.cjs",
"types": "./dist/http.d.ts"
},
"./object": {
"import": "./dist/object.mjs",
"require": "./dist/object.cjs",
"types": "./dist/object.d.ts"
},
"./promise": {
"import": "./dist/promise.mjs",
"require": "./dist/promise.cjs",
"types": "./dist/promise.d.ts"
},
"./string": {
"import": "./dist/string.mjs",
"require": "./dist/string.cjs",
"types": "./dist/string.d.ts"
},
"./url": {
"import": "./dist/url.mjs",
"require": "./dist/url.cjs",
"types": "./dist/url.d.ts"
}
},
"files": [
"dist"
],
"scripts": {
"build": "unbuild",
"lint": "eslint --ext .ts .",
"prepublishOnly": "yarn build",
"release": "yarn test && standard-version && git push --follow-tags && npm publish",
"test": "yarn lint "
},
"dependencies": {
"defu": "^6.1.4",
"destr": "^1.2.2",
"h3": "^0.8.6",
"is-https": "^4.0.0",
"items-promise": "^1.0.0",
"mlly": "^0.5.17",
"ohmyfetch": "^0.4.21",
"requrl": "^3.0.2",
"scule": "^0.3.2",
"std-env": "^3.8.0",
"ufo": "^0.8.6"
},
"devDependencies": {
"@nuxtjs/eslint-config-typescript": "latest",
"eslint": "latest",
"standard-version": "latest",
"typescript": "latest",
"unbuild": "^1.2.1"
}
}
================================================
FILE: renovate.json
================================================
{
"extends": [
"github>unjs/renovate-config"
]
}
================================================
FILE: src/env.ts
================================================
export * from 'std-env'
================================================
FILE: src/esm.ts
================================================
export * from 'mlly'
================================================
FILE: src/fetch.ts
================================================
export * from 'ohmyfetch'
================================================
FILE: src/http.ts
================================================
export * from 'h3'
export { default as isHTTPS } from 'is-https'
================================================
FILE: src/index.ts
================================================
export default { error: 'please use subpath imports from unkit. See https://github.com/unjs/unkit' }
================================================
FILE: src/object.ts
================================================
export {
default as defu,
default as defaults
} from 'defu'
export {
default as destr,
default as parseJSON
} from 'destr'
================================================
FILE: src/promise.ts
================================================
// @ts-ignore TODO: Add types
export * from 'items-promise'
================================================
FILE: src/string.ts
================================================
export * from 'scule'
================================================
FILE: src/url.ts
================================================
export * from 'ufo'
================================================
FILE: tsconfig.json
================================================
{
"compilerOptions": {
"target": "ES6",
"module": "ESNext",
"moduleResolution": "Node",
"esModuleInterop": true,
"outDir": "dist",
"strict": true,
"declaration": true,
}
}
gitextract__yzsjdcw/ ├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .github/ │ └── workflows/ │ └── ci.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── package.json ├── renovate.json ├── src/ │ ├── env.ts │ ├── esm.ts │ ├── fetch.ts │ ├── http.ts │ ├── index.ts │ ├── object.ts │ ├── promise.ts │ ├── string.ts │ └── url.ts └── tsconfig.json
Condensed preview — 20 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (11K chars).
[
{
"path": ".editorconfig",
"chars": 224,
"preview": "root = true\n\n[*]\nend_of_line = lf\ninsert_final_newline = true\ntrim_trailing_whitespace = true\ncharset = utf-8\n\n[*.js]\nin"
},
{
"path": ".eslintignore",
"chars": 5,
"preview": "dist\n"
},
{
"path": ".eslintrc",
"chars": 62,
"preview": "{\n \"extends\": [\n \"@nuxtjs/eslint-config-typescript\"\n ]\n}\n"
},
{
"path": ".github/workflows/ci.yml",
"chars": 329,
"preview": "\nname: ci\n\non:\n push:\n branches:\n - main\n pull_request:\n branches:\n - main\n\njobs:\n ci:\n runs-on: u"
},
{
"path": ".gitignore",
"chars": 64,
"preview": ".vscode\nnode_modules\n*.log\n.DS_Store\ncoverage\ndist\ntypes\n.conf*\n"
},
{
"path": "CHANGELOG.md",
"chars": 561,
"preview": "# Changelog\n\nAll notable changes to this project will be documented in this file. See [standard-version](https://github."
},
{
"path": "LICENSE",
"chars": 1061,
"preview": "MIT License\n\nCopyright (c) 2022 UnJS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof th"
},
{
"path": "README.md",
"chars": 4247,
"preview": "# unkit\n\n> UnJS standard library\n\nThis package aggregates a collection of useful packages from [unjs](https://github.com"
},
{
"path": "package.json",
"chars": 1978,
"preview": "{\n \"name\": \"unkit\",\n \"version\": \"0.1.0\",\n \"description\": \"UnJS standard library\",\n \"repository\": \"unjs/unkit\",\n \"li"
},
{
"path": "renovate.json",
"chars": 57,
"preview": "{\n \"extends\": [\n \"github>unjs/renovate-config\"\n ]\n}\n"
},
{
"path": "src/env.ts",
"chars": 24,
"preview": "export * from 'std-env'\n"
},
{
"path": "src/esm.ts",
"chars": 21,
"preview": "export * from 'mlly'\n"
},
{
"path": "src/fetch.ts",
"chars": 26,
"preview": "export * from 'ohmyfetch'\n"
},
{
"path": "src/http.ts",
"chars": 65,
"preview": "export * from 'h3'\nexport { default as isHTTPS } from 'is-https'\n"
},
{
"path": "src/index.ts",
"chars": 101,
"preview": "export default { error: 'please use subpath imports from unkit. See https://github.com/unjs/unkit' }\n"
},
{
"path": "src/object.ts",
"chars": 131,
"preview": "export {\n default as defu,\n default as defaults\n} from 'defu'\nexport {\n default as destr,\n default as parseJSON\n} fr"
},
{
"path": "src/promise.ts",
"chars": 60,
"preview": "// @ts-ignore TODO: Add types\nexport * from 'items-promise'\n"
},
{
"path": "src/string.ts",
"chars": 22,
"preview": "export * from 'scule'\n"
},
{
"path": "src/url.ts",
"chars": 20,
"preview": "export * from 'ufo'\n"
},
{
"path": "tsconfig.json",
"chars": 204,
"preview": "{\n \"compilerOptions\": {\n \"target\": \"ES6\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"Node\",\n \"esModuleInter"
}
]
About this extraction
This page contains the full source code of the unjs/unkit GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 20 files (9.0 KB), approximately 3.1k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.