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

fellow

Package Overview
Dependencies
Maintainers
1
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fellow - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

112

es2015/index.js

@@ -10,3 +10,14 @@ 'use strict';

/**
A fellow with similarties to other people
A fellow with similarties to other people.
Also contains the properties:
- {String} homepage
- {String} githubUrl
- {String} githubUsername
- {String} twitterUrl
- {String} twitterUsername
- {String} facebookUrl
- {String} facebookUsername
@class Fellow

@@ -23,3 +34,2 @@ */

If an ensureField is an array for both ourself and the other fellow, we will check to see if only one item of that array is similar (this is useful for email comparisons)
@method compare
@param {Fellow} other The other fellow to compare ourselves with

@@ -94,5 +104,4 @@ @returns {Boolean} Returns `true` if they appear to be the same person, or `false` if not

Get a fellow from the singleton list
@static
@method get
@param {Mixed} value The value to fetch the value with
@param {*} value The value to fetch the value with
@returns {Fellow|Null} The fetched fellow, if they exist with that value

@@ -107,4 +116,4 @@ */

An array of fields that will denote if the user is the same user or not when using ensure
@protected
@property {Array} ensureFields
@access protected
@type {Array}
*/

@@ -123,3 +132,3 @@ get: function get() {

Get the serialisable values of this fellow
@property {Object} json
@type {Object}
*/

@@ -132,3 +141,6 @@ get: function get() {

/**
Updating the email will add the email to the start of the `emails` array
When fetching,
Updating the email will add the email to the start of the `emails` array.
When getting,
Fetches the first email from the emails array.
@property {String} email

@@ -152,8 +164,11 @@ @param {String} value - The email to add to the emails

/**
When set, will determine if it is a github, facebook, or twitter url
If it is, then it will extract the username and url from it
If this is not one of those urls, then it will set the homepage variable
When fetching, it will fetch `homepage || githubUrl || facebookUrl || twitterUrl || null`
@property {String} url
When setting,
Will determine passed url is a github, facebook, or twitter url.
If it is, then it will extract the username and url from it.
If this is not one of those urls, then it will set the homepage variable.
When getting,
Will fetch `homepage || githubUrl || facebookUrl || twitterUrl || null`
@type {String}
@param {String} value
@returns {this}
*/

@@ -179,3 +194,3 @@

} else {
this.homepage = value;
this.homepage = value.replace(/^https/, 'http');
}

@@ -189,30 +204,2 @@ }

/**
@property {String} homepage
*/
/**
@property {String} githubUrl
*/
/**
@property {String} githubUsername
*/
/**
@property {String} twitterUrl
*/
/**
@property {String} twitterUsername
*/
/**
@property {String} facebookUrl
*/
/**
@property {String} facebookUsername
*/
// -----------------------------------

@@ -223,3 +210,3 @@ // Methods

Construct our fellow instance with the value
@param {Mixed} value The value used to set the properties of the fellow, forwarded to set
@param {*} value - The value used to set the properties of the fellow, forwarded to set
*/

@@ -237,4 +224,3 @@

@static
@method create
@param {Mixed} value
@param {*} value
@returns {Fellow} The new fellow instance

@@ -249,3 +235,3 @@ */

@static
@property {Array} list
@type {Array}
*/

@@ -260,4 +246,3 @@

@static
@method ensure
@param {Mixed} value - The value to create a new fellow instance or find the existing fellow instance with
@param {*} value - The value to create a new fellow instance or find the existing fellow instance with
@param {boolean} [add=true] - Whether to add the created person to the list

@@ -314,4 +299,3 @@ @returns {Fellow} The new or existing fellow instance

@static
@method add
@param {Mixed} value The fellow or people to add
@param {*} value The fellow or people to add
@returns {Array} An array of the fellow objects for the passed people

@@ -345,3 +329,2 @@ */

@static
@method contributesRepository
@param {String} repoSlug The repository slug

@@ -362,3 +345,2 @@ @returns {Array} An array of the fellow objects that contribute to the repository

@static
@method maintainsRepository
@param {String} repoSlug The repository slug

