mkconstants
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -1,15 +0,25 @@ | ||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.mkconstants = f()}})(function(){var define,module,exports;return (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){ | ||
"use strict"; | ||
var mkconstants = function (app, obj, prevK) { | ||
for (var k in obj) { | ||
var nextK = "" + (prevK ? prevK : app) + "." + k; | ||
if (obj[k] === null) obj[k] = nextK;else if (typeof obj[k] === "object") mkconstants(app, obj[k], nextK); | ||
(function (global, factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(['exports', 'module'], factory); | ||
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') { | ||
factory(exports, module); | ||
} else { | ||
var mod = { | ||
exports: {} | ||
}; | ||
factory(mod.exports, mod); | ||
global.mkconstants = mod.exports; | ||
} | ||
return obj; | ||
}; | ||
})(this, function (exports, module) { | ||
'use strict'; | ||
module.exports = mkconstants; | ||
var mkconstants = function mkconstants(app, obj, prevK) { | ||
for (var k in obj) { | ||
var nextK = (prevK ? prevK : app) + '.' + k; | ||
if (obj[k] === null) obj[k] = nextK;else if (typeof obj[k] === 'object') mkconstants(app, obj[k], nextK); | ||
} | ||
return obj; | ||
}; | ||
},{}]},{},[1])(1) | ||
}); | ||
module.exports = mkconstants; | ||
}); |
{ | ||
"name": "mkconstants", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A utility function for recursively building an object of constants.", | ||
"main": "mkconstants.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build": "node node_modules/browserify/bin/cmd.js -t babelify src/mkconstants.js -s mkconstants > mkconstants.js" | ||
"build": "babel --modules umd -o mkconstants.js --loose all src/mkconstants.js", | ||
"update-authors": "git log --format='%aN <%aE>' | sort -u | grep -v noreply > AUTHORS", | ||
"prepublish": "npm run build; npm run update-authors" | ||
}, | ||
@@ -25,6 +26,7 @@ "repository": { | ||
"devDependencies": { | ||
"babel-core": "^4.6.5", | ||
"babelify": "^5.0.3", | ||
"browserify": "^9.0.3" | ||
"babel": "^5.6.14", | ||
"babel-eslint": "^3.1.23", | ||
"eslint": "^0.24.0", | ||
"eslint-plugin-react": "^2.6.4" | ||
} | ||
} |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
7
31
1
0
4066
4