# dmai-license

> dmai license

Latest version **1.0.0** (published 2023-08-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install dmai-license
pnpm add dmai-license
yarn add dmai-license
bun add dmai-license
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-08-16 |
| First published | 2023-08-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12.0.0 |
| Dependencies | 1 |
| Unpacked size | 13.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | jackson.chen |
| Maintainers | chenjianai |
| Keywords | dmai, license |

## Links

- npm: https://www.npmjs.com/package/dmai-license
- Repository: https://gitlab.dm-ai.cn/MIP/AIEP/calligraphy/dmai-license
- Homepage: https://gitlab.dm-ai.cn/MIP/AIEP/calligraphy/dmai-license.git
- Issues: https://gitlab.dm-ai.cn/MIP/AIEP/calligraphy/dmai-license/-/issues
- npm.io page: https://npm.io/package/dmai-license

## Dependencies (1)

- [systeminformation](https://npm.io/package/systeminformation.md) ^5.18.15

## Recent versions

- 1.0.0 (latest) — 2023-08-16

## README

# dmai-license

Dmai license service.

## Installing

### Package manager

Using npm:

```bash
$ npm install dmai-license --registry=https://nexus.dm-ai.com/repository/group-npm/
```

Using yarn:

```bash
$ yarn config set registry https://nexus.dm-ai.com/repository/group-npm/
$ yarn add dmai-license
```

Once the package is installed, you can import the library using `import` or `require` approach:

```js
import dmaiLicense, {activeLicense, isActived} from 'dmai-license';
```

You can also use the default export, since the named export is just a re-export from the Axios factory:

```js
import dmaiLicense from 'dmai-license';

console.log(dmaiLicense.activeLicense({ license: 'xxx' }));
````

If you use `require` for importing, **only default export is available**:

```js
const dmaiLicense = require('dmai-license');

console.log(dmaiLicense.activeLicense({ license: 'xxx' }));
```

## Example

```js
const { activeLicense, isActived } = require('dmai-license');

activeLicense({ license: 'xxx' })
  .then(function (response) {
    // handle success
    console.log(response);
  })
  .catch(function (error) {
    // handle error
    console.log(error);
  })
  .finally(function () {
    // always executed
  });

isActived()
  .then(function (response) {
    // handle success
    console.log(response);
  })
  .catch(function (error) {
    // handle error
    console.log(error);
  })
  .finally(function () {
    // always executed
  });

// Want to use async/await? Add the `async` keyword to your outer function/method.
async function mainAL() {
  try {
    const response = await activeLicense({ license: 'xxx' });
    console.log(response);
  } catch (error) {
    console.error(error);
  }
}

async function mainIA() {
  try {
    const response = await isActived();
    console.log(response);
  } catch (error) {
    console.error(error);
  }
}

```

## Release notes

### 1.0.0 (2023-08-16)

Release dmai license service!

---
_Source: https://npm.io/package/dmai-license · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
