@mudas/env
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

env

npm version

A plugin that supports Vue to dispatch global events.

Setup

install:

npm i @mudas/env -S

You need to add configuration for vue-cli to correctly translate the es module in node_modules:

// vue.config.js:
module.exports = {
    transpileDependencies: [
      '@mudas/*' // all of node_module for '@mudas'
    ]
}

Usage

import { parsingUserAgentEnv, parsingAppletEnv, parsingURLParams } from '@mudas/env';

// Applet ENV
parsingApplet({ ...parsingUserAgent(), ...parsingURLParams() }).then((data) => {
    // ... return types/EnvHolderType & { wechatApplet:boolean, alipayApplet:boolean }
});

/@mudas/env/

    Package Sidebar

    Install

    npm i @mudas/env

    Weekly Downloads

    1

    Version

    0.0.5

    License

    MIT

    Unpacked Size

    28 kB

    Total Files

    8

    Last publish

    Collaborators

    • mudas