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.11 to 0.0.12

2

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

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

function Stac(options) {
var self = this
, toAdd = null;
function Stac(options, items) {
var self = this;
if (Array.isArray(options)) {
toAdd = options;
items = options;
options = {};

@@ -26,4 +25,4 @@ }

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

@@ -168,5 +167,5 @@ }

module.exports = function createStac (options) {
return new Stac(options);
module.exports = function createStac (options, items) {
return new Stac(options, items);
};
module.exports.Stac = Stac;

@@ -208,3 +208,14 @@ var createStac = require('../');

it('can be created with options and an existing array', function () {
stack = createStac({sortBy: 'age'}, [
{name: 'Joe', age: 23},
{name: 'Gramps', age: 67},
{name: 'May', age: 34},
{name: 'Bobby', age: 12}
]);
assert.equal(stack.pop().name, 'Gramps');
assert.equal(stack.shift().name, 'Bobby');
});
});
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