New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More →
Socket
Sign inDemoInstall
Socket

stac

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stac - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

2

package.json
{
"name": "stac",
"version": "0.0.10",
"version": "0.0.11",
"description": "Maintain a sorted stack of things.",

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

function Stac(options) {
var self = this;
var self = this
, toAdd = null;
options = options || {};
if (Array.isArray(options)) {
toAdd = options;
options = {};
}
this._options = options;
this._stack = [];
this._sorted = false;
this._stack = [];
this._sortBy = options.sortBy || 'weight';
this._defaultVal = options.defaultVal || 0;
this._options = options || {};
this._sortBy = this._options.sortBy || 'weight';
this._defaultVal = this._options.defaultVal || 0;
this._comparator = options.comparator || function comparator (a, b) {
this._comparator = this._options.comparator || function comparator (a, b) {
if (a === b) return 0;

@@ -21,2 +25,6 @@ return a < b ? -1 : 1;

});
if (toAdd) {
this.multi('add', toAdd);
}
}

@@ -23,0 +31,0 @@

@@ -202,3 +202,9 @@ var createStac = require('../');

it('can be created with an existing array', function () {
stack = createStac(['A', 'B', 'C', 'D']);
assert.equal(stack.pop(), 'D');
assert.equal(stack.shift(), 'A');
});
});
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