![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
For adding/subtracting sets of range of numbers.
const DRange = require('drange');
var allNums = new DRange(1, 100); //[ 1-100 ]
var badNums = DRange(13).add(8).add(60,80); //[8, 13, 60-80]
var goodNums = allNums.clone().subtract(badNums);
console.log(goodNums.toString()); //[ 1-7, 9-12, 14-59, 81-100 ]
var randomGoodNum = goodNums.index(Math.floor(Math.random() * goodNums.length));
Creates a new instance of DRange.
The total length of all subranges
Adds a subrange
Adds all of another DRange's subranges
Subtracts a subrange
Subtracts all of another DRange's subranges
Keep only subranges that overlap the given subrange
Intersect all of another DRange's subranges
Get the number at the specified index
var drange = DRange()
drange.add(1, 10);
drange.add(21, 30);
console.log(drange.index(15)); // 25
Clones the drange, so that changes to it are not reflected on its clone
npm install drange
Tests are written with mocha
npm test
DRange includes TypeScript definitions.
import * as DRange from "drange";
const range: DRange = new Drange(2, 5);
Use dtslint to check the definition file.
npm install -g dtslint
npm run dtslint
FAQs
For adding, subtracting, and indexing discontinuous ranges of numbers
The npm package drange receives a total of 0 weekly downloads. As such, drange popularity was classified as not popular.
We found that drange demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.