amos-tool 1.4.12 → 1.4.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -339,6 +339,8 @@ const result2 = browserSupport(paramsList, limit);
339
339
 
340
340
  getParameter(url, name):
341
341
  `get target url Parameter by name, and return value or '' `
342
+ extractParam(url, name): `解析指定 url 中的参数,返回指定 name 的参数`
343
+ extractParams(url): `解析指定 url 中的参数,参数对象,如果 url 为undefined,则默认采用 window.location.href`
342
344
 
343
345
  `LocationSearch` LocationParam.LocationSearch
344
346
  `other search tool`
package/docs/Logger.html CHANGED
@@ -27,7 +27,7 @@
27
27
 
28
28
  <nav >
29
29
 
30
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Logger.html">Logger</a><ul class='methods'><li data-type='method'><a href="Logger.html#pkgInfo">pkgInfo</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#_boost">_boost</a></li><li><a href="global.html#_defaultBrowsers">_defaultBrowsers</a></li><li><a href="global.html#_muiltBrowsers">_muiltBrowsers</a></li><li><a href="global.html#_utils">_utils</a></li><li><a href="global.html#advancePolicy">advancePolicy</a></li><li><a href="global.html#amosCookie">amosCookie</a></li><li><a href="global.html#array2tree">array2tree</a></li><li><a href="global.html#arrayFilter">arrayFilter</a></li><li><a href="global.html#beautifyRoutes">beautifyRoutes</a></li><li><a href="global.html#browserSupport">browserSupport</a></li><li><a href="global.html#bt4ToHex">bt4ToHex</a></li><li><a href="global.html#byteToString">byteToString</a></li><li><a href="global.html#calcBrowserVersion">calcBrowserVersion</a></li><li><a href="global.html#checkFlash">checkFlash</a></li><li><a href="global.html#clone">clone</a></li><li><a href="global.html#colorKeyWordsHexStr">colorKeyWordsHexStr</a></li><li><a href="global.html#completeUnit">completeUnit</a></li><li><a href="global.html#customEqual">customEqual</a></li><li><a href="global.html#debounce">debounce</a></li><li><a href="global.html#deepCopy">deepCopy</a></li><li><a href="global.html#deepEqual">deepEqual</a></li><li><a href="global.html#DesUtils">DesUtils</a></li><li><a href="global.html#divide">divide</a></li><li><a href="global.html#drawPolygon">drawPolygon</a></li><li><a href="global.html#enc">enc</a></li><li><a href="global.html#encodeLen">encodeLen</a></li><li><a href="global.html#encodeNumber">encodeNumber</a></li><li><a href="global.html#eq">eq</a></li><li><a href="global.html#fieldContentRegExp">fieldContentRegExp</a></li><li><a href="global.html#fileSizeToByte">fileSizeToByte</a></li><li><a href="global.html#fileterAllMatchedData">fileterAllMatchedData</a></li><li><a href="global.html#filterAllCheckedData">filterAllCheckedData</a></li><li><a href="global.html#filterChilds">filterChilds</a></li><li><a href="global.html#filterTreeLevel">filterTreeLevel</a></li><li><a href="global.html#genBitmapImage">genBitmapImage</a></li><li><a href="global.html#generateKeys">generateKeys</a></li><li><a href="global.html#getFileExtension">getFileExtension</a></li><li><a href="global.html#getKeyBytes">getKeyBytes</a></li><li><a href="global.html#getTreeFlatKeys">getTreeFlatKeys</a></li><li><a href="global.html#gradientColor">gradientColor</a></li><li><a href="global.html#has">has</a></li><li><a href="global.html#hasOwnProperty">hasOwnProperty</a></li><li><a href="global.html#hexToBt4">hexToBt4</a></li><li><a href="global.html#imageCompress">imageCompress</a></li><li><a href="global.html#isArray">isArray</a></li><li><a href="global.html#isBoolean">isBoolean</a></li><li><a href="global.html#isBuiltInObject">isBuiltInObject</a></li><li><a href="global.html#isDom">isDom</a></li><li><a href="global.html#isElement">isElement</a></li><li><a href="global.html#isEmpty">isEmpty</a></li><li><a href="global.html#isEmptyObject">isEmptyObject</a></li><li><a href="global.html#isFloat">isFloat</a></li><li><a href="global.html#isHexColor">isHexColor</a></li><li><a href="global.html#isImageSrc">isImageSrc</a></li><li><a href="global.html#isInputEqual">isInputEqual</a></li><li><a href="global.html#isJson">isJson</a></li><li><a href="global.html#isKeyColor">isKeyColor</a></li><li><a href="global.html#isKeyInObject">isKeyInObject</a></li><li><a href="global.html#isNil">isNil</a></li><li><a href="global.html#isNull">isNull</a></li><li><a href="global.html#isNumber">isNumber</a></li><li><a href="global.html#isObject">isObject</a></li><li><a href="global.html#isOnlyObject">isOnlyObject</a></li><li><a href="global.html#isOpacity">isOpacity</a></li><li><a href="global.html#isOwnKeyInObject">isOwnKeyInObject</a></li><li><a href="global.html#isRgbColor">isRgbColor</a></li><li><a href="global.html#isUndefined">isUndefined</a></li><li><a href="global.html#isUrl">isUrl</a></li><li><a href="global.html#isValidDate">isValidDate</a></li><li><a href="global.html#keyColorToHex">keyColorToHex</a></li><li><a href="global.html#Log">Log</a></li><li><a href="global.html#merge">merge</a></li><li><a href="global.html#mergeAll">mergeAll</a></li><li><a href="global.html#mod">mod</a></li><li><a href="global.html#multiply">multiply</a></li><li><a href="global.html#normalPolicy">normalPolicy</a></li><li><a href="global.html#null2default">null2default</a></li><li><a href="global.html#objRGB2str">objRGB2str</a></li><li><a href="global.html#parse">parse</a></li><li><a href="global.html#pathToTree">pathToTree</a></li><li><a href="global.html#plus">plus</a></li><li><a href="global.html#PNGlib">PNGlib</a></li><li><a href="global.html#Queue">Queue</a></li><li><a href="global.html#random">random</a></li><li><a href="global.html#randomInt">randomInt</a></li><li><a href="global.html#recursive">recursive</a></li><li><a href="global.html#recursiveGen">recursiveGen</a></li><li><a href="global.html#rgb2object">rgb2object</a></li><li><a href="global.html#saveAsImage">saveAsImage</a></li><li><a href="global.html#serialize">serialize</a></li><li><a href="global.html#shallowEqual">shallowEqual</a></li><li><a href="global.html#simpleEqual">simpleEqual</a></li><li><a href="global.html#simpleThrottle">simpleThrottle</a></li><li><a href="global.html#some">some</a></li><li><a href="global.html#stringIsJson">stringIsJson</a></li><li><a href="global.html#strToBt">strToBt</a></li><li><a href="global.html#subObjectEqual">subObjectEqual</a></li><li><a href="global.html#subtract">subtract</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toHexColor">toHexColor</a></li><li><a href="global.html#toRGBcolor">toRGBcolor</a></li><li><a href="global.html#toStringHexColor">toStringHexColor</a></li><li><a href="global.html#transformColor">transformColor</a></li><li><a href="global.html#useMd5Policy">useMd5Policy</a></li><li><a href="global.html#useMd5Policy2">useMd5Policy2</a></li><li><a href="global.html#utils">utils</a></li><li><a href="global.html#values">values</a></li></ul>
30
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Logger.html">Logger</a><ul class='methods'><li data-type='method'><a href="Logger.html#pkgInfo">pkgInfo</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#_boost">_boost</a></li><li><a href="global.html#_defaultBrowsers">_defaultBrowsers</a></li><li><a href="global.html#_muiltBrowsers">_muiltBrowsers</a></li><li><a href="global.html#_utils">_utils</a></li><li><a href="global.html#advancePolicy">advancePolicy</a></li><li><a href="global.html#alphaHexMap">alphaHexMap</a></li><li><a href="global.html#amosCookie">amosCookie</a></li><li><a href="global.html#array2tree">array2tree</a></li><li><a href="global.html#arrayFilter">arrayFilter</a></li><li><a href="global.html#beautifyRoutes">beautifyRoutes</a></li><li><a href="global.html#browserSupport">browserSupport</a></li><li><a href="global.html#bt4ToHex">bt4ToHex</a></li><li><a href="global.html#byteToString">byteToString</a></li><li><a href="global.html#calcBrowserVersion">calcBrowserVersion</a></li><li><a href="global.html#checkFlash">checkFlash</a></li><li><a href="global.html#clone">clone</a></li><li><a href="global.html#colorKeyWordsHexStr">colorKeyWordsHexStr</a></li><li><a href="global.html#completeUnit">completeUnit</a></li><li><a href="global.html#customEqual">customEqual</a></li><li><a href="global.html#debounce">debounce</a></li><li><a href="global.html#deepCopy">deepCopy</a></li><li><a href="global.html#deepEqual">deepEqual</a></li><li><a href="global.html#DesUtils">DesUtils</a></li><li><a href="global.html#divide">divide</a></li><li><a href="global.html#drawPolygon">drawPolygon</a></li><li><a href="global.html#enc">enc</a></li><li><a href="global.html#encodeLen">encodeLen</a></li><li><a href="global.html#encodeNumber">encodeNumber</a></li><li><a href="global.html#eq">eq</a></li><li><a href="global.html#fieldContentRegExp">fieldContentRegExp</a></li><li><a href="global.html#fileSizeToByte">fileSizeToByte</a></li><li><a href="global.html#fileterAllMatchedData">fileterAllMatchedData</a></li><li><a href="global.html#filterAllCheckedData">filterAllCheckedData</a></li><li><a href="global.html#filterChilds">filterChilds</a></li><li><a href="global.html#filterTreeLevel">filterTreeLevel</a></li><li><a href="global.html#genBitmapImage">genBitmapImage</a></li><li><a href="global.html#generateKeys">generateKeys</a></li><li><a href="global.html#getFileExtension">getFileExtension</a></li><li><a href="global.html#getKeyBytes">getKeyBytes</a></li><li><a href="global.html#getTreeFlatKeys">getTreeFlatKeys</a></li><li><a href="global.html#gradientColor">gradientColor</a></li><li><a href="global.html#has">has</a></li><li><a href="global.html#hasOwnProperty">hasOwnProperty</a></li><li><a href="global.html#hexToBt4">hexToBt4</a></li><li><a href="global.html#imageCompress">imageCompress</a></li><li><a href="global.html#isArray">isArray</a></li><li><a href="global.html#isBoolean">isBoolean</a></li><li><a href="global.html#isBuiltInObject">isBuiltInObject</a></li><li><a href="global.html#isDom">isDom</a></li><li><a href="global.html#isElement">isElement</a></li><li><a href="global.html#isEmpty">isEmpty</a></li><li><a href="global.html#isEmptyObject">isEmptyObject</a></li><li><a href="global.html#isFloat">isFloat</a></li><li><a href="global.html#isHexColor">isHexColor</a></li><li><a href="global.html#isImageSrc">isImageSrc</a></li><li><a href="global.html#isInputEqual">isInputEqual</a></li><li><a href="global.html#isJson">isJson</a></li><li><a href="global.html#isKeyColor">isKeyColor</a></li><li><a href="global.html#isKeyInObject">isKeyInObject</a></li><li><a href="global.html#isNil">isNil</a></li><li><a href="global.html#isNull">isNull</a></li><li><a href="global.html#isNumber">isNumber</a></li><li><a href="global.html#isObject">isObject</a></li><li><a href="global.html#isOnlyObject">isOnlyObject</a></li><li><a href="global.html#isOpacity">isOpacity</a></li><li><a href="global.html#isOwnKeyInObject">isOwnKeyInObject</a></li><li><a href="global.html#isRgbColor">isRgbColor</a></li><li><a href="global.html#isUndefined">isUndefined</a></li><li><a href="global.html#isUrl">isUrl</a></li><li><a href="global.html#isValidDate">isValidDate</a></li><li><a href="global.html#keyColorToHex">keyColorToHex</a></li><li><a href="global.html#Log">Log</a></li><li><a href="global.html#merge">merge</a></li><li><a href="global.html#mergeAll">mergeAll</a></li><li><a href="global.html#mod">mod</a></li><li><a href="global.html#multiply">multiply</a></li><li><a href="global.html#normalPolicy">normalPolicy</a></li><li><a href="global.html#null2default">null2default</a></li><li><a href="global.html#objRGB2str">objRGB2str</a></li><li><a href="global.html#parse">parse</a></li><li><a href="global.html#pathToTree">pathToTree</a></li><li><a href="global.html#plus">plus</a></li><li><a href="global.html#PNGlib">PNGlib</a></li><li><a href="global.html#Queue">Queue</a></li><li><a href="global.html#random">random</a></li><li><a href="global.html#randomInt">randomInt</a></li><li><a href="global.html#recursive">recursive</a></li><li><a href="global.html#recursiveGen">recursiveGen</a></li><li><a href="global.html#rgb2object">rgb2object</a></li><li><a href="global.html#saveAsImage">saveAsImage</a></li><li><a href="global.html#serialize">serialize</a></li><li><a href="global.html#shallowEqual">shallowEqual</a></li><li><a href="global.html#simpleEqual">simpleEqual</a></li><li><a href="global.html#simpleThrottle">simpleThrottle</a></li><li><a href="global.html#some">some</a></li><li><a href="global.html#stringIsJson">stringIsJson</a></li><li><a href="global.html#strToBt">strToBt</a></li><li><a href="global.html#subObjectEqual">subObjectEqual</a></li><li><a href="global.html#subtract">subtract</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toHexAlphaColor">toHexAlphaColor</a></li><li><a href="global.html#toHexColor">toHexColor</a></li><li><a href="global.html#toRGBcolor">toRGBcolor</a></li><li><a href="global.html#toStringHexColor">toStringHexColor</a></li><li><a href="global.html#transformColor">transformColor</a></li><li><a href="global.html#useMd5Policy">useMd5Policy</a></li><li><a href="global.html#useMd5Policy2">useMd5Policy2</a></li><li><a href="global.html#utils">utils</a></li><li><a href="global.html#values">values</a></li></ul>
31
31
  </nav>
