Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tiny-image
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
劳工
tiny-image
Commits
ce34c51e
Commit
ce34c51e
authored
Apr 26, 2021
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
083b8b1d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
index.js
dist/index.js
+1
-1
index.js.map
dist/index.js.map
+1
-1
package.json
package.json
+1
-1
index.ts
src/index.ts
+1
-1
No files found.
dist/index.js
View file @
ce34c51e
...
@@ -8,7 +8,7 @@ const FormData = require('form-data');
...
@@ -8,7 +8,7 @@ const FormData = require('form-data');
const
fs
=
require
(
'fs-extra'
);
const
fs
=
require
(
'fs-extra'
);
const
isPng
=
require
(
"is-png"
);
const
isPng
=
require
(
"is-png"
);
const
isJpg
=
require
(
"is-jpg"
);
const
isJpg
=
require
(
"is-jpg"
);
const
tinifyUrl
=
'http://tinify.duiba.com.cn/tinify'
;
const
tinifyUrl
=
'http
s
://tinify.duiba.com.cn/tinify'
;
/**
/**
* 压缩图片
* 压缩图片
* @param {Buffer|string} bufferOrFile
* @param {Buffer|string} bufferOrFile
...
...
dist/index.js.map
View file @
ce34c51e
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACtC,MAAM,EAAE,GAAG,OAAO,CAAC,UAA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S,CAAC,CAAC;yBACnB;6BAAM;4BACN,IAAI,GAAG,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC;4BAC/B,IAAI,IAAI,CAAC;4BACT,IAAI;gCACH,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;6BACvB;4BAAC,OAAO,CAAC,EAAE;gCACX,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;6BACf;4BACD,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;yBACjB;oBACF,CAAC,CAAC,CAAC;oBACH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;wBACpB,MAAM,CAAC,OAAO,CAAC,CAAA;oBAChB,CAAC,CAAC,CAAC;iBACH;YACF,CAAC,CAAC,CAAC;SACH;aAAM;YACN,MAAM,CAAC,cAAc,CAAC,CAAA;SACtB;IACF,CAAC,CAAC,CAAA;AACH,CAAC;AA9CD,4BA8CC"}
\ No newline at end of file
\ No newline at end of file
package.json
View file @
ce34c51e
{
{
"name"
:
"tiny-image"
,
"name"
:
"tiny-image"
,
"version"
:
"1.0.
6
"
,
"version"
:
"1.0.
7
"
,
"main"
:
"dist/index.js"
,
"main"
:
"dist/index.js"
,
"types"
:
"dist/index.d.ts"
,
"types"
:
"dist/index.d.ts"
,
"license"
:
"
MIT
"
,
"license"
:
"
MIT
"
,
...
...
src/index.ts
View file @
ce34c51e
...
@@ -7,7 +7,7 @@ const fs = require('fs-extra');
...
@@ -7,7 +7,7 @@ const fs = require('fs-extra');
const
isPng
=
require
(
"is-png"
);
const
isPng
=
require
(
"is-png"
);
const
isJpg
=
require
(
"is-jpg"
);
const
isJpg
=
require
(
"is-jpg"
);
const
tinifyUrl
=
'http://tinify.duiba.com.cn/tinify'
;
const
tinifyUrl
=
'http
s
://tinify.duiba.com.cn/tinify'
;
/**
/**
* 压缩图片
* 压缩图片
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment