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

getcontributors

Package Overview
Dependencies
Maintainers
2
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

getcontributors - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

31

es2015/index.js

@@ -18,5 +18,5 @@ 'use strict';

/**
Compare two contributor entities for sorting in an array
@param {Contributor} a
@param {Contributor} b
Compare the name param of two objects for sorting in an array
@param {Object} a
@param {Object} b
@return {number} either 0, -1, or 1

@@ -27,3 +27,3 @@ @access private

function contributorsComparator(a, b) {
function nameComparator(a, b) {
var A = a.name.toLowerCase();

@@ -64,3 +64,3 @@ var B = b.name.toLowerCase();

A class as it contains a config object, as well as a contributorsMap object.
A class as it contains a config object, as well as a `contributorsMap` object.

@@ -71,3 +71,3 @@ Configuration details can be found in the constructor definition.

The contributorsMap object is used to prevent duplicates when fetching contributor data, and to merge data together in case some was missing somewhere but provided elsewhere.
The `contributorsMap` object is used to prevent duplicates when fetching contributor data, and to merge data together in case some was missing somewhere but provided elsewhere.

@@ -161,2 +161,5 @@ Contributors have the following properties:

// =================================
// Add
/**

@@ -200,2 +203,5 @@ Add a contributor to the internal listing and finish preparing it

// =================================
// Format
/**

@@ -307,3 +313,3 @@ Prepare a contributor by setting and determing some defaults

this.log('debug', 'Preparing the ' + contributors.length + ' contributors for the final time');
contributors = contributors.map(this.prepareContributorFinale.bind(this)).sort(contributorsComparator);
contributors = contributors.map(this.prepareContributorFinale.bind(this)).sort(nameComparator);

@@ -314,2 +320,5 @@ // Return

// =================================
// Fetch
/**

@@ -320,3 +329,3 @@ Fetch Contributors from Usernames

@param {Error} [next.error] - if the procedure failed, this is the error instance, otherwise `null`
@param {Array} [next.result] - if the procedure succedeed, this is the array of contributors
@param {Array} [next.result] - if the procedure succeeded, this is the array of contributors
@chainable

@@ -362,3 +371,3 @@ @returns {this}

@param {Error} [next.error] - if the procedure failed, this is the error instance, otherwise `null`
@param {Array} [next.result] - if the procedure succedeed, this is the array of contributors
@param {Array} [next.result] - if the procedure succeeded, this is the array of contributors
@chainable

@@ -424,3 +433,3 @@ @returns {this}

@param {Error} [next.error] - if the procedure failed, this is the error instance, otherwise `null`
@param {Array} [next.result] - if the procedure succedeed, this is the array of contributors
@param {Array} [next.result] - if the procedure succeeded, this is the array of contributors
@chainable

@@ -507,3 +516,3 @@ @returns {this}

@param {Error} [next.error] - if the procedure failed, this is the error instance, otherwise `null`
@param {Array} [next.result] - if the procedure succedeed, this is the array of contributors
@param {Array} [next.result] - if the procedure succeeded, this is the array of contributors
@chainable

@@ -510,0 +519,0 @@ @returns {this}

# History
## v1.4.2 2017 February 27
- Updated dependencies
## v1.4.1 2017 February 24

@@ -4,0 +7,0 @@ - Fixed rate limit errors not being caught

{
"title": "Get Contributors",
"name": "getcontributors",
"version": "1.4.1",
"version": "1.4.2",
"description": "Fetch all the contributors of all the specified github users repositories",

@@ -121,3 +121,3 @@ "homepage": "https://github.com/bevry/getcontributors",

"feedr": "^2.13.3",
"getrepos": "^1.0.7",
"getrepos": "^1.1.0",
"taskgroup": "^5.0.1",

@@ -127,3 +127,3 @@ "typechecker": "^4.4.1"

"devDependencies": {
"assert-helpers": "^4.4.0",
"assert-helpers": "^4.5.0",
"babel-cli": "^6.23.0",

@@ -130,0 +130,0 @@ "babel-preset-es2015": "^6.22.0",

@@ -9,9 +9,9 @@ 'use strict'

/**
Compare two contributor entities for sorting in an array
@param {Contributor} a
@param {Contributor} b
Compare the name param of two objects for sorting in an array
@param {Object} a
@param {Object} b
@return {number} either 0, -1, or 1
@access private
*/
function contributorsComparator (a, b) {
function nameComparator (a, b) {
const A = a.name.toLowerCase()

@@ -54,3 +54,3 @@ const B = b.name.toLowerCase()

A class as it contains a config object, as well as a contributorsMap object.
A class as it contains a config object, as well as a `contributorsMap` object.

@@ -61,3 +61,3 @@ Configuration details can be found in the constructor definition.

The contributorsMap object is used to prevent duplicates when fetching contributor data, and to merge data together in case some was missing somewhere but provided elsewhere.
The `contributorsMap` object is used to prevent duplicates when fetching contributor data, and to merge data together in case some was missing somewhere but provided elsewhere.

@@ -130,2 +130,5 @@ Contributors have the following properties:

// =================================
// Add
/**

@@ -170,2 +173,5 @@ Add a contributor to the internal listing and finish preparing it

// =================================
// Format
/**

@@ -270,3 +276,3 @@ Prepare a contributor by setting and determing some defaults

this.log('debug', `Preparing the ${contributors.length} contributors for the final time`)
contributors = contributors.map(this.prepareContributorFinale.bind(this)).sort(contributorsComparator)
contributors = contributors.map(this.prepareContributorFinale.bind(this)).sort(nameComparator)

@@ -277,2 +283,6 @@ // Return

// =================================
// Fetch
/**

@@ -283,3 +293,3 @@ Fetch Contributors from Usernames

@param {Error} [next.error] - if the procedure failed, this is the error instance, otherwise `null`
@param {Array} [next.result] - if the procedure succedeed, this is the array of contributors
@param {Array} [next.result] - if the procedure succeeded, this is the array of contributors
@chainable

@@ -318,3 +328,3 @@ @returns {this}

@param {Error} [next.error] - if the procedure failed, this is the error instance, otherwise `null`
@param {Array} [next.result] - if the procedure succedeed, this is the array of contributors
@param {Array} [next.result] - if the procedure succeeded, this is the array of contributors
@chainable

@@ -373,3 +383,3 @@ @returns {this}

@param {Error} [next.error] - if the procedure failed, this is the error instance, otherwise `null`
@param {Array} [next.result] - if the procedure succedeed, this is the array of contributors
@param {Array} [next.result] - if the procedure succeeded, this is the array of contributors
@chainable

@@ -457,3 +467,3 @@ @returns {this}

@param {Error} [next.error] - if the procedure failed, this is the error instance, otherwise `null`
@param {Array} [next.result] - if the procedure succedeed, this is the array of contributors
@param {Array} [next.result] - if the procedure succeeded, this is the array of contributors
@chainable

@@ -460,0 +470,0 @@ @returns {this}

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