32
32
 
33
33
  <div id="main">
@@ -334,7 +334,7 @@ isDebug: true
334
334
  <br class="clear">
335
335
 
336
336
  <footer>
337
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Tue May 24 2022 16:55:22 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
337
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Wed Sep 07 2022 14:22:01 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
338
338
  </footer>
339
339
 
340
340
  <script>prettyPrint();</script>
package/docs/global.html CHANGED
@@ -27,7 +27,7 @@
27
27
 
28
28
  <nav >
29
29
 
30
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Logger.html">Logger</a><ul class='methods'><li data-type='method'><a href="Logger.html#pkgInfo">pkgInfo</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#_boost">_boost</a></li><li><a href="global.html#_defaultBrowsers">_defaultBrowsers</a></li><li><a href="global.html#_muiltBrowsers">_muiltBrowsers</a></li><li><a href="global.html#_utils">_utils</a></li><li><a href="global.html#advancePolicy">advancePolicy</a></li><li><a href="global.html#amosCookie">amosCookie</a></li><li><a href="global.html#array2tree">array2tree</a></li><li><a href="global.html#arrayFilter">arrayFilter</a></li><li><a href="global.html#beautifyRoutes">beautifyRoutes</a></li><li><a href="global.html#browserSupport">browserSupport</a></li><li><a href="global.html#bt4ToHex">bt4ToHex</a></li><li><a href="global.html#byteToString">byteToString</a></li><li><a href="global.html#calcBrowserVersion">calcBrowserVersion</a></li><li><a href="global.html#checkFlash">checkFlash</a></li><li><a href="global.html#clone">clone</a></li><li><a href="global.html#colorKeyWordsHexStr">colorKeyWordsHexStr</a></li><li><a href="global.html#completeUnit">completeUnit</a></li><li><a href="global.html#customEqual">customEqual</a></li><li><a href="global.html#debounce">debounce</a></li><li><a href="global.html#deepCopy">deepCopy</a></li><li><a href="global.html#deepEqual">deepEqual</a></li><li><a href="global.html#DesUtils">DesUtils</a></li><li><a href="global.html#divide">divide</a></li><li><a href="global.html#drawPolygon">drawPolygon</a></li><li><a href="global.html#enc">enc</a></li><li><a href="global.html#encodeLen">encodeLen</a></li><li><a href="global.html#encodeNumber">encodeNumber</a></li><li><a href="global.html#eq">eq</a></li><li><a href="global.html#fieldContentRegExp">fieldContentRegExp</a></li><li><a href="global.html#fileSizeToByte">fileSizeToByte</a></li><li><a href="global.html#fileterAllMatchedData">fileterAllMatchedData</a></li><li><a href="global.html#filterAllCheckedData">filterAllCheckedData</a></li><li><a href="global.html#filterChilds">filterChilds</a></li><li><a href="global.html#filterTreeLevel">filterTreeLevel</a></li><li><a href="global.html#genBitmapImage">genBitmapImage</a></li><li><a href="global.html#generateKeys">generateKeys</a></li><li><a href="global.html#getFileExtension">getFileExtension</a></li><li><a href="global.html#getKeyBytes">getKeyBytes</a></li><li><a href="global.html#getTreeFlatKeys">getTreeFlatKeys</a></li><li><a href="global.html#gradientColor">gradientColor</a></li><li><a href="global.html#has">has</a></li><li><a href="global.html#hasOwnProperty">hasOwnProperty</a></li><li><a href="global.html#hexToBt4">hexToBt4</a></li><li><a href="global.html#imageCompress">imageCompress</a></li><li><a href="global.html#isArray">isArray</a></li><li><a href="global.html#isBoolean">isBoolean</a></li><li><a href="global.html#isBuiltInObject">isBuiltInObject</a></li><li><a href="global.html#isDom">isDom</a></li><li><a href="global.html#isElement">isElement</a></li><li><a href="global.html#isEmpty">isEmpty</a></li><li><a href="global.html#isEmptyObject">isEmptyObject</a></li><li><a href="global.html#isFloat">isFloat</a></li><li><a href="global.html#isHexColor">isHexColor</a></li><li><a href="global.html#isImageSrc">isImageSrc</a></li><li><a href="global.html#isInputEqual">isInputEqual</a></li><li><a href="global.html#isJson">isJson</a></li><li><a href="global.html#isKeyColor">isKeyColor</a></li><li><a href="global.html#isKeyInObject">isKeyInObject</a></li><li><a href="global.html#isNil">isNil</a></li><li><a href="global.html#isNull">isNull</a></li><li><a href="global.html#isNumber">isNumber</a></li><li><a href="global.html#isObject">isObject</a></li><li><a href="global.html#isOnlyObject">isOnlyObject</a></li><li><a href="global.html#isOpacity">isOpacity</a></li><li><a href="global.html#isOwnKeyInObject">isOwnKeyInObject</a></li><li><a href="global.html#isRgbColor">isRgbColor</a></li><li><a href="global.html#isUndefined">isUndefined</a></li><li><a href="global.html#isUrl">isUrl</a></li><li><a href="global.html#isValidDate">isValidDate</a></li><li><a href="global.html#keyColorToHex">keyColorToHex</a></li><li><a href="global.html#Log">Log</a></li><li><a href="global.html#merge">merge</a></li><li><a href="global.html#mergeAll">mergeAll</a></li><li><a href="global.html#mod">mod</a></li><li><a href="global.html#multiply">multiply</a></li><li><a href="global.html#normalPolicy">normalPolicy</a></li><li><a href="global.html#null2default">null2default</a></li><li><a href="global.html#objRGB2str">objRGB2str</a></li><li><a href="global.html#parse">parse</a></li><li><a href="global.html#pathToTree">pathToTree</a></li><li><a href="global.html#plus">plus</a></li><li><a href="global.html#PNGlib">PNGlib</a></li><li><a href="global.html#Queue">Queue</a></li><li><a href="global.html#random">random</a></li><li><a href="global.html#randomInt">randomInt</a></li><li><a href="global.html#recursive">recursive</a></li><li><a href="global.html#recursiveGen">recursiveGen</a></li><li><a href="global.html#rgb2object">rgb2object</a></li><li><a href="global.html#saveAsImage">saveAsImage</a></li><li><a href="global.html#serialize">serialize</a></li><li><a href="global.html#shallowEqual">shallowEqual</a></li><li><a href="global.html#simpleEqual">simpleEqual</a></li><li><a href="global.html#simpleThrottle">simpleThrottle</a></li><li><a href="global.html#some">some</a></li><li><a href="global.html#stringIsJson">stringIsJson</a></li><li><a href="global.html#strToBt">strToBt</a></li><li><a href="global.html#subObjectEqual">subObjectEqual</a></li><li><a href="global.html#subtract">subtract</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toHexColor">toHexColor</a></li><li><a href="global.html#toRGBcolor">toRGBcolor</a></li><li><a href="global.html#toStringHexColor">toStringHexColor</a></li><li><a href="global.html#transformColor">transformColor</a></li><li><a href="global.html#useMd5Policy">useMd5Policy</a></li><li><a href="global.html#useMd5Policy2">useMd5Policy2</a></li><li><a href="global.html#utils">utils</a></li><li><a href="global.html#values">values</a></li></ul>
30
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Logger.html">Logger</a><ul class='methods'><li data-type='method'><a href="Logger.html#pkgInfo">pkgInfo</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#_boost">_boost</a></li><li><a href="global.html#_defaultBrowsers">_defaultBrowsers</a></li><li><a href="global.html#_muiltBrowsers">_muiltBrowsers</a></li><li><a href="global.html#_utils">_utils</a></li><li><a href="global.html#advancePolicy">advancePolicy</a></li><li><a href="global.html#alphaHexMap">alphaHexMap</a></li><li><a href="global.html#amosCookie">amosCookie</a></li><li><a href="global.html#array2tree">array2tree</a></li><li><a href="global.html#arrayFilter">arrayFilter</a></li><li><a href="global.html#beautifyRoutes">beautifyRoutes</a></li><li><a href="global.html#browserSupport">browserSupport</a></li><li><a href="global.html#bt4ToHex">bt4ToHex</a></li><li><a href="global.html#byteToString">byteToString</a></li><li><a href="global.html#calcBrowserVersion">calcBrowserVersion</a></li><li><a href="global.html#checkFlash">checkFlash</a></li><li><a href="global.html#clone">clone</a></li><li><a href="global.html#colorKeyWordsHexStr">colorKeyWordsHexStr</a></li><li><a href="global.html#completeUnit">completeUnit</a></li><li><a href="global.html#customEqual">customEqual</a></li><li><a href="global.html#debounce">debounce</a></li><li><a href="global.html#deepCopy">deepCopy</a></li><li><a href="global.html#deepEqual">deepEqual</a></li><li><a href="global.html#DesUtils">DesUtils</a></li><li><a href="global.html#divide">divide</a></li><li><a href="global.html#drawPolygon">drawPolygon</a></li><li><a href="global.html#enc">enc</a></li><li><a href="global.html#encodeLen">encodeLen</a></li><li><a href="global.html#encodeNumber">encodeNumber</a></li><li><a href="global.html#eq">eq</a></li><li><a href="global.html#fieldContentRegExp">fieldContentRegExp</a></li><li><a href="global.html#fileSizeToByte">fileSizeToByte</a></li><li><a href="global.html#fileterAllMatchedData">fileterAllMatchedData</a></li><li><a href="global.html#filterAllCheckedData">filterAllCheckedData</a></li><li><a href="global.html#filterChilds">filterChilds</a></li><li><a href="global.html#filterTreeLevel">filterTreeLevel</a></li><li><a href="global.html#genBitmapImage">genBitmapImage</a></li><li><a href="global.html#generateKeys">generateKeys</a></li><li><a href="global.html#getFileExtension">getFileExtension</a></li><li><a href="global.html#getKeyBytes">getKeyBytes</a></li><li><a href="global.html#getTreeFlatKeys">getTreeFlatKeys</a></li><li><a href="global.html#gradientColor">gradientColor</a></li><li><a href="global.html#has">has</a></li><li><a href="global.html#hasOwnProperty">hasOwnProperty</a></li><li><a href="global.html#hexToBt4">hexToBt4</a></li><li><a href="global.html#imageCompress">imageCompress</a></li><li><a href="global.html#isArray">isArray</a></li><li><a href="global.html#isBoolean">isBoolean</a></li><li><a href="global.html#isBuiltInObject">isBuiltInObject</a></li><li><a href="global.html#isDom">isDom</a></li><li><a href="global.html#isElement">isElement</a></li><li><a href="global.html#isEmpty">isEmpty</a></li><li><a href="global.html#isEmptyObject">isEmptyObject</a></li><li><a href="global.html#isFloat">isFloat</a></li><li><a href="global.html#isHexColor">isHexColor</a></li><li><a href="global.html#isImageSrc">isImageSrc</a></li><li><a href="global.html#isInputEqual">isInputEqual</a></li><li><a href="global.html#isJson">isJson</a></li><li><a href="global.html#isKeyColor">isKeyColor</a></li><li><a href="global.html#isKeyInObject">isKeyInObject</a></li><li><a href="global.html#isNil">isNil</a></li><li><a href="global.html#isNull">isNull</a></li><li><a href="global.html#isNumber">isNumber</a></li><li><a href="global.html#isObject">isObject</a></li><li><a href="global.html#isOnlyObject">isOnlyObject</a></li><li><a href="global.html#isOpacity">isOpacity</a></li><li><a href="global.html#isOwnKeyInObject">isOwnKeyInObject</a></li><li><a href="global.html#isRgbColor">isRgbColor</a></li><li><a href="global.html#isUndefined">isUndefined</a></li><li><a href="global.html#isUrl">isUrl</a></li><li><a href="global.html#isValidDate">isValidDate</a></li><li><a href="global.html#keyColorToHex">keyColorToHex</a></li><li><a href="global.html#Log">Log</a></li><li><a href="global.html#merge">merge</a></li><li><a href="global.html#mergeAll">mergeAll</a></li><li><a href="global.html#mod">mod</a></li><li><a href="global.html#multiply">multiply</a></li><li><a href="global.html#normalPolicy">normalPolicy</a></li><li><a href="global.html#null2default">null2default</a></li><li><a href="global.html#objRGB2str">objRGB2str</a></li><li><a href="global.html#parse">parse</a></li><li><a href="global.html#pathToTree">pathToTree</a></li><li><a href="global.html#plus">plus</a></li><li><a href="global.html#PNGlib">PNGlib</a></li><li><a href="global.html#Queue">Queue</a></li><li><a href="global.html#random">random</a></li><li><a href="global.html#randomInt">randomInt</a></li><li><a href="global.html#recursive">recursive</a></li><li><a href="global.html#recursiveGen">recursiveGen</a></li><li><a href="global.html#rgb2object">rgb2object</a></li><li><a href="global.html#saveAsImage">saveAsImage</a></li><li><a href="global.html#serialize">serialize</a></li><li><a href="global.html#shallowEqual">shallowEqual</a></li><li><a href="global.html#simpleEqual">simpleEqual</a></li><li><a href="global.html#simpleThrottle">simpleThrottle</a></li><li><a href="global.html#some">some</a></li><li><a href="global.html#stringIsJson">stringIsJson</a></li><li><a href="global.html#strToBt">strToBt</a></li><li><a href="global.html#subObjectEqual">subObjectEqual</a></li><li><a href="global.html#subtract">subtract</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toHexAlphaColor">toHexAlphaColor</a></li><li><a href="global.html#toHexColor">toHexColor</a></li><li><a href="global.html#toRGBcolor">toRGBcolor</a></li><li><a href="global.html#toStringHexColor">toStringHexColor</a></li><li><a href="global.html#transformColor">transformColor</a></li><li><a href="global.html#useMd5Policy">useMd5Policy</a></li><li><a href="global.html#useMd5Policy2">useMd5Policy2</a></li><li><a href="global.html#utils">utils</a></li><li><a href="global.html#values">values</a></li></ul>
31
31
  </nav>
