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

@code-to-json/utils

Package Overview
Dependencies
Maintainers
2
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@code-to-json/utils - npm Package Compare versions

Comparing version 1.0.0-rc.4 to 1.0.0-rc.5

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [1.0.0-rc.5](https://github.com/mike-north/code-to-json/compare/@code-to-json/utils@1.0.0-rc.4...@code-to-json/utils@1.0.0-rc.5) (2019-01-28)
### Bug Fixes
* **utils:** allow information to pass from id generator to processor ([9e6df50](https://github.com/mike-north/code-to-json/commit/9e6df50))
# [1.0.0-rc.4](https://github.com/mike-north/code-to-json/compare/@code-to-json/utils@1.0.0-rc.3...@code-to-json/utils@1.0.0-rc.4) (2019-01-26)

@@ -8,0 +19,0 @@

6

lib/src/deferred-processing/queue.d.ts
import { Ref, RefTypes } from './ref';
export interface Queue<K, T extends object> {
export interface Queue<K, T extends object, OtherInfo> {
queue(item: T): Ref<K>;
numUnprocessed(): number;
drain(cb: (ref: Ref<K>, item: T) => void): {
drain(cb: (ref: Ref<K>, item: T, ohterInfo?: OtherInfo) => void): {
processedCount: number;

@@ -15,3 +15,3 @@ };

otherInfo?: OtherInfo;
}): Queue<K, T>;
}): Queue<K, T, OtherInfo>;
//# sourceMappingURL=queue.d.ts.map
{
"name": "@code-to-json/utils",
"version": "1.0.0-rc.4",
"version": "1.0.0-rc.5",
"description": "Low-level utilities for code-to-json",

@@ -45,3 +45,2 @@ "main": "lib/src/index.js",

"remark-validate-links": "8.0.0",
"snap-shot-it": "6.2.9",
"ts-node": "8.0.2",

@@ -98,3 +97,3 @@ "tslint": "5.12.1",

},
"gitHead": "3bc996d2a584d2baf1def250a500981b00090dc7"
"gitHead": "6d60b9bc1c62a4617c7b324b13de23995a07cb52"
}

@@ -9,6 +9,6 @@ import { createRef, Ref, RefTypes } from './ref';

export interface Queue<K, T extends object> {
export interface Queue<K, T extends object, OtherInfo> {
queue(item: T): Ref<K>;
numUnprocessed(): number;
drain(cb: (ref: Ref<K>, item: T) => void): { processedCount: number };
drain(cb: (ref: Ref<K>, item: T, ohterInfo?: OtherInfo) => void): { processedCount: number };
drainUntilEmpty(cb: (ref: Ref<K>, item: T) => void): { processedCount: number };

@@ -27,3 +27,3 @@ }

extractId: (info: IDInfo) => { id: string; otherInfo?: OtherInfo } = id => ({ id: id as any }),
): Queue<K, T> {
): Queue<K, T, OtherInfo> {
const itemToRef = new Map<T, EntityInfo<K, OtherInfo>>();

@@ -30,0 +30,0 @@ return {

@@ -7,3 +7,3 @@ import { expect } from 'chai';

export class DeferredProcessingTests {
public q!: Queue<'foo', { idd: string }>;
public q!: Queue<'foo', { idd: string }, any>;

@@ -10,0 +10,0 @@ public before() {

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