npm

  • npms to search npm

npm modules

npm package description
accounting accounting
AR Augmented Reality on the browser
async sema rate limiting
babel-plugin-module-resolver resolves imports
common-tags string templates tags
dataloader caching for HTTP requests
date-fns like momentJS but modern
dinero currency library
faker generates mock data
fast-cli Netflix speedtest
fast-csv parse CVS
feather-icons svg icons
flatorize Linear algebra library that supports intensive computations in JS
frappe-charts charts
greenlet webworker like workerize
google-libphonenumber phoneNumber library
html-pdf convert html to pdf
inquirer CLI GUI tools
jimp image processor for nodejs
luma from Uber. WebGL visualization
luxon momentjs replacement
maptalks 3D/2D map
mathJS evaluate mathematical expressions
nano ID short UUID
npm-license generates a flat list of npm modules and their licenses
oy E-mail templates with React
progress Progress bar for CLI
nps scripts for package json
react-vis charts from Uber. In react
rough Build handdrawn-like shapes
RythmJS make webpage dance
serve-favicon to serve dynamic favicons
SheetJS spreadsheet renderer
scrollama fire scroll events
strapdown markdown renderer
tesseract OCR in 62 languages
uuid generate UUID
ua-parser to parse UA Clients
webpack monitor webpack optimization tool
webtorrent torrents on the browser
workerize web worker
yup form object validation

How to write a UMD module

UMD (Universal Module Definition) patterns for JavaScript modules that work everywhere.

// Uses Node, AMD or browser globals to create a module.

// If you want something that will work in other stricter CommonJS environments,
// or if you need to create a circular dependency, see commonJsStrict.js

// Defines a module "returnExports" that depends another module called "b".
// Note that the name of the module is implied by the file name. It is best
// if the file name and the exported global have matching names.

// If the 'b' module also uses this type of boilerplate, then
// in the browser, it will create a global .b that is used below.

// If you do not want to support the browser global path, then you
// can remove the `root` use and the passing `this` as the first arg to
// the top function.

(function(root, factory) {
  if (typeof define === 'function' && define.amd) {
    // AMD. Register as an anonymous module.
    define(['b'], factory);
  } else if (typeof module === 'object' && module.exports) {
    // Node. Does not work with strict CommonJS, but
    // only CommonJS-like environments that support module.exports,
    // like Node.
    module.exports = factory(require('b'));
  } else {
    // Browser globals (root is window)
    root.returnExports = factory(root.b);
  }
})(this, function(b) {
  //use b in some fashion.

  // Just return a value to define the module export.
  // This example returns an object, but the module
  // can return a function as the exported value.
  return {};
});

// if the module has no dependencies, the above pattern can be simplified to
(function(root, factory) {
  if (typeof define === 'function' && define.amd) {
    // AMD. Register as an anonymous module.
    define([], factory);
  } else if (typeof module === 'object' && module.exports) {
    // Node. Does not work with strict CommonJS, but
    // only CommonJS-like environments that support module.exports,
    // like Node.
    module.exports = factory();
  } else {
    // Browser globals (root is window)
    root.returnExports = factory();
  }
})(this, function() {
  // Just return a value to define the module export.
  // This example returns an object, but the module
  // can return a function as the exported value.
  return {};
});

Easter Eggs

  • npm xmas
  • npm visnup
  • npm substack

results matching ""

    No results matching ""