32
32
 
33
33
  <div id="main">
@@ -294,6 +294,60 @@ such as equal some version</p>
294
294
 
295
295
 
296
296
 
297
+ <h4 class="name" id="alphaHexMap"><span class="type-signature">(constant) </span>alphaHexMap<span class="type-signature"></span></h4>
298
+
299
+
300
+
301
+
302
+
303
+ <dl class="details">
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+ </dl>
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
297
351
  <h4 class="name" id="amosCookie"><span class="type-signature"></span>amosCookie<span class="type-signature"></span></h4>
298
352
 
299
353
 
@@ -12605,7 +12659,8 @@ The object has the various cookies as keys(names) =&gt; values</p>
12605
12659
 
12606
12660
  <h5>Example</h5>
12607
12661
 
12608
- <pre class="prettyprint"><code>rgb2object('rgba(241,112,19,1)'); // { r: '241', g: '112', b: '19', a: '1' }
12609
12662
  rgb2object('241,112,19,1'); // { r: '241', g: '112', b: '19', a: '1' }</code></pre>
12663
+ <pre class="prettyprint"><code>rgb2object('rgba(241,112,19,1)'); // { r: '241', g: '112', b: '19', a: '1' }
12664
+ rgb2object('241,112,19,1'); // { r: '241', g: '112', b: '19', a: '1' }</code></pre>
12610
12665
 
12611
12666
 
12612
12667
 
@@ -14479,6 +14534,183 @@ schedule <code>callback</code> to execute after <code>delay</code> ms.</p></td>
14479
14534
 
14480
14535
 
14481
14536
 
