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

backbeam

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backbeam - npm Package Compare versions

Comparing version 0.9.3 to 0.9.4

67

backbeam.js

@@ -326,2 +326,5 @@ (function(undefined) {

}
if (obj && typeof obj.toString === 'function') {
return obj.toString()
}
// TODO: location

@@ -1085,2 +1088,66 @@ return null

backbeam.collection = function() {
var arr = []
function addWithPrefix(values, prefix) {
for (var i = 0; i < values.length; i++) {
var value = values[i]
if (value) {
if (_.isArray(value)) {
for (var i = 0; i < value.length; i++) {
arr.push(prefix+value[i])
}
} else {
arr.push(prefix+value)
}
}
}
}
var obj = {
add: function() {
for (var i = 0; i < arguments.length; i++) {
var value = arguments[i]
if (value) {
if (typeof value.id === 'function') {
arr.push(value.id())
} else if (_.isArray(value)) {
for (var i = 0; i < value.length; i++) {
arr.push(value[i])
}
} else {
arr.push(value)
}
}
}
return this
},
addTwitter: function() {
addWithPrefix(arguments, 'tw:')
return this
},
addFacebook: function() {
addWithPrefix(arguments, 'fb:')
return this
},
addEmail: function() {
addWithPrefix(arguments, 'email:')
return this
},
toString: function() {
return arr.join('\n')
}
}
if (arguments.length === 1) {
if (_.isArray(arguments[0])) {
obj.add(arguments[0])
} else {
obj.add(arguments[0])
}
} else {
obj.add(Array.prototype.slice.call(arguments))
}
return obj
}
})()

2

package.json
{
"name": "backbeam",
"version": "0.9.3",
"version": "0.9.4",
"description": "Javascript library for backbeam.io. For both nodejs and the browser",

@@ -5,0 +5,0 @@ "main": "backbeam.js",

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