Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

wsemi

1.5.37 • Public • Published

wsemi

A support package for web developer.

language npm version Build Status license gzip file size npm download jsdelivr download

Documentation

To view documentation or get support, visit docs.

Example

To view some examples for more understanding, visit examples:

lodash: ex-lodash.html [source code]

dayjs: ex-dayjs.html [source code]

dayjs: ex-timeTZ2expire-timeTZ2past.html [source code]

cryptojs: ex-cryptojs.html [source code]

fuzzball: ex-fuzzball.html [source code]

fuzzball[dynamic import]: ex-fuzzball-dynamic.html [source code]

tinycolor: ex-tinycolor.html [source code]

uaparser: ex-uaparser.html [source code]

uaparser[dynamic import]: ex-uaparser-dynamic.html [source code]

xss: ex-xss.html [source code]

openlink: ex-openlink.html [source code]

tippyjs[with popper.js]: ex-tippyjs.html [source code]

xlsx: ex-xlsx.html [source code]

xlsx[dynamic import]: ex-xlsx-dynamic [source code]

viewerjs: ex-viewerjs.html [source code]

viewerjs[dynamic import]: ex-viewerjs-dynamic.html [source code]

html2canvas: ex-html2canvas.html [source code]

html2canvas[dynamic import]: ex-html2canvas-dynamic.html [source code]

Installation

Using npm(ES6 module):

Note: wsemi depends on lodash, eventemitter3, crypto-js, dayjs, fuzzball, ua-parser-js, xss, xlsx and tippy.js.

npm i wsemi

In a browser(UMD module):

Note: umd file includes with lodash, crypto-js and tippy.js, by using tree-shaking for dead-code elimination.

[Optional] Add script with nomodule for IE11.

<script nomodule src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.11.5/polyfill.min.js"></script>

[Optional] Add script for dayjs(or moment).

Note: Include script when use some function of time. If include moment, need set moment to window.dayjs (ex: window.dayjs = moment), and put it before include script for wsemi.umd.js.

<script src="https://cdn.jsdelivr.net/npm/dayjs/dayjs.min.js"></script>

or

<script src="https://cdn.jsdelivr.net/npm/moment/moment.min.js"></script>
<script>
  window.dayjs = moment
</script>

[Optional] Add script for fuzzball.

Note: include script when use strFindFuzz function, and don't need include script when use strFindFuzzDyn function.

<script src="https://cdn.jsdelivr.net/npm/fuzzball/dist/fuzzball.umd.min.js"></script>

[Optional] Add script for ua-parser-js.

Note: include script when use getUserAgent function, and don't need include script when use getUserAgentDyn function.

<script src="https://cdn.jsdelivr.net/npm/ua-parser-js/dist/ua-parser.min.js"></script>

[Optional] Add script for xss.

Note: include script when use clearXSS function.

<script src="https://rawgit.com/leizongmin/js-xss/master/dist/xss.js"></script>

[Optional] Add script for xlsx.

Note: include script when use downloadExcelFileFromData or getDataFromExcelFileU8Arr function, and don't need include script when use downloadExcelFileFromDataDyn or getDataFromExcelFileU8ArrDyn function.

<script src="https://cdn.jsdelivr.net/npm/xlsx/dist/xlsx.full.min.js"></script>

[Optional] Add link and script for viewerjs.

Note: include script when use showImages function, and don't need include script when use showImagesDyn function.

<link href="https://cdn.jsdelivr.net/npm/viewerjs/dist/viewer.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/viewerjs/dist/viewer.min.js"></script>

[Optional] Add script for html2canvas.

Note: include script when use html2pic function, and don't need include script when use html2picDyn function.

<script src="https://cdn.jsdelivr.net/npm/html2canvas@1.0.0-rc.5/dist/html2canvas.min.js"></script>

[Necessary] Add script for wsemi.

<script src="https://cdn.jsdelivr.net/npm/wsemi@1.5.37/dist/wsemi.umd.js"></script>

Install

npm i wsemi

DownloadsWeekly Downloads

409

Version

1.5.37

License

MIT

Unpacked Size

9.43 MB

Total Files

830

Last publish

Collaborators

  • avatar