14537
+ <h4 class="name" id="toHexAlphaColor"><span class="type-signature"></span>toHexAlphaColor<span class="signature">(hex, alpha)</span><span class="type-signature"> &rarr; {String}</span></h4>
14538
+
14539
+
14540
+
14541
+
14542
+
14543
+
14544
+ <dl class="details">
14545
+
14546
+
14547
+
14548
+
14549
+
14550
+
14551
+
14552
+
14553
+
14554
+
14555
+
14556
+
14557
+
14558
+
14559
+
14560
+
14561
+
14562
+
14563
+
14564
+
14565
+
14566
+
14567
+
14568
+
14569
+
14570
+
14571
+
14572
+
14573
+
14574
+
14575
+
14576
+
14577
+ </dl>
14578
+
14579
+
14580
+
14581
+
14582
+
14583
+ <div class="description usertext">
14584
+ <p>将 hex color 添加上 alpha</p>
14585
+ </div>
14586
+
14587
+
14588
+
14589
+
14590
+
14591
+
14592
+
14593
+
14594
+
14595
+ <h5>Example</h5>
14596
+
14597
+ <pre class="prettyprint"><code>toHexAlphaColor('#efefef', 0.56); // #efefef8F</code></pre>
14598
+
14599
+
14600
+
14601
+
14602
+ <h5>Parameters:</h5>
14603
+
14604
+
14605
+ <table class="params">
14606
+ <thead>
14607
+ <tr>
14608
+
14609
+ <th>Name</th>
14610
+
14611
+
14612
+ <th>Type</th>
14613
+
14614
+
14615
+
14616
+
14617
+
14618
+ <th class="last">Description</th>
14619
+ </tr>
14620
+ </thead>
14621
+
14622
+ <tbody>
14623
+
14624
+
14625
+ <tr>
14626
+
14627
+ <td class="name"><code>hex</code></td>
14628
+
14629
+
14630
+ <td class="type">
14631
+
14632
+
14633
+ <span class="param-type">String</span>
14634
+
14635
+
14636
+
14637
+ </td>
14638
+
14639
+
14640
+
14641
+
14642
+
14643
+ <td class="description last"></td>
14644
+ </tr>
14645
+
14646
+
14647
+
14648
+ <tr>
14649
+
14650
+ <td class="name"><code>alpha</code></td>
14651
+
14652
+
14653
+ <td class="type">
14654
+
14655
+
14656
+ <span class="param-type">Number</span>
14657
+
14658
+
14659
+
14660
+ </td>
14661
+
14662
+
14663
+
14664
+
14665
+
14666
+ <td class="description last"></td>
14667
+ </tr>
14668
+
14669
+
14670
+ </tbody>
14671
+ </table>
14672
+
14673
+
14674
+
14675
+
14676
+
14677
+
14678
+
14679
+
14680
+
14681
+
14682
+
14683
+
14684
+
14685
+
14686
+
14687
+
14688
+ <h5>Returns:</h5>
14689
+
14690
+
14691
+
14692
+
14693
+ <dl class="param-type">
14694
+ <dt>
14695
+ Type
14696
+ </dt>
14697
+ <dd>
14698
+
14699
+ <span class="param-type">String</span>
14700
+
14701
+
14702
+ </dd>
14703
+ </dl>
14704
+
14705
+
14706
+
14707
+
14708
+
14709
+
14710
+
14711
+
14712
+
14713
+
14482
14714
  <h4 class="name" id="toHexColor"><span class="type-signature"></span>toHexColor<span class="signature">(stringRgb)</span><span class="type-signature"></span></h4>
14483
14715
 
14484
14716
 
@@ -14540,7 +14772,10 @@ schedule <code>callback</code> to execute after <code>delay</code> ms.</p></td>
14540
14772
 
14541
14773
  <h5>Example</h5>
14542
14774
 
14543
- <pre class="prettyprint"><code>toHexColor('rgba(241,112,19)'); // #f17013
14544
14775
  toHexColor('rgba(241,112,19, 1)'); // #f17013
14545
14776
  toHexColor('rgba(241,112,19, 0.1)'); // #f17013
14546
14777
  toHexColor('red'); // #ff0000</code></pre>
14778
+ <pre class="prettyprint"><code>toHexColor('rgba(241,112,19)'); // #f17013
14779
+ toHexColor('rgba(241,112,19, 1)'); // #f17013
14780
+ toHexColor('rgba(241,112,19, 0.1)'); // #f17013
14781
+ toHexColor('red'); // #ff0000</code></pre>
14547
14782
 
14548
14783
 
14549
14784
 
@@ -14812,7 +15047,8 @@ schedule <code>callback</code> to execute after <code>delay</code> ms.</p></td>
14812
15047
 
14813
15048
  <h5>Example</h5>
14814
15049
 
14815
- <pre class="prettyprint"><code>toStringHexColor('rgba(241,112,19,1)'); // #f17013
14816
15050
  toStringHexColor('rgba(241,112,19, 0.1)'); // #f1701319</code></pre>
15051
+ <pre class="prettyprint"><code>toStringHexColor('rgba(241,112,19,1)'); // #f17013
15052
+ toStringHexColor('rgba(241,112,19, 0.1)'); // #f1701319</code></pre>
14817
15053
 
14818
15054
 
14819
15055
 
@@ -15477,7 +15713,7 @@ schedule <code>callback</code> to execute after <code>delay</code> ms.</p></td>
15477
15713
  <br class="clear">
15478
15714
 
15479
15715
  <footer>
15480
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Tue May 24 2022 16:55:22 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
15716
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Wed Sep 07 2022 14:22:01 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
15481
15717
  </footer>
15482
15718
 
15483
15719
  <script>prettyPrint();</script>
package/docs/index.html CHANGED
@@ -27,7 +27,7 @@
27
27
 
28
28
  <nav >
29
29
 