@@ -379,3 +361,2 @@ @returns {Array} An array of the fellow objects that maintain to the repository

@static
@method authorsRepository
@param {String} repoSlug The repository slug

@@ -442,7 +423,10 @@ @returns {Array} An array of the fellow objects that author to the repository

if (value) {
// if not a url field, e.g. name or email
if (urlFields.indexOf(key) === -1) {
_this2[key] = value;
} else {
_this2.url = value;
}
// if any of the url fields, redirect to url setter
else {
_this2.url = value;
}
}

@@ -464,4 +448,3 @@ });

@private
@method ensureRepository
@param {String} slug Github repository slug (e.g. "bevry/projectz")
@param {String} slug - Github repository slug (e.g. "bevry/projectz")
@returns {Object} The repository object

@@ -480,3 +463,3 @@ */

Get all added github repository slugs that this fellow contributes to
@property {Array} contributedRepositories
@type {Array}
*/

@@ -490,4 +473,3 @@

Make note that this fellow contributes to this repository slug
@method contributesRepository
@param {String} slug The github repository slug that this user contributes to
@param {String} slug - The github repository slug that this user contributes to
@returns {this}

@@ -502,3 +484,3 @@ */

Get all added github repository slugs that this fellow maintains
@property {Array} maintainedRepositories
@type {Array}
*/

@@ -512,4 +494,3 @@

Make note that this fellow maintains this repository slug
@method maintainsRepository
@param {String} slug The github repository slug that this user maintains
@param {String} slug - The github repository slug that this user maintains
@returns {this}

@@ -524,3 +505,3 @@ */

Get all added github repository slugs that this fellow authors
@property {Array} authoredRepositories
@type {Array}
*/

@@ -534,4 +515,3 @@

Make note that this fellow authors this repository slug
@method authorsRepository
@param {String} slug The github repository slug that this user authors
@param {String} slug - The github repository slug that this user authors
@returns {this}

@@ -538,0 +518,0 @@ */

# History
## v2.3.0 2016 June 13
- Fellow homepage will now change `https` to `http` to prevent duplicates
## v2.2.0 2016 April 30

@@ -4,0 +7,0 @@ - Updated internal conventions

{
"name": "fellow",
"version": "2.2.0",
"version": "2.3.0",
"description": "Fellow is a package for creating people that can be unified by their shared values via a singleton list on the class",

@@ -48,7 +48,6 @@ "homepage": "https://github.com/bevry/fellow",

"maintainers": [
"Benjamin Lupton <b@lupton.cc> (http://balupton.com)"
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)"
],
"contributors": [
"Benjamin Lupton <b@lupton.cc> (http://balupton.com)",
"Benjamin Lupton (https://balupton.com)"
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)"
],

@@ -65,18 +64,2 @@ "bugs": {

},
"dependencies": {
"editions": "^1.1.1"
},
"devDependencies": {
"assert-helpers": "^4.1.0",
"babel-cli": "^6.7.7",
"babel-preset-es2015": "^6.6.0",
"eslint": "^2.9.0",
"eslint-plugin-babel": "^3.2.0",
"joe": "^1.6.0",
"joe-reporter-console": "^1.2.1",
"projectz": "^1.1.2",
"documentation": "^4.0.0-beta2"
},
"main": "index.js",
"browser": "es2015/index.js",
"editions": [

@@ -111,2 +94,4 @@ {

],
"main": "index.js",
"browser": "es2015/index.js",
"scripts": {

@@ -118,3 +103,3 @@ "setup": "npm install",

"meta": "npm run meta:docs && npm run meta:projectz",
"meta:docs": "documentation build -f html -g source/**.js -o docs",
"meta:docs": "documentation build -f html -o ./docs -g --shallow ./source/**.js",
"meta:projectz": "projectz compile",

@@ -129,3 +114,17 @@ "prepare": "npm run compile && npm run test && npm run meta",

"test": "node --harmony -e \"require('editions').requirePackage(process.cwd(), require, 'test.js')\""
},
"dependencies": {
"editions": "^1.1.1"
},
"devDependencies": {
"assert-helpers": "^4.4.0",
"babel-cli": "^6.10.1",
"babel-preset-es2015": "^6.9.0",
"eslint": "^2.12.0",
"eslint-plugin-babel": "^3.2.0",
"joe": "^1.8.0",
"joe-reporter-console": "^1.2.1",
"projectz": "^1.1.6",
"documentation": "^4.0.0-beta5"
}
}

