This package has been deprecated

Author message:

WARNING: This project has been renamed to transpile-for-browser. Install using transpile-for-browser instead.

user-agent-to-browserlist

0.1.0 • Public • Published

transpile-for-browser

Let's you transpile code based on the user-agent

Modern browsers seldom need to transpile much of the code we need. This library lets you transpile only the minimum of what you need for the specify browser.

import { transform } from "transpile-for-browser";
const userAgent =
  "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36";
const arrowFunctionCode = "() => console.log('testing arrrow function')";
const code = transform(userAgent, arrowFunctionCode);

uses babel ❤️, babel-preset-env and ua-parser-js

Missing

  • No minifing

Module bundler

This is not a module bundler, it only takes in one file and transpile it. If you are not sure if you should use this, Check out webpack, parcel and rollup

Readme

Keywords

Package Sidebar

Install

npm i user-agent-to-browserlist

Weekly Downloads

2

Version

0.1.0

License

ISC

Last publish

Collaborators

  • sindresvendby