30
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Logger.html">Logger</a><ul class='methods'><li data-type='method'><a href="Logger.html#pkgInfo">pkgInfo</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#_boost">_boost</a></li><li><a href="global.html#_defaultBrowsers">_defaultBrowsers</a></li><li><a href="global.html#_muiltBrowsers">_muiltBrowsers</a></li><li><a href="global.html#_utils">_utils</a></li><li><a href="global.html#advancePolicy">advancePolicy</a></li><li><a href="global.html#amosCookie">amosCookie</a></li><li><a href="global.html#array2tree">array2tree</a></li><li><a href="global.html#arrayFilter">arrayFilter</a></li><li><a href="global.html#beautifyRoutes">beautifyRoutes</a></li><li><a href="global.html#browserSupport">browserSupport</a></li><li><a href="global.html#bt4ToHex">bt4ToHex</a></li><li><a href="global.html#byteToString">byteToString</a></li><li><a href="global.html#calcBrowserVersion">calcBrowserVersion</a></li><li><a href="global.html#checkFlash">checkFlash</a></li><li><a href="global.html#clone">clone</a></li><li><a href="global.html#colorKeyWordsHexStr">colorKeyWordsHexStr</a></li><li><a href="global.html#completeUnit">completeUnit</a></li><li><a href="global.html#customEqual">customEqual</a></li><li><a href="global.html#debounce">debounce</a></li><li><a href="global.html#deepCopy">deepCopy</a></li><li><a href="global.html#deepEqual">deepEqual</a></li><li><a href="global.html#DesUtils">DesUtils</a></li><li><a href="global.html#divide">divide</a></li><li><a href="global.html#drawPolygon">drawPolygon</a></li><li><a href="global.html#enc">enc</a></li><li><a href="global.html#encodeLen">encodeLen</a></li><li><a href="global.html#encodeNumber">encodeNumber</a></li><li><a href="global.html#eq">eq</a></li><li><a href="global.html#fieldContentRegExp">fieldContentRegExp</a></li><li><a href="global.html#fileSizeToByte">fileSizeToByte</a></li><li><a href="global.html#fileterAllMatchedData">fileterAllMatchedData</a></li><li><a href="global.html#filterAllCheckedData">filterAllCheckedData</a></li><li><a href="global.html#filterChilds">filterChilds</a></li><li><a href="global.html#filterTreeLevel">filterTreeLevel</a></li><li><a href="global.html#genBitmapImage">genBitmapImage</a></li><li><a href="global.html#generateKeys">generateKeys</a></li><li><a href="global.html#getFileExtension">getFileExtension</a></li><li><a href="global.html#getKeyBytes">getKeyBytes</a></li><li><a href="global.html#getTreeFlatKeys">getTreeFlatKeys</a></li><li><a href="global.html#gradientColor">gradientColor</a></li><li><a href="global.html#has">has</a></li><li><a href="global.html#hasOwnProperty">hasOwnProperty</a></li><li><a href="global.html#hexToBt4">hexToBt4</a></li><li><a href="global.html#imageCompress">imageCompress</a></li><li><a href="global.html#isArray">isArray</a></li><li><a href="global.html#isBoolean">isBoolean</a></li><li><a href="global.html#isBuiltInObject">isBuiltInObject</a></li><li><a href="global.html#isDom">isDom</a></li><li><a href="global.html#isElement">isElement</a></li><li><a href="global.html#isEmpty">isEmpty</a></li><li><a href="global.html#isEmptyObject">isEmptyObject</a></li><li><a href="global.html#isFloat">isFloat</a></li><li><a href="global.html#isHexColor">isHexColor</a></li><li><a href="global.html#isImageSrc">isImageSrc</a></li><li><a href="global.html#isInputEqual">isInputEqual</a></li><li><a href="global.html#isJson">isJson</a></li><li><a href="global.html#isKeyColor">isKeyColor</a></li><li><a href="global.html#isKeyInObject">isKeyInObject</a></li><li><a href="global.html#isNil">isNil</a></li><li><a href="global.html#isNull">isNull</a></li><li><a href="global.html#isNumber">isNumber</a></li><li><a href="global.html#isObject">isObject</a></li><li><a href="global.html#isOnlyObject">isOnlyObject</a></li><li><a href="global.html#isOpacity">isOpacity</a></li><li><a href="global.html#isOwnKeyInObject">isOwnKeyInObject</a></li><li><a href="global.html#isRgbColor">isRgbColor</a></li><li><a href="global.html#isUndefined">isUndefined</a></li><li><a href="global.html#isUrl">isUrl</a></li><li><a href="global.html#isValidDate">isValidDate</a></li><li><a href="global.html#keyColorToHex">keyColorToHex</a></li><li><a href="global.html#Log">Log</a></li><li><a href="global.html#merge">merge</a></li><li><a href="global.html#mergeAll">mergeAll</a></li><li><a href="global.html#mod">mod</a></li><li><a href="global.html#multiply">multiply</a></li><li><a href="global.html#normalPolicy">normalPolicy</a></li><li><a href="global.html#null2default">null2default</a></li><li><a href="global.html#objRGB2str">objRGB2str</a></li><li><a href="global.html#parse">parse</a></li><li><a href="global.html#pathToTree">pathToTree</a></li><li><a href="global.html#plus">plus</a></li><li><a href="global.html#PNGlib">PNGlib</a></li><li><a href="global.html#Queue">Queue</a></li><li><a href="global.html#random">random</a></li><li><a href="global.html#randomInt">randomInt</a></li><li><a href="global.html#recursive">recursive</a></li><li><a href="global.html#recursiveGen">recursiveGen</a></li><li><a href="global.html#rgb2object">rgb2object</a></li><li><a href="global.html#saveAsImage">saveAsImage</a></li><li><a href="global.html#serialize">serialize</a></li><li><a href="global.html#shallowEqual">shallowEqual</a></li><li><a href="global.html#simpleEqual">simpleEqual</a></li><li><a href="global.html#simpleThrottle">simpleThrottle</a></li><li><a href="global.html#some">some</a></li><li><a href="global.html#stringIsJson">stringIsJson</a></li><li><a href="global.html#strToBt">strToBt</a></li><li><a href="global.html#subObjectEqual">subObjectEqual</a></li><li><a href="global.html#subtract">subtract</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toHexColor">toHexColor</a></li><li><a href="global.html#toRGBcolor">toRGBcolor</a></li><li><a href="global.html#toStringHexColor">toStringHexColor</a></li><li><a href="global.html#transformColor">transformColor</a></li><li><a href="global.html#useMd5Policy">useMd5Policy</a></li><li><a href="global.html#useMd5Policy2">useMd5Policy2</a></li><li><a href="global.html#utils">utils</a></li><li><a href="global.html#values">values</a></li></ul>
30
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Logger.html">Logger</a><ul class='methods'><li data-type='method'><a href="Logger.html#pkgInfo">pkgInfo</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#_boost">_boost</a></li><li><a href="global.html#_defaultBrowsers">_defaultBrowsers</a></li><li><a href="global.html#_muiltBrowsers">_muiltBrowsers</a></li><li><a href="global.html#_utils">_utils</a></li><li><a href="global.html#advancePolicy">advancePolicy</a></li><li><a href="global.html#alphaHexMap">alphaHexMap</a></li><li><a href="global.html#amosCookie">amosCookie</a></li><li><a href="global.html#array2tree">array2tree</a></li><li><a href="global.html#arrayFilter">arrayFilter</a></li><li><a href="global.html#beautifyRoutes">beautifyRoutes</a></li><li><a href="global.html#browserSupport">browserSupport</a></li><li><a href="global.html#bt4ToHex">bt4ToHex</a></li><li><a href="global.html#byteToString">byteToString</a></li><li><a href="global.html#calcBrowserVersion">calcBrowserVersion</a></li><li><a href="global.html#checkFlash">checkFlash</a></li><li><a href="global.html#clone">clone</a></li><li><a href="global.html#colorKeyWordsHexStr">colorKeyWordsHexStr</a></li><li><a href="global.html#completeUnit">completeUnit</a></li><li><a href="global.html#customEqual">customEqual</a></li><li><a href="global.html#debounce">debounce</a></li><li><a href="global.html#deepCopy">deepCopy</a></li><li><a href="global.html#deepEqual">deepEqual</a></li><li><a href="global.html#DesUtils">DesUtils</a></li><li><a href="global.html#divide">divide</a></li><li><a href="global.html#drawPolygon">drawPolygon</a></li><li><a href="global.html#enc">enc</a></li><li><a href="global.html#encodeLen">encodeLen</a></li><li><a href="global.html#encodeNumber">encodeNumber</a></li><li><a href="global.html#eq">eq</a></li><li><a href="global.html#fieldContentRegExp">fieldContentRegExp</a></li><li><a href="global.html#fileSizeToByte">fileSizeToByte</a></li><li><a href="global.html#fileterAllMatchedData">fileterAllMatchedData</a></li><li><a href="global.html#filterAllCheckedData">filterAllCheckedData</a></li><li><a href="global.html#filterChilds">filterChilds</a></li><li><a href="global.html#filterTreeLevel">filterTreeLevel</a></li><li><a href="global.html#genBitmapImage">genBitmapImage</a></li><li><a href="global.html#generateKeys">generateKeys</a></li><li><a href="global.html#getFileExtension">getFileExtension</a></li><li><a href="global.html#getKeyBytes">getKeyBytes</a></li><li><a href="global.html#getTreeFlatKeys">getTreeFlatKeys</a></li><li><a href="global.html#gradientColor">gradientColor</a></li><li><a href="global.html#has">has</a></li><li><a href="global.html#hasOwnProperty">hasOwnProperty</a></li><li><a href="global.html#hexToBt4">hexToBt4</a></li><li><a href="global.html#imageCompress">imageCompress</a></li><li><a href="global.html#isArray">isArray</a></li><li><a href="global.html#isBoolean">isBoolean</a></li><li><a href="global.html#isBuiltInObject">isBuiltInObject</a></li><li><a href="global.html#isDom">isDom</a></li><li><a href="global.html#isElement">isElement</a></li><li><a href="global.html#isEmpty">isEmpty</a></li><li><a href="global.html#isEmptyObject">isEmptyObject</a></li><li><a href="global.html#isFloat">isFloat</a></li><li><a href="global.html#isHexColor">isHexColor</a></li><li><a href="global.html#isImageSrc">isImageSrc</a></li><li><a href="global.html#isInputEqual">isInputEqual</a></li><li><a href="global.html#isJson">isJson</a></li><li><a href="global.html#isKeyColor">isKeyColor</a></li><li><a href="global.html#isKeyInObject">isKeyInObject</a></li><li><a href="global.html#isNil">isNil</a></li><li><a href="global.html#isNull">isNull</a></li><li><a href="global.html#isNumber">isNumber</a></li><li><a href="global.html#isObject">isObject</a></li><li><a href="global.html#isOnlyObject">isOnlyObject</a></li><li><a href="global.html#isOpacity">isOpacity</a></li><li><a href="global.html#isOwnKeyInObject">isOwnKeyInObject</a></li><li><a href="global.html#isRgbColor">isRgbColor</a></li><li><a href="global.html#isUndefined">isUndefined</a></li><li><a href="global.html#isUrl">isUrl</a></li><li><a href="global.html#isValidDate">isValidDate</a></li><li><a href="global.html#keyColorToHex">keyColorToHex</a></li><li><a href="global.html#Log">Log</a></li><li><a href="global.html#merge">merge</a></li><li><a href="global.html#mergeAll">mergeAll</a></li><li><a href="global.html#mod">mod</a></li><li><a href="global.html#multiply">multiply</a></li><li><a href="global.html#normalPolicy">normalPolicy</a></li><li><a href="global.html#null2default">null2default</a></li><li><a href="global.html#objRGB2str">objRGB2str</a></li><li><a href="global.html#parse">parse</a></li><li><a href="global.html#pathToTree">pathToTree</a></li><li><a href="global.html#plus">plus</a></li><li><a href="global.html#PNGlib">PNGlib</a></li><li><a href="global.html#Queue">Queue</a></li><li><a href="global.html#random">random</a></li><li><a href="global.html#randomInt">randomInt</a></li><li><a href="global.html#recursive">recursive</a></li><li><a href="global.html#recursiveGen">recursiveGen</a></li><li><a href="global.html#rgb2object">rgb2object</a></li><li><a href="global.html#saveAsImage">saveAsImage</a></li><li><a href="global.html#serialize">serialize</a></li><li><a href="global.html#shallowEqual">shallowEqual</a></li><li><a href="global.html#simpleEqual">simpleEqual</a></li><li><a href="global.html#simpleThrottle">simpleThrottle</a></li><li><a href="global.html#some">some</a></li><li><a href="global.html#stringIsJson">stringIsJson</a></li><li><a href="global.html#strToBt">strToBt</a></li><li><a href="global.html#subObjectEqual">subObjectEqual</a></li><li><a href="global.html#subtract">subtract</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toHexAlphaColor">toHexAlphaColor</a></li><li><a href="global.html#toHexColor">toHexColor</a></li><li><a href="global.html#toRGBcolor">toRGBcolor</a></li><li><a href="global.html#toStringHexColor">toStringHexColor</a></li><li><a href="global.html#transformColor">transformColor</a></li><li><a href="global.html#useMd5Policy">useMd5Policy</a></li><li><a href="global.html#useMd5Policy2">useMd5Policy2</a></li><li><a href="global.html#utils">utils</a></li><li><a href="global.html#values">values</a></li></ul>
31
31
  </nav>
32
32
 
33
33
  <div id="main">
@@ -451,6 +451,8 @@ const result2 = browserSupport(paramsList, limit);
451
451
 
452
452
  getParameter(url, name):
453
453
  `get target url Parameter by name, and return value or '' `
454
+ extractParam(url, name): `解析指定 url 中的参数,返回指定 name 的参数`
455
+ extractParams(url): `解析指定 url 中的参数,参数对象,如果 url 为undefined,则默认采用 window.location.href`
454
456
 
455
457
  `LocationSearch` LocationParam.LocationSearch
456
458
  `other search tool`
@@ -781,7 +783,7 @@ convert2BMP(canvas, width, height)</p>
781
783
  <br class="clear">
782
784
 
783
785
  <footer>
784
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Tue May 24 2022 16:55:22 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
786
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Wed Sep 07 2022 14:22:01 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
785
787
  </footer>
786
788
 
787
789
  <script>prettyPrint();</script>
