Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zepto-modules

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zepto-modules

Zepto in CommonJS modules

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
133
increased by20.91%
Maintainers
1
Weekly downloads
 
Created
Source

zepto-modules

Zepto (zepto@28.09.2016 - 1.2.0) in CommonJS modules

Installation

$ npm install --save zepto-modules

Usage

Configs (recommended):

// default config (zepto, event, ajax, form, ie)
var $ = require('zepto-modules');
// or
//var $ = require('zepto-modules/_default');

// --------------------------------

// custom config (zepto, event, form, ie, detect, data, touch, stack)
var $ = require('zepto-modules/_custom');

// --------------------------------

// min config (zepto, event, ie, stack)
var $ = require('zepto-modules/_min');

// --------------------------------

// write your own (./my-zepto)

var $ = require('zepto-modules/zepto');

require('zepto-modules/event');
require('zepto-modules/ajax');
require('zepto-modules/form');
require('zepto-modules/ie');

module.exports = $;

// later
var $ = require('./my-zepto');

When-you-need-it ™:

var $ = require('zepto-modules/zepto');
var each = require('cmnjs/each');

// these modules (singleton) extend zepto with methods which are available everywhere in your modules
require('zepto-modules/event');
require('zepto-modules/ie'); // kinda important

// rest of module

You can extend configs:

var $ = require('zepto-modules/_custom');

require('zepto-modules/ajax')

$.ajax({
  type: 'GET',
  url: '/projects',
  success: function(data) {
    // do sth
  }
});

ES6

import $ from 'zepto-modules';
// or
// import $ from 'zepto-modules/_default';

Changelog

View on github.

Keywords

FAQs

Package last updated on 01 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc