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

amd-module

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amd-module - npm Package Compare versions

Comparing version 0.0.20151127 to 0.0.20151203

.spmignore

37

dist/define.js

@@ -166,2 +166,3 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

},{"./Module":1,"zero-lang/array":4,"zero-lang/type":8}],3:[function(require,module,exports){
'use strict';

@@ -172,4 +173,2 @@ /* jshint node: true, esnext: true, loopfunc: true, undef: true, unused: true */

'use strict';
var arrayUtils = require('zero-lang/array');

@@ -238,6 +237,8 @@

},{"zero-lang/array":4}],4:[function(require,module,exports){
'use strict';
function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; }
/* jshint esnext: true, loopfunc: true */
'use strict';
var checkType = require('./type');

@@ -251,3 +252,3 @@ var numberUtils = require('./number');

function isArrayLike(arr) {
return typeof arr === 'object' && numberUtils.isFinite(arr.length);
return (typeof arr === 'undefined' ? 'undefined' : _typeof(arr)) === 'object' && numberUtils.isFinite(arr.length);
}

@@ -502,16 +503,18 @@ function toArray(arr) {

(function (global){
'use strict';
function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; }
/* jshint node: true, esnext: true, loopfunc: true, undef: true, unused: true */
/* global window, global, self */
'use strict';
var undefStr = 'undefined';
module.exports = typeof window !== undefStr ? window : typeof global !== undefStr ? global : typeof self !== undefStr ? self : {};
module.exports = (typeof window === 'undefined' ? 'undefined' : _typeof(window)) !== undefStr ? window : (typeof global === 'undefined' ? 'undefined' : _typeof(global)) !== undefStr ? global : (typeof self === 'undefined' ? 'undefined' : _typeof(self)) !== undefStr ? self : {};
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],6:[function(require,module,exports){
'use strict';
/* jshint esnext: true, loopfunc: true */
'use strict';
var checkType = require('./type');

@@ -569,6 +572,6 @@

},{"./type":8}],7:[function(require,module,exports){
'use strict';
/* jshint node: true, esnext: true, loopfunc: true, undef: true, unused: true */
'use strict';
var checkType = require('./type');

@@ -693,6 +696,8 @@ var getType = checkType.getType;

},{"./array":4,"./type":8}],8:[function(require,module,exports){
'use strict';
function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; }
/* jshint esnext: true, loopfunc: true */
'use strict';
var toString = ({}).toString;

@@ -711,3 +716,3 @@ var isType = function isType(obj, type) {

isArrayLike: function isArrayLike(obj) {
return typeof obj === 'object' && isFinite(obj.length);
return (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && isFinite(obj.length);
},

@@ -750,3 +755,3 @@ isBoolean: function isBoolean(obj) {

isObject: function isObject(obj) {
var type = typeof obj;
var type = typeof obj === 'undefined' ? 'undefined' : _typeof(obj);
return type === 'function' || type === 'object' && !!obj;

@@ -753,0 +758,0 @@ }

@@ -281,2 +281,3 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

},{"./Module":1,"./define":2,"./path":10,"./request":11,"zero-lang/array":5,"zero-lang/type":9}],4:[function(require,module,exports){
'use strict';

@@ -287,4 +288,2 @@ /* jshint node: true, esnext: true, loopfunc: true, undef: true, unused: true */

'use strict';
var arrayUtils = require('zero-lang/array');

@@ -353,6 +352,8 @@

},{"zero-lang/array":5}],5:[function(require,module,exports){
'use strict';
function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; }
/* jshint esnext: true, loopfunc: true */
'use strict';
var checkType = require('./type');

@@ -366,3 +367,3 @@ var numberUtils = require('./number');

function isArrayLike(arr) {
return typeof arr === 'object' && numberUtils.isFinite(arr.length);
return (typeof arr === 'undefined' ? 'undefined' : _typeof(arr)) === 'object' && numberUtils.isFinite(arr.length);
}

@@ -617,16 +618,18 @@ function toArray(arr) {

(function (global){
'use strict';
function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; }
/* jshint node: true, esnext: true, loopfunc: true, undef: true, unused: true */
/* global window, global, self */
'use strict';
var undefStr = 'undefined';
module.exports = typeof window !== undefStr ? window : typeof global !== undefStr ? global : typeof self !== undefStr ? self : {};
module.exports = (typeof window === 'undefined' ? 'undefined' : _typeof(window)) !== undefStr ? window : (typeof global === 'undefined' ? 'undefined' : _typeof(global)) !== undefStr ? global : (typeof self === 'undefined' ? 'undefined' : _typeof(self)) !== undefStr ? self : {};
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],7:[function(require,module,exports){
'use strict';
/* jshint esnext: true, loopfunc: true */
'use strict';
var checkType = require('./type');

@@ -684,6 +687,6 @@

},{"./type":9}],8:[function(require,module,exports){
'use strict';
/* jshint node: true, esnext: true, loopfunc: true, undef: true, unused: true */
'use strict';
var checkType = require('./type');

@@ -808,6 +811,8 @@ var getType = checkType.getType;

},{"./array":5,"./type":9}],9:[function(require,module,exports){
'use strict';
function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; }
/* jshint esnext: true, loopfunc: true */
'use strict';
var toString = ({}).toString;

@@ -826,3 +831,3 @@ var isType = function isType(obj, type) {

isArrayLike: function isArrayLike(obj) {
return typeof obj === 'object' && isFinite(obj.length);
return (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && isFinite(obj.length);
},

@@ -865,3 +870,3 @@ isBoolean: function isBoolean(obj) {

isObject: function isObject(obj) {
var type = typeof obj;
var type = typeof obj === 'undefined' ? 'undefined' : _typeof(obj);
return type === 'function' || type === 'object' && !!obj;

@@ -868,0 +873,0 @@ }

{
"name": "amd-module",
"title": "amd-module",
"description": "",
"homepage": "https://github.com/leungwensen/amd-module",
"version": "0.0.20151127",
"main": "define.js",
"license": "MIT",
"author": {
"description": "team of amd-module",
"url": "https://github.com/leungwensen/amd-module/graphs/contributors"
},
"bugs": {
"url": "https://github.com/leungwensen/amd-module/issues"
},
"dependencies": {
"babel-preset-es2015": "*",
"zero-encoding": "*",
"zero-events": "*",
"zero-fmt": "*",
"zero-lang": "*"
},
"devDependencies": {
},
"engines": {
"node": ">=0.8.0"
},
"keywords": [
"amd",
"amd-module",
"define"
],
"repository": {
"type": "https",
"url": "https://github.com/leungwensen/amd-module.git"
},
"scripts": {
}
"name": "amd-module",
"title": "amd-module",
"description": "",
"homepage": "https://github.com/leungwensen/amd-module",
"version": "0.0.20151203",
"main": "define.js",
"license": "MIT",
"author": {
"description": "team of amd-module",
"url": "https://github.com/leungwensen/amd-module/graphs/contributors"
},
"bugs": {
"url": "https://github.com/leungwensen/amd-module/issues"
},
"dependencies": {
"zero-encoding": "^0.0.20151202",
"zero-events": "^0.0.20151202",
"zero-fmt": "^0.0.20151202",
"zero-lang": "^0.0.20151202"
},
"devDependencies": {
"babel-preset-es2015": "^6.1.18"
},
"engines": {
"node": ">=0.8.0"
},
"keywords": [
"amd",
"amd-module",
"define"
],
"repository": {
"type": "https",
"url": "https://github.com/leungwensen/amd-module.git"
},
"spm": {
"main": "define.js",
"dependencies": {
"zero-encoding": "^0.0.20151202",
"zero-events": "^0.0.20151202",
"zero-fmt": "^0.0.20151202",
"zero-lang": "^0.0.20151202"
}
}
}

@@ -0,1 +1,2 @@

# amd-module

@@ -5,5 +6,41 @@

## installation
```shell
npm install amd-module --save
```
## usage
in
### browser
#### standalone mode
```html
<script src="$path/to/this/package/dist/loader.js"></script>
```
#### using with CommonJS
```javascript
require('amd-module/loader'); // then the 'define' function is available
```
here is a [demo](https://github.com/leungwensen/amd-module/tree/master/demo)
### nodejs (no loader available for now, not recomended)
```javascript
var define = require('amd-module/define');
define('my/awesome/amd/module', [
'amd-module/Module'
], function(
Module
) {
Module.on('module-meta-got', function(meta){
console.log(meta);
});
});
```

Sorry, the diff of this file is not supported yet

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