Package Exports
- mu.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 (mu.js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
µ.js is the new $
This package is top secret and should not be used by anybody under any circumstances.
/* Initialize jQuery on remote document */
let µ = require('mu.js')
µ('http://example.com/').then($ => {
// $ = cheerio (jQuery)
})/* From local file */
µ.fromFile('page.html').then($ => {
console.log(
$('title').text()
)
})/* From local file ynchronously */
let $ = µ.fromFileSync('/var/www/index.html')
$('h2').each(function() { /* make text red in every <h2> */
$(this).css('color', 'red')
})/* From a string */
let $ = µ.fromString('<div><h2>hoi</h2></div>') // does not even require <html></html>