package/index.d.ts CHANGED
@@ -190,14 +190,44 @@ declare namespace LocationParam {
190
190
  * 获取指定 url 中的参数,仅匹配 &
191
191
  * @param url
192
192
  * @param name
193
+ * @example
194
+ * extractParam('/vizmixpub?appId=1536262837746302978&id=1536264796842786817&designerType=vizmix&isPreview=true', 'id'); // 1536264796842786817
193
195
  */
194
196
  export function extractParam(url: string, name: string): string | null;
195
197
  /**
196
- * 补全参数
197
- * @param {*} param
198
- * @param {*} url 可以为空,如果为空,则默认取 location.href
198
+ * 获取 url 中参数集合
199
+ * @param url
200
+ * @example
201
+ * extractParam('/vizmixpub?appId=1536262837746302978&id=1536264796842786817&designerType=vizmix&isPreview=true', 'id');
202
+ * // { appId: '1536262837746302978', id: '1536264796842786817', designerType: 'vizmix', isPreview: 'true' }
199
203
  */
200
- export function completeParam(param: Object, url: string): string;
204
+ export function extractParams(url: string): Object;
205
+ /**
206
+ * 获取 url 中参数集合
207
+ * @param url
208
+ * @param decode 是否解码
209
+ * @example
210
+ * extractParamAll('/vizmixpub?appId=1536262837746302978&id=1536264796842786817&designerType=vizmix&isPreview=true', 'id');
211
+ * // { appId: '1536262837746302978', id: '1536264796842786817', designerType: 'vizmix', isPreview: 'true' }
212
+ */
213
+ export function extractParamAll(url: string, decode = false): Object;
214
+ /**
215
+ * 补全参数
216
+ * @param {Object} param
217
+ * @param {String} url 可以为空,如果为空,则默认取 location.href
218
+ * @param {Boolean} forceCast 强制转换,默认会将参数中的 undefined 和 null 转化为 '' 字符串
219
+ * @example
220
+ * // 如:window.location.href = http://localhost:8080/aaa
221
+ * // 传入一个参数,url 将使用 `window.location.href`
222
+ * completeParam({ token: 'xxddf' }); // `http://localhost:8080/aaa?token=xxddf`
223
+ * // 使用自定义的 url
224
+ * completeParam({ token: 'xxddf' }, '/main/sub'); // `/main/sub?token=xxddf`
225
+ * // 强制转化 null 值
226
+ * completeParam({ token: 'xxddf', id: null }, '/main/sub', true); // `/main/sub?token=xxddf&id=`
227
+ * // 使用 location.href, 传入两个参数,强制转化 null 值
228
+ * completeParam({ token: 'xxddf', id: null }, true); // `http://localhost:8080/aaa?token=xxddf&id=`
229
+ */
230
+ export function completeParam(param: Object, url: string, forceCast: Boolean): string;
201
231
  export type LocationSearch = { init(): void; getValue(key: string): string; getParameters(): Array<any> };
202
232
  export type LSFN = { getValue(): string; getParameters(): Array<any> };
203
233
  }
@@ -698,6 +728,18 @@ export function amountCase(n): string;
698
728
  export function pwdStrength(str): number;
699
729
  export function addition(arg1, arg2): number;
700
730
  export function subtraction(arg1, arg2): number;
731
+ /**
732
+ * 小数乘法
733
+ * @param arg1 被乘数(接受小数和整数)
734
+ * @param arg2 乘数(接受小数和整数)
735
+ * @param fix 乘积保留几位(接受正负整数以及0)
736
+ * @returns {Number}
737
+ * @example
738
+ * accMul(0.56, 100); // 56
739
+ * accMul(0.5679, 100); // 57
740
+ * accMul(0.5679, 100.2); // 57
741
+ */
742
+ export function accMul(arg1: Number, arg2: Number, fix = 0): number;
701
743
 
