deps-object
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -19,6 +19,12 @@ 'use strict'; | ||
var _promiseFp = require('./promise-fp'); | ||
var _pinkiePromise = require('pinkie-promise'); | ||
var _pinkiePromise2 = _interopRequireDefault(_pinkiePromise); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var reject = _pinkiePromise2.default.reject.bind(_pinkiePromise2.default); | ||
var resolve = _pinkiePromise2.default.resolve.bind(_pinkiePromise2.default); | ||
var all = _pinkiePromise2.default.all.bind(_pinkiePromise2.default); | ||
// depObject :: String -> Object | ||
@@ -36,9 +42,9 @@ var depObject = _ramda2.default.pipe(_ramda2.default.split('@'), _ramda2.default.apply(_ramda2.default.objOf)); | ||
// saveToDeps :: Array[String] -> Object | ||
var saveToDeps = _ramda2.default.pipeP(_promiseFp.resolve, _ramda2.default.unless(_ramda2.default.is(Array), function () { | ||
return (0, _promiseFp.reject)('deps should be an Array[String]'); | ||
var saveToDeps = _ramda2.default.pipeP(resolve, _ramda2.default.unless(_ramda2.default.is(Array), function () { | ||
return reject('deps should be an Array[String]'); | ||
}), _ramda2.default.unless(_ramda2.default.all(_ramda2.default.is(String)), function () { | ||
return (0, _promiseFp.reject)('deps should be an Array[String]'); | ||
}), _ramda2.default.map(completeDep), _promiseFp.all, _ramda2.default.mergeAll, _sortedObject2.default); | ||
return reject('deps should be an Array[String]'); | ||
}), _ramda2.default.map(completeDep), all, _ramda2.default.mergeAll, _sortedObject2.default); | ||
exports.default = saveToDeps; | ||
module.exports = exports['default']; |
{ | ||
"name": "deps-object", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Transform dependencies Array into an Object", | ||
@@ -5,0 +5,0 @@ "main": "index.es5.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4943
32