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

insection

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

insection - npm Package Compare versions

Comparing version 1.2.4 to 1.2.5

bootstrap-unexpected-markdown.js

7

documentation/index.md

@@ -24,12 +24,11 @@ ---

```js#evaluate:false
var Insection = require('insection');
```js
var insection = new Insection();
insection.add(0, 4, 'foo');
insection.add('(', 2, 6, ']', 'bar');
expect(insection.get(1, 5).sort(), 'to equal', ['foo', 'bar']);
expect(insection.get(1, 5).sort(), 'to equal', ['bar', 'foo']);
expect(insection.get(0, 2).sort(), 'to equal', ['foo']);
insection.add('[', 2, Infinity, ')', 'baz');
expect(insection.get('(', -Infinity, 2, ')').sort(), 'to equal', ['foo']);
expect(insection.get(2).sort(), 'to equal', ['foo', 'baz']);
expect(insection.get(2).sort(), 'to equal', ['baz', 'foo']);
```

@@ -36,0 +35,0 @@

@@ -20,3 +20,4 @@ /*!

* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE. */
* THE SOFTWARE.
*/
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o;"undefined"!=typeof window?o=window:"undefined"!=typeof global?o=global:"undefined"!=typeof self&&(o=self);var n=o;n=n.com||(n.com={}),n=n.one||(n.one={}),n.insection=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

@@ -357,6 +358,2 @@ var InvalidIntervalError = require(3);

function isValidIntervalEndpointType(type) {
return type === 'number' || type === 'string';
}
function ensureValidInterval(startString, start, end, endString) {

@@ -363,0 +360,0 @@ var startType = typeof start;

@@ -27,6 +27,2 @@ var InvalidIntervalError = require('./InvalidIntervalError');

function isValidIntervalEndpointType(type) {
return type === 'number' || type === 'string';
}
function ensureValidInterval(startString, start, end, endString) {

@@ -33,0 +29,0 @@ var startType = typeof start;

{
"name": "insection",
"version": "1.2.4",
"version": "1.2.5",
"description": "A data structure for storing number intervals",
"main": "lib/insection.js",
"main": "lib/Insection.js",
"scripts": {
"lint": "jshint lib && jshint test && jscs lib && jscs test",
"test": "mocha -i -g @slow",
"test": "mocha -i -g @slow ./documentation/**/*.md ./test/**/*.js && jscs test",
"coverage": "NODE_ENV=development istanbul cover _mocha -- --reporter dot -i -g @slow",
"travis": "npm test && npm run coverage && <coverage/lcov.info coveralls",
"generate-site": "node generate-site.js",
"update-examples": "node generate-site.js --update-examples",
"generate-site": "generate-site --require ./bootstrap-unexpected-markdown.js",
"update-examples": "generate-site --require ./bootstrap-unexpected-markdown.js --update-examples",
"prepublish": "(echo '/*!' && <LICENSE sed -e's/^/ * /' | sed -e's/\\s+$//' && echo ' */' && browserify -p bundle-collapser/plugin -e lib/Insection -s com.one.insection) > insection.js"

@@ -40,5 +40,6 @@ },

"mocha": "2.1.0",
"unexpected": "9.12.0",
"unexpected-documentation-site-generator": "2.2.3"
"unexpected": "10.13.2",
"unexpected-documentation-site-generator": "4.1.0",
"unexpected-markdown": "1.6.1"
}
}

@@ -74,12 +74,12 @@ var Insection = require('../lib/Insection.js');

})
.addAssertion('Insection', '[not] to be empty', function (expect, subject) {
.addAssertion('<Insection> [not] to be empty', function (expect, subject) {
expect(subject.isEmpty(), '[not] to be true');
})
.addAssertion('Insection', '[not] to contain', function (expect, subject, interval) {
.addAssertion('<Insection> [not] to contain <Interval>', function (expect, subject, interval) {
expect(subject.contains(interval), '[not] to be true');
})
.addAssertion('Insection', 'not to have any interval intersecting with', function (expect, subject, interval) {
.addAssertion('<Insection> not to have any interval intersecting with <Interval>', function (expect, subject, interval) {
expect(subject.getIntervals(interval), 'to be empty');
})
.addAssertion('Insection', 'to only contain valid gaps for interval', function (expect, subject, interval) {
.addAssertion('<Insection> to only contain valid gaps for interval <Interval>', function (expect, subject, interval) {
this.errorMode = 'nested';

@@ -91,6 +91,6 @@ var gaps = subject.getGaps(interval);

})
.addAssertion('Interval', '[not] to intersect with', function (expect, subject, other) {
.addAssertion('<Interval> [not] to intersect with <Interval>', function (expect, subject, other) {
expect(subject.intersect(other), '[not] to be true');
})
.addAssertion('Insection', 'to be balanced', function (expect, subject) {
.addAssertion('<Insection> to be balanced', function (expect, subject) {
var root = subject.data.root;

@@ -136,3 +136,3 @@

})
.addAssertion('Insection', 'when getting gaps between', function (expect, subject, interval) {
.addAssertion('<Insection> when getting gaps between <string> <assertion>', function (expect, subject, interval) {
var gaps = subject.getGaps(Interval.fromString(interval)).map(function (interval) {

@@ -139,0 +139,0 @@ return interval.toString();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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