Socket
Socket
Sign inDemoInstall

number-allocator

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

number-allocator - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

3

CHANGELOG.md

@@ -0,1 +1,4 @@

## 1.0.10
- Fixed TypeScript number type
## 1.0.9

@@ -2,0 +5,0 @@ - Migrated from collections.js to js-sdsl to remove intrinsic library extention

2

package.json
{
"name": "number-allocator",
"version": "1.0.9",
"version": "1.0.10",
"description": "A library for the unique number allocator",

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

# Unique number allocator for JavaScript.
Version 1.0.9 [![number-allocator CI](https://github.com/redboltz/number-allocator/workflows/number-allocator%20CI/badge.svg)](https://github.com/redboltz/number-allocator/actions) [![codecov](https://codecov.io/gh/redboltz/number-allocator/branch/main/graph/badge.svg)](https://codecov.io/gh/redboltz/number-allocator)
Version 1.0.10 [![number-allocator CI](https://github.com/redboltz/number-allocator/workflows/number-allocator%20CI/badge.svg)](https://github.com/redboltz/number-allocator/actions) [![codecov](https://codecov.io/gh/redboltz/number-allocator/branch/main/graph/badge.svg)](https://codecov.io/gh/redboltz/number-allocator)

@@ -5,0 +5,0 @@ ## How to use

@@ -7,6 +7,6 @@ export declare class NumberAllocator {

* @constructor
* @param {Number} min - The maximum number of allocatable. The number must be integer.
* @param {Number} maxh - The minimum number of allocatable. The number must be integer.
* @param {number} min - The maximum number of allocatable. The number must be integer.
* @param {number} maxh - The minimum number of allocatable. The number must be integer.
*/
constructor (min: Number, max: Number)
constructor (min: number, max: number)

@@ -16,6 +16,6 @@ /**

* Time Complexity O(1)
* @return {Number} - The first vacant number. If all numbers are occupied, return null.
* @return {number} - The first vacant number. If all numbers are occupied, return null.
* When alloc() is called then the same value will be allocated.
*/
public firstVacant (): Number | null
public firstVacant (): number | null

@@ -25,5 +25,5 @@ /**

* Time Complexity O(1)
* @return {Number} - The first vacant number. If all numbers are occupied, return null.
* @return {number} - The first vacant number. If all numbers are occupied, return null.
*/
public alloc (): Number | null
public alloc (): number | null

@@ -34,6 +34,6 @@ /**

* Time Complexity O(logN) : N is the number of intervals (not numbers)
* @param {Number} num - The number to request use.
* @param {number} num - The number to request use.
* @return {Boolean} - If `num` was not occupied, then return true, otherwise return false.
*/
public use (num: Number): Boolean
public use (num: number): Boolean

@@ -43,6 +43,6 @@ /**

* Time Complexity O(logN) : N is the number of intervals (not numbers)
* @param {Number} num - The number to deallocate. The number must be occupied status.
* @param {number} num - The number to deallocate. The number must be occupied status.
* In other words, the number must be allocated by alloc() or occupied be use().
*/
public free (num: Number): void
public free (num: number): void

@@ -60,5 +60,5 @@ /**

* Time Complexity O(1)
* @return {Number} - The number of intervals.
* @return {number} - The number of intervals.
*/
public intervalCount (): Number
public intervalCount (): number

@@ -65,0 +65,0 @@ /**

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