702
744
  /**
703
745
  * 将数值格式化成金额形式
package/lib/amostool.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- var Base64 = require("./encrypt/_base64"), MD5 = require("./encrypt/_md5"), DES = require("./encrypt/des"), Browser = require("./_browser"), cloneTools = require("./_clone"), amosCookie = require("./_cookie"), deepCopy = require("./_deepCopy"), deepEqual = require("./_deepEqual"), _fastDeepEqual = require("./_fastDeepEqual"), funcThrottle = require("./_funcThrottle"), isNode = require("./_isnode"), List = require("./_list"), _objectAssign = require("./_object.assign"), _objectEntries = require("./_object.entries"), _objectValues = require("./_object.values"), omit = require("./_omit"), pick = require("./_pick"), parseJson = require("./_parseJson"), Queue = require("./_queue"), shallowCopy = require("./_shallowCopy"), stringify = require("./_stringify"), supportWs = require("./_supportWs"), trim = require("./_trim"), UUID = require("./_uuids"), array2tree = require("./array2tree"), arrayFilter = require("./arrayFilter"), arrayUtils = require("./arrayUtils"), browserSupport = require("./browserSupport"), completeUnit = require("./completeUnit"), consts = require("./consts"), flat = require("./flat"), LocationParam = require("./locationParams"), Log = require("./log"), merged = require("./merged"), objectPath = require("./objectPath"), parseText = require("./parseText"), pwdPolicy = require("./pwdPolicy"), random = require("./random"), shallowEqual = require("./shallowEqual"), Store = require("./store"), strUtils = require("./strUtils"), tableFilter = require("./tableFilter"), utils = require("./utils"), canvas2img = require("./dom/canvas2img"), canvasTools = require("./dom/canvasTools"), downloadFile = require("./dom/downloadFile"), eventHelper = require("./dom/eventHelper"), fileBlob = require("./dom/fileBlob"), fileSaveAs = require("./dom/fileSaveAs"), getFontSize = require("./dom/getFontSize"), minfyImg = require("./dom/minfyImg"), addition = require("./math/addition"), amountCase = require("./math/amountCase"), coinFormat = require("./math/coinFormat"), colorUtil = require("./math/colorUtil"), dateTime = require("./math/dateTime"), pwdStrength = require("./math/pwdStrength"), randomColor = require("./math/randomColor"), subtraction = require("./math/subtraction"), qs = require("./qs"), encodeUrl = require("./url/encodeUrl"), restfulUrl = require("./url/restfulUrl"), positionFactory = require("./positionFactory"), throttleDebounce = require("./throttleDebounce"), checkFlash = require("./_flashSupport");
3
+ var Base64 = require("./encrypt/_base64"), MD5 = require("./encrypt/_md5"), DES = require("./encrypt/des"), Browser = require("./_browser"), cloneTools = require("./_clone"), amosCookie = require("./_cookie"), deepCopy = require("./_deepCopy"), deepEqual = require("./_deepEqual"), _fastDeepEqual = require("./_fastDeepEqual"), funcThrottle = require("./_funcThrottle"), isNode = require("./_isnode"), List = require("./_list"), _objectAssign = require("./_object.assign"), _objectEntries = require("./_object.entries"), _objectValues = require("./_object.values"), omit = require("./_omit"), pick = require("./_pick"), parseJson = require("./_parseJson"), Queue = require("./_queue"), shallowCopy = require("./_shallowCopy"), stringify = require("./_stringify"), supportWs = require("./_supportWs"), trim = require("./_trim"), UUID = require("./_uuids"), array2tree = require("./array2tree"), arrayFilter = require("./arrayFilter"), arrayUtils = require("./arrayUtils"), browserSupport = require("./browserSupport"), completeUnit = require("./completeUnit"), consts = require("./consts"), flat = require("./flat"), LocationParam = require("./locationParams"), Log = require("./log"), merged = require("./merged"), objectPath = require("./objectPath"), parseText = require("./parseText"), pwdPolicy = require("./pwdPolicy"), random = require("./random"), shallowEqual = require("./shallowEqual"), Store = require("./store"), strUtils = require("./strUtils"), tableFilter = require("./tableFilter"), utils = require("./utils"), canvas2img = require("./dom/canvas2img"), canvasTools = require("./dom/canvasTools"), downloadFile = require("./dom/downloadFile"), eventHelper = require("./dom/eventHelper"), fileBlob = require("./dom/fileBlob"), fileSaveAs = require("./dom/fileSaveAs"), getFontSize = require("./dom/getFontSize"), minfyImg = require("./dom/minfyImg"), addition = require("./math/addition"), amountCase = require("./math/amountCase"), coinFormat = require("./math/coinFormat"), colorUtil = require("./math/colorUtil"), dateTime = require("./math/dateTime"), pwdStrength = require("./math/pwdStrength"), randomColor = require("./math/randomColor"), subtraction = require("./math/subtraction"), accMul = require("./math/mul"), qs = require("./qs"), encodeUrl = require("./url/encodeUrl"), restfulUrl = require("./url/restfulUrl"), positionFactory = require("./positionFactory"), throttleDebounce = require("./throttleDebounce"), checkFlash = require("./_flashSupport");
4
4
 
5
5
  module.exports = {
6
6
  Base64: Base64,
@@ -61,6 +61,7 @@ module.exports = {
61
61
  randomColor: randomColor,
62
62
  addition: addition,
63
63
  subtraction: subtraction,
64
+ accMul: accMul,
64
65
  coinFormat: coinFormat,
65
66
  dateTime: dateTime,
66
67
  qs: qs,
@@ -1,33 +1,35 @@
1
1
  "use strict";
2
2
 
3
- var utils = require("../utils"), Base64 = function() {
3
+ var ObjProto = Object.prototype, toString = ObjProto.toString, isString = function(r) {
4
+ return "[object String]" === toString.call(r);
5
+ }, Base64 = function() {
4
6
  var r = this, t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
5
- this.encode = function(e) {
6
- var o, a, n, h, i, d, C, c = "", f = 0;
7
- for (utils.isString(e) || (e += ""), e = r._utf8_encode(e); f < e.length; ) h = (o = e.charCodeAt(f++)) >> 2,
8
- i = (3 & o) << 4 | (a = e.charCodeAt(f++)) >> 4, d = (15 & a) << 2 | (n = e.charCodeAt(f++)) >> 6,
9
- C = 63 & n, isNaN(a) ? d = C = 64 : isNaN(n) && (C = 64), c = c + t.charAt(h) + t.charAt(i) + t.charAt(d) + t.charAt(C);
10
- return c;
11
- }, this.decode = function(e) {
12
- var o, a, n, h, i, d, C = "", c = 0;
13
- for (e = e.replace(/[^A-Za-z0-9\+\/\=]/g, ""); c < e.length; ) o = t.indexOf(e.charAt(c++)) << 2 | (h = t.indexOf(e.charAt(c++))) >> 4,
14
- a = (15 & h) << 4 | (i = t.indexOf(e.charAt(c++))) >> 2, n = (3 & i) << 6 | (d = t.indexOf(e.charAt(c++))),
15
- C += String.fromCharCode(o), 64 != i && (C += String.fromCharCode(a)), 64 != d && (C += String.fromCharCode(n));
16
- return C = r._utf8_decode(C);
7
+ this.encode = function(o) {
8
+ var e, n, a, i, h, c, d, C = "", f = 0;
9
+ for (isString(o) || (o += ""), o = r._utf8_encode(o); f < o.length; ) i = (e = o.charCodeAt(f++)) >> 2,
10
+ h = (3 & e) << 4 | (n = o.charCodeAt(f++)) >> 4, c = (15 & n) << 2 | (a = o.charCodeAt(f++)) >> 6,
11
+ d = 63 & a, isNaN(n) ? c = d = 64 : isNaN(a) && (d = 64), C = C + t.charAt(i) + t.charAt(h) + t.charAt(c) + t.charAt(d);
12
+ return C;
13
+ }, this.decode = function(o) {
14
+ var e, n, a, i, h, c, d = "", C = 0;
15
+ for (o = o.replace(/[^A-Za-z0-9\+\/\=]/g, ""); C < o.length; ) e = t.indexOf(o.charAt(C++)) << 2 | (i = t.indexOf(o.charAt(C++))) >> 4,
16
+ n = (15 & i) << 4 | (h = t.indexOf(o.charAt(C++))) >> 2, a = (3 & h) << 6 | (c = t.indexOf(o.charAt(C++))),
17
+ d += String.fromCharCode(e), 64 != h && (d += String.fromCharCode(n)), 64 != c && (d += String.fromCharCode(a));
18
+ return d = r._utf8_decode(d);
17
19
  }, this._utf8_encode = function(r) {
18
20
  r = r.replace(/\r\n/g, "\n");
19
- for (var t = "", e = 0; e < r.length; e++) {
20
- var o = r.charCodeAt(e);
21
- o < 128 ? t += String.fromCharCode(o) : o > 127 && o < 2048 ? (t += String.fromCharCode(o >> 6 | 192),
22
- t += String.fromCharCode(63 & o | 128)) : (t += String.fromCharCode(o >> 12 | 224),
23
- t += String.fromCharCode(o >> 6 & 63 | 128), t += String.fromCharCode(63 & o | 128));
21
+ for (var t = "", o = 0; o < r.length; o++) {
22
+ var e = r.charCodeAt(o);
23
+ e < 128 ? t += String.fromCharCode(e) : e > 127 && e < 2048 ? (t += String.fromCharCode(e >> 6 | 192),
24
+ t += String.fromCharCode(63 & e | 128)) : (t += String.fromCharCode(e >> 12 | 224),
25
+ t += String.fromCharCode(e >> 6 & 63 | 128), t += String.fromCharCode(63 & e | 128));
24
26
  }
25
27
  return t;
26
28
  }, this._utf8_decode = function(r) {
27
- for (var t = "", e = 0, o = 0, a = 0, n = 0; e < r.length; ) (o = r.charCodeAt(e)) < 128 ? (t += String.fromCharCode(o),
28
- e++) : o > 191 && o < 224 ? (a = r.charCodeAt(e + 1), t += String.fromCharCode((31 & o) << 6 | 63 & a),
29
- e += 2) : (a = r.charCodeAt(e + 1), n = r.charCodeAt(e + 2), t += String.fromCharCode((15 & o) << 12 | (63 & a) << 6 | 63 & n),
30
- e += 3);
29
+ for (var t = "", o = 0, e = 0, n = 0, a = 0; o < r.length; ) (e = r.charCodeAt(o)) < 128 ? (t += String.fromCharCode(e),
30
+ o++) : e > 191 && e < 224 ? (n = r.charCodeAt(o + 1), t += String.fromCharCode((31 & e) << 6 | 63 & n),
31
+ o += 2) : (n = r.charCodeAt(o + 1), a = r.charCodeAt(o + 2), t += String.fromCharCode((15 & e) << 12 | (63 & n) << 6 | 63 & a),
32
+ o += 3);
31
33
  return t;
32
34
  };
33
35
  };
@@ -44,19 +44,19 @@ var utils = require("./utils"), _LSFN = function() {
44
44
  }
45
45
  }, LocationParam = {
46
46
  parse: function(t) {
47
- var n, e, i, r, o;
47
+ var n, e, i, o, r;
48
48
  t || (t = window.location.search);
49
- var a = {}, c = [];
50
- if (!utils.isEmpty(t) && t.length > 1) for (r = 0, o = (c = t.slice(1 + t.indexOf("?"), t.length).split("&")).length; r < o; r++) n = (e = (e = c[r]).split("="))[0],
49
+ var a = {}, s = [];
50
+ if (!utils.isEmpty(t) && t.length > 1) for (o = 0, r = (s = t.slice(1 + t.indexOf("?"), t.length).split("&")).length; o < r; o++) n = (e = (e = s[o]).split("="))[0],
51
51
  i = e[1], n in a ? (utils.isArray(a[n]) || (a[n] = [ a[n] ]), a[n].push(decodeURIComponent(i))) : a[n] = decodeURIComponent(i);
52
52
  return a;
53
53
  },
54
54
  paramSearch: function(t, n) {
55
55
  if (utils.isUndefined(n) || utils.isNull(n)) {
56
56
  if (n = window.location.search, utils.isUndefined(t) || utils.isNull(t)) {
57
- for (var e = n.substr(1, n.length - 1).split("&"), i = {}, r = 0; r < e.length; r++) {
58
- var o = e[r].split("=");
59
- 1 === o.length ? i[o[0]] = "" : 2 === o.length ? i[o[0]] = decodeURIComponent(o[1]) : console.log("there is something wrong when use [paramSearch]!");
57
+ for (var e = n.substr(1, n.length - 1).split("&"), i = {}, o = 0; o < e.length; o++) {
58
+ var r = e[o].split("=");
59
+ 1 === r.length ? i[r[0]] = "" : 2 === r.length ? i[r[0]] = decodeURIComponent(r[1]) : console.log("there is something wrong when use [paramSearch]!");
60
60
  }
61
61
  return i;
62
62
  }
@@ -71,14 +71,14 @@ var utils = require("./utils"), _LSFN = function() {
71
71
  getLocationParams: function() {
72
72
  var t, n, e = {}, i = window.location.href;
73
73
  if (!utils.isEmpty(i)) {
74
- var r = i.indexOf("?");
75
- if (r < -1) console.log("the location.href is invalid!"); else for (var o = (i = i.substr(r + 1)).split("&"), a = 0; a < o.length; a++) (r = o[a].indexOf("=")) > 0 && (t = o[a].substring(0, r),
76
- n = o[a].substr(r + 1), e[t] = decodeURIComponent(n));
74
+ var o = i.indexOf("?");
75
+ if (o < -1) console.log("the location.href is invalid!"); else for (var r = (i = i.substr(o + 1)).split("&"), a = 0; a < r.length; a++) (o = r[a].indexOf("=")) > 0 && (t = r[a].substring(0, o),
76
+ n = r[a].substr(o + 1), e[t] = decodeURIComponent(n));
77
77
  }
78
78
  return e;
79
79
  },
80
80
  getLocationParamByName: function(t) {
81
- var n = new RegExp("(^|&)" + t + "=([^&]*)(&|$)"), e = window.location.search.substr(1).match(n);
81
+ var n = new RegExp("(^|&?)".concat(t, "=([^&]*)(&|$)")), e = window.location.search.substr(1).match(n);
82
82
  return null != e ? decodeURIComponent(e[2]) : null;
83
83
  },
84
84
  getParameter: function(t, n) {
@@ -86,15 +86,36 @@ var utils = require("./utils"), _LSFN = function() {
86
86
  return i ? i[2] : "";
87
87
  },
88
88
  extractParam: function(t, n) {
89
- var e = new RegExp("(^|&?)".concat(n, "=([^&]*)(&|$)"), "i"), i = t.substr(1).match(e);
89
+ var e = new RegExp("(^|&?)".concat(n, "=([^&]*)(&|$)")), i = t.substr(1).match(e);
90
90
  return utils.isNil(i) ? null : decodeURIComponent(i[2]);
91
91
  },
92
- completeParam: function(t, n) {
93
- n || (n = window.location.href);
94
- var e = (Object.keys(t) || []).reduce((function(n, e) {
95
- return n += "&".concat(e, "=").concat(t[e]);
92
+ extractParams: function(t) {
93
+ var n, e, i = {}, o = t || window.location.href;
94
+ if (!utils.isEmpty(o)) {
95
+ var r = o.indexOf("?");
96
+ if (r < -1) console.log("the location.href is invalid!"); else for (var a = (o = o.substr(r + 1)).split("&"), s = 0; s < a.length; s++) (r = a[s].indexOf("=")) > 0 && (n = a[s].substring(0, r),
97
+ e = a[s].substr(r + 1), i[n] = decodeURIComponent(e));
98
+ }
99
+ return i;
100
+ },
101
+ extractParamAll: function(t) {
102
+ var n, e, i = arguments.length > 1 && void 0 !== arguments[1] && arguments[1], o = {}, r = t || window.location.href;
103
+ if (!utils.isEmpty(r)) {
104
+ var a = r.indexOf("?");
105
+ if (a < -1) console.log("the location.href is invalid!"); else for (var s = (r = r.substr(a + 1)).split("&"), l = 0; l < s.length; l++) (a = s[l].indexOf("=")) > 0 && (n = s[l].substring(0, a),
106
+ e = s[l].substr(a + 1), o[n] = i ? decodeURIComponent(e) : e);
107
+ }
108
+ return o;
109
+ },
110
+ completeParam: function(t, n, e) {
111
+ var i = arguments;
112
+ 1 === i.length ? n || (n = window.location.href) : 2 === i.length && utils.isBoolean(n) && (e = n,
113
+ n = window.location.href), utils.isUndefined(e) && (e = !1), n || (n = window.location.href);
114
+ var o = (Object.keys(t) || []).reduce((function(n, i) {
115
+ var o = t[i];
116
+ return e && (utils.isNull(o) || utils.isUndefined(o)) && (o = ""), n += "&".concat(i, "=").concat(o);
96
117
  }), "");
97
- return e ? (e = e.slice(1), -1 !== n.indexOf("?") ? n.endsWith("?") ? "".concat(n).concat(e) : "".concat(n, "&").concat(e) : "".concat(n, "?").concat(e)) : n;
118
+ return o ? (o = o.slice(1), -1 !== n.indexOf("?") ? n.endsWith("?") ? "".concat(n).concat(o) : "".concat(n, "&").concat(o) : "".concat(n, "?").concat(o)) : n;
98
119
  },
99
120
  LocationSearch: _LocationSearch,
100
121
  LSFN: _LSFN
package/lib/log.js CHANGED
@@ -1,23 +1,23 @@
1
1
  "use strict";
2
2
 
3
3
  var Logger = function() {
4
- var o = this, n = 0, i = 1, t = 2, r = 3, c = 4, g = 5, s = [ "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL" ];
5
- function l(n, i) {
4
+ var o = this, i = 0, n = 1, t = 2, r = 3, c = 4, g = 5, s = console, f = [ "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL" ];
5
+ function l(i, n) {
6
6
  var t = [];
7
- for (var r in t.push(n), i) t.push(i[r]);
7
+ for (var r in t.push(i), n) t.push(n[r]);
8
8
  o.log.apply(o, t);
9
9
  }
10
10
  this.log = function() {
11
- var o = arguments[0], n = o === c;
12
- if (o = arguments[0] = "[" + s[o] + "] ", window.LogConfig && window.LogConfig.isDebug && (console.log.apply(console, arguments),
13
- n)) try {
14
- var i = Array.prototype.slice.call(arguments);
15
- throw i = i.slice(1), new Error(i.join(","));
11
+ var o = arguments[0], i = o === c;
12
+ if (o = arguments[0] = "[" + f[o] + "] ", window.LogConfig && window.LogConfig.isDebug && (s.log.apply(s, arguments),
13
+ i)) try {
14
+ var n = Array.prototype.slice.call(arguments);
15
+ throw n = n.slice(1), new Error(n.join(","));
16
16
  } catch (o) {}
17
17
  }, this.trace = function() {
18
- this.log && l(n, arguments);
19
- }, this.debug = function() {
20
18
  this.log && l(i, arguments);
19
+ }, this.debug = function() {
20
+ this.log && l(n, arguments);
21
21
  }, this.info = function() {
22
22
  this.log && l(t, arguments);
23
23
  }, this.warn = function() {
@@ -26,9 +26,11 @@ var Logger = function() {
26
26
  this.log && l(c, arguments);
27
27
  }, this.fatal = function() {
28
28
  this.log && l(g, arguments);
29
+ }, this.clear = function() {
30
+ s.clear();
29
31
  }, this.pkgInfo = function(o) {
30
- var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "1.0.0", i = "%c " + (o = o || "unknown") + " %c v".concat(n = n || "1.0.0", " "), t = "padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #4e5950; font-weight: bold;", r = "padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #49c31b; font-weight: bold;";
31
- console.log(i, t, r);
32
+ var i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "1.0.0", n = "%c " + (o = o || "unknown") + " %c v".concat(i = i || "1.0.0", " "), t = "padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #4e5950; font-weight: bold;", r = "padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #49c31b; font-weight: bold;";
33
+ s.log(n, t, r);
32
34
  };
33
35
  };
34
36
 
@@ -148,7 +148,8 @@ var colorKeyWordsHexStr = {
148
148
  white: "#ffffff",
149
149
  whitesmoke: "#f5f5f5",
150
150
  yellow: "#ffff00",
151
- yellowgreen: "#9acd32"
151
+ yellowgreen: "#9acd32",
152
+ transparent: "rgba(0, 0, 0, 0)"
152
153
  };
153
154
 
154
155
  module.exports = colorKeyWordsHexStr;
@@ -17,8 +17,8 @@ var utils = require("./../utils"), colorKeyWordsHexStr = require("./_keyColor"),
17
17
  var l = r.replace(/#/, "").split("");
18
18
  if (6 === l.length) return r;
19
19
  if (3 === l.length) {
20
- for (var u = "#", i = 0; i < l.length; i += 1) u += l[i] + l[i];
21
- return u;
20
+ for (var a = "#", i = 0; i < l.length; i += 1) a += l[i] + l[i];
21
+ return a;
22
22
  }
23
23
  }, toHexColor = function(r) {
24
24
  if (isHexColor(r)) return r;
@@ -116,19 +116,127 @@ function gradientColor(r, e, t) {
116
116
  };
117
117
  }, n = o(r.from), s = o(r.to), l = function(r, e, t) {
118
118
  return Math.round(r + (e - r) * t / 100);
119
- }, u = function(r, e) {
119
+ }, a = function(r, e) {
120
120
  return null == e || e < 0 || "number" != typeof e ? r : (e = Math.round(e), Math.round(r * Math.pow(10, e)) / Math.pow(10, e));
121
121
  };
122
122
  return function(r) {
123
- var o = t == e ? 0 : (r.value - e) / (t - e), i = l(n.r, s.r, 100 * u(o, 2)), a = l(n.g, s.g, 100 * u(o, 2)), g = l(n.b, s.b, 100 * u(o, 2));
123
+ var o = t == e ? 0 : (r.value - e) / (t - e), i = l(n.r, s.r, 100 * a(o, 2)), u = l(n.g, s.g, 100 * a(o, 2)), g = l(n.b, s.b, 100 * a(o, 2));
124
124
  return strRGBA({
125
125
  r: i,
126
- g: a,
126
+ g: u,
127
127
  b: g
128
128
  });
129
129
  };
130
130
  }
131
131
 
132
+ var alphaHexMap = {
133
+ "1.00": "FF",
134
+ .99: "FC",
135
+ .98: "FA",
136
+ .97: "F7",
137
+ .96: "F5",
138
+ .95: "F2",
139
+ .94: "F0",
140
+ .93: "ED",
141
+ .92: "EB",
142
+ .91: "E8",
143
+ "0.90": "E6",
144
+ .89: "E3",
145
+ .88: "E0",
146
+ .87: "DE",
147
+ .86: "DB",
148
+ .85: "D9",
149
+ .84: "D6",
150
+ .83: "D4",
151
+ .82: "D1",
152
+ .81: "CF",
153
+ "0.80": "CC",
154
+ .79: "C9",
155
+ .78: "C7",
156
+ .77: "C4",
157
+ .76: "C2",
158
+ .75: "BF",
159
+ .74: "BD",
160
+ .73: "BA",
161
+ .72: "B8",
162
+ .71: "B5",
163
+ "0.70": "B3",
164
+ .69: "B0",
165
+ .68: "AD",
166
+ .67: "AB",
167
+ .66: "A8",
168
+ .65: "A6",
169
+ .64: "A3",
170
+ .63: "A1",
171
+ .62: "9E",
172
+ .61: "9C",
173
+ "0.60": "99",
174
+ .59: "96",
175
+ .58: "94",
176
+ .57: "91",
177
+ .56: "8F",
178
+ .55: "8C",
179
+ .54: "8A",
180
+ .53: "87",
181
+ .52: "85",
182
+ .51: "82",
183
+ "0.50": "80",
184
+ .49: "7D",
185
+ .48: "7A",
186
+ .47: "78",
187
+ .46: "75",
188
+ .45: "73",
189
+ .44: "70",
190
+ .43: "6E",
191
+ .42: "6B",
192
+ .41: "69",
193
+ "0.40": "66",
194
+ .39: "63",
195
+ .38: "61",
196
+ .37: "5E",
197
+ .36: "5C",
198
+ .35: "59",
199
+ .34: "57",
200
+ .33: "54",
201
+ .32: "52",
202
+ .31: "4F",
203
+ "0.30": "4D",
204
+ .29: "4A",
205
+ .28: "47",
206
+ .27: "45",
207
+ .26: "42",
208
+ .25: "40",
209
+ .24: "3D",
210
+ .23: "3B",
211
+ .22: "38",
212
+ .21: "36",
213
+ "0.20": "33",
214
+ .19: "30",
215
+ .18: "2E",
216
+ .17: "2B",
217
+ .16: "29",
218
+ .15: "26",
219
+ .14: "24",
220
+ .13: "21",
221
+ .12: "1F",
222
+ .11: "1C",
223
+ "0.10": "1A",
224
+ .09: "17",
225
+ .08: "14",
226
+ .07: "12",
227
+ .06: "0F",
228
+ .05: "0D",
229
+ .04: "0A",
230
+ .03: "08",
231
+ .02: "05",
232
+ .01: "03",
233
+ "0.00": "00"
234
+ };
235
+
236
+ function toHexAlphaColor(r, e) {
237
+ return 1 === e ? r : void 0 !== e && e < 1 ? "".concat(r).concat(alphaHexMap[e.toFixed(2)]).toLowerCase() : r;
238
+ }
239
+
132
240
  module.exports = {
133
241
  toStringHexColor: toStringHexColor,
134
242
  toHexColor: toHexColor,
@@ -140,5 +248,6 @@ module.exports = {
140
248
  rgb2object: rgb2object,
141
249
  objRGB2str: objRGB2str,
142
250
  keyColorToHex: keyColorToHex,
143
- gradientColor: gradientColor
251
+ gradientColor: gradientColor,
252
+ toHexAlphaColor: toHexAlphaColor
144
253
  };
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ var pow = function(t) {
4
+ return Math.pow(10, t);
5
+ };
6
+
7
+ module.exports = function(t, e) {
8
+ var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0;
9
+ if (!parseInt(r) != r) {
10
+ var o, n, p = 0, a = t.toString(), u = e.toString(), c = 0;
11
+ try {
12
+ c = a.split(".")[1].length || 0;
13
+ } catch (t) {
14
+ c = 0;
15
+ }
16
+ p += c;
17
+ try {
18
+ o = u.split(".")[1].length || 0;
19
+ } catch (t) {
20
+ o = 0;
21
+ }
22
+ return n = (p += o) > r ? Math.round(Number(a.replace(".", "")) * Number(u.replace(".", "")) / pow(p - r)) / pow(r) : p <= r ? (Number(a.replace(".", "")) * Number(u.replace(".", "")) / pow(p)).toFixed(r) : (t * e).toFixed(r),
23
+ Number(n);
24
+ }
25
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amos-tool",
3
- "version": "1.4.12",
3
+ "version": "1.4.15",
4
4
  "description": "amos ui tool",
5
5
  "main": "index.js",
6
6
  "directories": {