@@ -45,3 +45,3 @@ <!-- TITLE/ -->

<li>Module: <code>require('fellow')</code></li>
<li>CDN URL: <code>//wzrd.in/bundle/fellow@2.2.0</code></li></ul>
<li>CDN URL: <code>//wzrd.in/bundle/fellow@2.3.0</code></li></ul>

@@ -98,3 +98,3 @@ <a href="http://enderjs.com" title="Ender is a full featured package manager for your browser"><h3>Ender</h3></a><ul>

<ul><li><a href="http://balupton.com">Benjamin Lupton</a></li></ul>
<ul><li><a href="https://github.com/balupton">Benjamin Lupton</a> — <a href="https://github.com/bevry/fellow/commits?author=balupton" title="View the GitHub contributions of Benjamin Lupton on repository bevry/fellow">view contributions</a></li></ul>

@@ -116,4 +116,3 @@ <h3>Sponsors</h3>

<ul><li><a href="http://balupton.com">Benjamin Lupton</a></li>
<li><a href="https://balupton.com">Benjamin Lupton</a> — <a href="https://github.com/bevry/fellow/commits?author=balupton" title="View the GitHub contributions of Benjamin Lupton on repository bevry/fellow">view contributions</a></li></ul>
<ul><li><a href="https://github.com/balupton">Benjamin Lupton</a> — <a href="https://github.com/bevry/fellow/commits?author=balupton" title="View the GitHub contributions of Benjamin Lupton on repository bevry/fellow">view contributions</a></li></ul>

@@ -120,0 +119,0 @@ <a href="https://github.com/bevry/fellow/blob/master/CONTRIBUTING.md#files">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>

/**
A fellow with similarties to other people
A fellow with similarties to other people.
Also contains the properties:
- {String} homepage
- {String} githubUrl
- {String} githubUsername
- {String} twitterUrl
- {String} twitterUsername
- {String} facebookUrl
- {String} facebookUsername
@class Fellow

@@ -13,4 +24,3 @@ */

@static
@method create
@param {Mixed} value
@param {*} value
@returns {Fellow} The new fellow instance

@@ -25,3 +35,3 @@ */

@static
@property {Array} list
@type {Array}
*/

