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

m-sorted-array

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

m-sorted-array

Implementation of insert, find and remove of sorted array

  • 1.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-20%
Maintainers
1
Weekly downloads
 
Created
Source

m-sorted-array NPM version Build Status Dependency Status Coverage percentage

Implementation of insert, find and remove of sorted array

Install

$ npm install --save m-sorted-array

Usage

var SortedArray = require('m-sorted-array');

var SortedArray = require('./lib');
var sortedArray = SortedArray([8, 3, 2, 9, 1]);
console.log(sortedArray.array); // [1, 2, 3, 8, 9]

sortedArray.insert(5);
console.log(sortedArray.array); // [1, 2, 3, 5, 8, 9]

console.log(sortedArray.find(4)); // -1

var strict = false;
console.log(sortedArray.find(4, strict)); // 3

sortedArray.remove(2); // true
sortedArray.remove(2); // false
console.log(sortedArray.array); // [1, 3, 5, 8, 9]

License

Apache-2.0 © Mieszko4

Keywords

FAQs

Package last updated on 04 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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