File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11 <p float =" left " >
22<a href =" https://www.npmjs.com/package/url-minify " ><img src =" https://badgen.net/npm/v/url-minify " alt =" NPM version " /></a >
3- <a href =" https://www.npmjs.com/package/url-minify " ><img src =" https://github.com/rubiin/tweeny-weeny/workflows/CI/badge.svg " alt =" CI " /></a >
4- <a href =" https://www.npmjs.com/package/url-minify " ><img src =" https://img.shields.io/npm/dm/url-minify " alt =" Downloads " /></a >
3+ <a href =" https://www.npmjs.com/package/url-minify " ><img src =" https://github.com/rubiin/tweeny-weeny/workflows/CI/badge.svg " alt =" CI " /></a >
4+ <a href =" https://www.npmjs.com/package/url-minify " ><img src =" https://img.shields.io/npm/dm/url-minify " alt =" Downloads " /></a >
55</p >
66
77# Minify Url
@@ -33,6 +33,20 @@ import minify from 'url-minify';
3333})();
3434```
3535
36+
37+
38+ ``` js
39+ const minify = require (' url-minify' ).default ;
40+
41+ ~ (async function () {
42+ console .log (
43+ await minify (' https://rubiin.vercel.app' , { provider: ' isgd' }),
44+ );
45+
46+ // ==> {longUrl: 'https://rubiin.vercel.app',shortUrl: 'https://is.gd/PTkruq'}
47+ })();
48+ ```
49+
3650## API
3751
3852### minify(link,options)
Original file line number Diff line number Diff line change 1616 "sideEffects" : false ,
1717 "exports" : {
1818 "." : {
19- "types " : " ./dist/index.d.ts " ,
20- "import " : " ./dist/index.js "
19+ "import " : " ./dist/index.js " ,
20+ "require " : " ./dist/index.cjs "
2121 }
2222 },
2323 "main" : " ./dist/index.js" ,
4444 "typecheck" : " tsc --noEmit"
4545 },
4646 "devDependencies" : {
47- "@antfu/eslint-config" : " ^0.26 .1" ,
48- "@antfu/ni" : " ^0.17.2 " ,
49- "@types/node" : " ^18.7 .13" ,
47+ "@antfu/eslint-config" : " ^0.33 .1" ,
48+ "@antfu/ni" : " ^0.18.8 " ,
49+ "@types/node" : " ^18.11 .13" ,
5050 "bumpp" : " ^8.2.1" ,
51- "clean-publish" : " ^4.0.1 " ,
52- "eslint" : " ^8.22 .0" ,
51+ "clean-publish" : " ^4.0.2 " ,
52+ "eslint" : " ^8.29 .0" ,
5353 "esno" : " ^0.16.3" ,
5454 "rimraf" : " ^3.0.2" ,
55- "tsup" : " ^6.2.3 " ,
56- "typescript" : " ^4.8.2 " ,
57- "unbuild" : " ^0.8.9 " ,
58- "vite" : " ^3 .0.9 " ,
59- "vitest" : " ^0.22.1 "
55+ "tsup" : " ^6.5.0 " ,
56+ "typescript" : " ^4.9.4 " ,
57+ "unbuild" : " ^1.0.2 " ,
58+ "vite" : " ^4 .0.0 " ,
59+ "vitest" : " ^0.25.7 "
6060 },
6161 "dependencies" : {
62- "axios" : " ^0.27.2 "
62+ "axios" : " ^1.2.1 "
6363 },
6464 "clean-publish" : {
6565 "cleanDocs" : true ,
You can’t perform that action at this time.
0 commit comments