├── .eslintignore
├── demo
├── index.md
├── gallery.md
├── assets
│ ├── css
│ │ └── demo.css
│ ├── js
│ │ └── demo.js
│ └── html
│ │ └── demo.html
├── _config.yml
├── _includes
│ ├── header.html
│ ├── facebook.html
│ ├── promo.html
│ ├── head.html
│ └── footer.html
├── _data
│ └── egjs.yml
├── common
│ ├── css
│ │ ├── gallery.css
│ │ ├── monokai.css
│ │ ├── page.css
│ │ └── font-awesome.min.css
│ ├── image
│ │ ├── logo_mono.svg
│ │ ├── type_white.svg
│ │ ├── logo_mono_black.svg
│ │ ├── type_black.svg
│ │ ├── cp-arrow-right.svg
│ │ └── logo.svg
│ └── js
│ │ ├── app.js
│ │ └── bootstrap.min.js
├── demo.md
├── _layouts
│ ├── gallery.html
│ └── page.html
└── started.md
├── test
├── node
│ └── node.js
├── manual
│ └── index.html
└── unit
│ ├── userAgentData.spec.ts
│ ├── userAgent.spec.ts
│ └── userAgentDataConsts.ts
├── global.d.ts
├── .github
├── PULL_REQUEST_TEMPLATE.md
├── ISSUE_TEMPLATE.md
└── stale.yml
├── src
├── index.umd.ts
├── userAgent.ts
├── agent.ts
├── types.ts
├── userAgentData.ts
├── presets.ts
└── utils.ts
├── tsconfig.declaration.json
├── .travis.yml
├── .editorconfig
├── .npmignore
├── jest.config.js
├── tsconfig.json
├── .eslintrc
├── rollup.config.js
├── config
├── commit.template
└── validate-commit-msg.js
├── LICENSE
├── NOTICE
├── jsdoc.json
├── package.json
├── CONTRIBUTING.md
├── .gitignore
└── README.md
/.eslintignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist
3 | *.js
4 |
--------------------------------------------------------------------------------
/demo/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | ---
4 |
--------------------------------------------------------------------------------
/demo/gallery.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: gallery
3 | ---
4 |
--------------------------------------------------------------------------------
/demo/assets/css/demo.css:
--------------------------------------------------------------------------------
1 | /** css **/
2 | .useragent-input {
3 | width: 100%;
4 | }
5 |
--------------------------------------------------------------------------------
/test/node/node.js:
--------------------------------------------------------------------------------
1 | const cjs = require("../../dist/agent.cjs");
2 |
3 | console.log("success", cjs());
4 |
--------------------------------------------------------------------------------
/demo/_config.yml:
--------------------------------------------------------------------------------
1 | # Build settings
2 | source: demo
3 | destination: demo/_site
4 | exclude: [started.md, demo.md]
5 | markdown: kramdown
--------------------------------------------------------------------------------
/global.d.ts:
--------------------------------------------------------------------------------
1 | import { NavigatorUAData } from "./src/types";
2 |
3 | declare global {
4 | interface Navigator {
5 | userAgentData: NavigatorUAData;
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## Issue
2 |
3 |
4 | ## Details
5 |
6 |
--------------------------------------------------------------------------------
/src/index.umd.ts:
--------------------------------------------------------------------------------
1 | import agent, * as modules from "./agent";
2 |
3 | for (const name in modules) {
4 | (agent as any)[name] = (modules as any)[name];
5 | }
6 |
7 | export default agent;
8 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## Description
2 |
3 |
4 | ## Steps to check or reproduce
5 |
6 |
--------------------------------------------------------------------------------
/tsconfig.declaration.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig",
3 | "compilerOptions": {
4 | "removeComments": true,
5 | "declaration": true,
6 | "emitDeclarationOnly": true,
7 | "declarationDir": "declaration"
8 | },
9 | "include": [
10 | "./src/**/*.ts",
11 | "./global.d.ts",
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - "12"
4 | dist: trusty
5 | sudo: required
6 | install:
7 | - npm install
8 | addons:
9 | chrome: stable
10 | cache:
11 | directories:
12 | - "node_modules"
13 | before_script:
14 | - npm run lint
15 | script:
16 | - npm run coverage
17 | after_success:
18 | - npm run coveralls
19 |
--------------------------------------------------------------------------------
/demo/_includes/header.html:
--------------------------------------------------------------------------------
1 |
2 |
{{ site.data.egjs.desc }}
9 | {{ site.data.egjs.hashtag }}
10 |