JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q30917F
  • License MIT

Collection of common JavaScript / TypeScript utilities for browsers

Package Exports

  • @browsers/monorepo
  • @browsers/monorepo/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@browsers/monorepo) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@browsers/monorepo

Some simple utilities for browsers

NPM version Codacy Badge License

Sonar

Function list

  • A simple function for load js/image/css/style: load-source
  • A simple function for mounting css: mount-css
  • A simple function for mounting javascript: mount-script
  • A simple function for mounting image: mount-image
  • A simple function for mounting css style codes: mount-style

Install

e.g: use load-source

# by pnpm
pnpm install load-source

# by npm
npm install -D load-source

# by yarn
yarn add load-source

Usage

General use

import loadSource from 'load-source'

loadSource('js/image/css/style', options)
  1. by require
const loadSource = require('load-source')

loadSource('js/image/css/style', options)

Use CDN resource

<!-- head -->
<script src="https://unpkg.com/load-source@1.2.0/dist/index.global.prod.js"></script>

Issues & Support

Please open an issue here.

License

MIT