-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
284 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,67 @@ | ||
|
||
# cookie-es | ||
|
||
[![bundle size](https://flat.badgen.net/bundlephobia/minzip/cookie-es)](https://bundlephobia.com/package/cookie-es) | ||
<!-- automd:badges bundlejs --> | ||
|
||
[![npm version](https://img.shields.io/npm/v/cookie-es)](https://npmjs.com/package/cookie-es) | ||
[![npm downloads](https://img.shields.io/npm/dm/cookie-es)](https://npmjs.com/package/cookie-es) | ||
[![bundle size](https://img.shields.io/bundlejs/size/cookie-es)](https://bundlejs.com/?q=cookie-es) | ||
|
||
<!-- /automd --> | ||
|
||
ESM build of [cookie](https://www.npmjs.com/package/cookie) with bundled types. | ||
|
||
## Usage | ||
|
||
Install: | ||
|
||
<!-- automd:pm-install --> | ||
|
||
```sh | ||
# ✨ Auto-detect | ||
npx nypm install cookie-es | ||
|
||
# npm | ||
npm i cookie-es | ||
npm install cookie-es | ||
|
||
# yarn | ||
yarn add cookie-es | ||
|
||
# pnpm | ||
pnpm install cookie-es | ||
|
||
# bun | ||
bun install cookie-es | ||
``` | ||
|
||
<!-- /automd--> | ||
|
||
Import: | ||
|
||
|
||
<!-- automd:jsimport cdn cjs src=./src/index.ts --> | ||
|
||
**ESM** (Node.js, Bun) | ||
|
||
```js | ||
// ESM | ||
import { parse, serialize } from 'cookie-es' | ||
import { parse, serialize } from "cookie-es"; | ||
``` | ||
|
||
**CommonJS** (Legacy Node.js) | ||
|
||
// CommonJS | ||
const { parse, serialize } = require('cookie-es') | ||
```js | ||
const { parse, serialize } = require("cookie-es"); | ||
``` | ||
|
||
**CDN** (Deno, Bun and Browsers) | ||
|
||
```js | ||
import { parse, serialize } from "https://esm.sh/cookie-es"; | ||
``` | ||
|
||
<!-- /automd --> | ||
|
||
|
||
## License | ||
|
||
[MIT](./LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.