@@ -36,4 +46,3 @@ static get list () {

@static
@method ensure
@param {Mixed} value - The value to create a new fellow instance or find the existing fellow instance with
@param {*} value - The value to create a new fellow instance or find the existing fellow instance with
@param {boolean} [add=true] - Whether to add the created person to the list

@@ -61,4 +70,4 @@ @returns {Fellow} The new or existing fellow instance

An array of fields that will denote if the user is the same user or not when using ensure
@protected
@property {Array} ensureFields
@access protected
@type {Array}
*/

@@ -72,3 +81,2 @@ get ensureFields () {

If an ensureField is an array for both ourself and the other fellow, we will check to see if only one item of that array is similar (this is useful for email comparisons)
@method compare
@param {Fellow} other The other fellow to compare ourselves with

@@ -101,5 +109,4 @@ @returns {Boolean} Returns `true` if they appear to be the same person, or `false` if not

Get a fellow from the singleton list
@static
@method get
@param {Mixed} value The value to fetch the value with
@param {*} value The value to fetch the value with
@returns {Fellow|Null} The fetched fellow, if they exist with that value

@@ -114,4 +121,3 @@ */

@static
@method add
@param {Mixed} value The fellow or people to add
@param {*} value The fellow or people to add
@returns {Array} An array of the fellow objects for the passed people

@@ -140,3 +146,2 @@ */

@static
@method contributesRepository
@param {String} repoSlug The repository slug

@@ -154,3 +159,2 @@ @returns {Array} An array of the fellow objects that contribute to the repository

@static
@method maintainsRepository
@param {String} repoSlug The repository slug

@@ -168,3 +172,2 @@ @returns {Array} An array of the fellow objects that maintain to the repository

@static
@method authorsRepository
@param {String} repoSlug The repository slug

@@ -185,3 +188,3 @@ @returns {Array} An array of the fellow objects that author to the repository

Get the serialisable values of this fellow
@property {Object} json
@type {Object}
*/

@@ -194,3 +197,7 @@ get json () {

/**
Updating the email will add the email to the start of the `emails` array
When fetching,
Updating the email will add the email to the start of the `emails` array.
When getting,
Fetches the first email from the emails array.
@property {String} email

@@ -211,8 +218,12 @@ @param {String} value - The email to add to the emails

/**
When set, will determine if it is a github, facebook, or twitter url
If it is, then it will extract the username and url from it
If this is not one of those urls, then it will set the homepage variable
When fetching, it will fetch `homepage || githubUrl || facebookUrl || twitterUrl || null`
@property {String} url
When setting,
Will determine passed url is a github, facebook, or twitter url.
If it is, then it will extract the username and url from it.
If this is not one of those urls, then it will set the homepage variable.
When getting,
Will fetch `homepage || githubUrl || facebookUrl || twitterUrl || null`
@type {String}
@param {String} value
@returns {this}
*/

@@ -238,3 +249,3 @@ set url (value) {

else {
this.homepage = value
this.homepage = value.replace(/^https/, 'http')
}

@@ -248,30 +259,3 @@ }

/**
@property {String} homepage
*/
/**
@property {String} githubUrl
*/
/**
@property {String} githubUsername
*/
/**
@property {String} twitterUrl
*/
/**
@property {String} twitterUsername
*/
/**
@property {String} facebookUrl
*/
/**
@property {String} facebookUsername
*/
// -----------------------------------

@@ -282,6 +266,6 @@ // Methods

Construct our fellow instance with the value
@param {Mixed} value The value used to set the properties of the fellow, forwarded to set
@param {*} value - The value used to set the properties of the fellow, forwarded to set
*/
constructor (value) {
if ( !this.emails ) this.emails = []
if ( !this.emails ) this.emails = []
this.set(value)

@@ -318,5 +302,7 @@ }

if ( value ) {
// if not a url field, e.g. name or email
if ( urlFields.indexOf(key) === -1 ) {
this[key] = value
}
// if any of the url fields, redirect to url setter
else {

@@ -343,4 +329,3 @@ this.url = value

@private
@method ensureRepository
@param {String} slug Github repository slug (e.g. "bevry/projectz")
@param {String} slug - Github repository slug (e.g. "bevry/projectz")
@returns {Object} The repository object

@@ -356,3 +341,3 @@ */

Get all added github repository slugs that this fellow contributes to
@property {Array} contributedRepositories
@type {Array}
*/

@@ -368,4 +353,3 @@ get contributedRepositories () {

Make note that this fellow contributes to this repository slug
@method contributesRepository
@param {String} slug The github repository slug that this user contributes to
@param {String} slug - The github repository slug that this user contributes to
@returns {this}

@@ -380,3 +364,3 @@ */

Get all added github repository slugs that this fellow maintains
@property {Array} maintainedRepositories
@type {Array}
*/

@@ -392,4 +376,3 @@ get maintainedRepositories () {

Make note that this fellow maintains this repository slug
@method maintainsRepository
@param {String} slug The github repository slug that this user maintains
@param {String} slug - The github repository slug that this user maintains
@returns {this}

@@ -404,3 +387,3 @@ */

Get all added github repository slugs that this fellow authors
@property {Array} authoredRepositories
@type {Array}
*/

@@ -416,4 +399,3 @@ get authoredRepositories () {

Make note that this fellow authors this repository slug
@method authorsRepository
@param {String} slug The github repository slug that this user authors
@param {String} slug - The github repository slug that this user authors
@returns {this}

@@ -425,2 +407,3 @@ */

}
}

@@ -427,0 +410,0 @@

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