0.0.5 • Published 3 years ago

@mudas/env v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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 }
});
0.0.5

3 years ago

0.0.3

3 years ago

0.0.4

3 years ago

0.0.2

4 years ago

0.0.1

4 years ago