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

@javelin/ecs

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@javelin/ecs - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1

8

CHANGELOG.md

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

## 0.7.1 (2020-07-06)
**Note:** Version bump only for package @javelin/ecs
# 0.7.0 (2020-06-25)

@@ -8,0 +16,0 @@

1

dist/index.d.ts

@@ -8,4 +8,5 @@ export * from "./archetype";

export * from "./storage";
export * from "./topic";
export * from "./util";
export * from "./world";
//# sourceMappingURL=index.d.ts.map

@@ -12,4 +12,5 @@ "use strict";

__export(require("./storage"));
__export(require("./topic"));
__export(require("./util"));
__export(require("./world"));
//# sourceMappingURL=index.js.map

@@ -122,2 +122,6 @@ "use strict";

const componentIndex = archetype.layout.indexOf(_t);
if (componentIndex === -1) {
// Entity component makeup does not match patch component.
return false;
}
// Apply patch to component.

@@ -124,0 +128,0 @@ Object.assign(archetype.table[componentIndex][entityIndex], component);

10

dist/topic.d.ts

@@ -1,7 +0,3 @@

export declare type Topic<T extends string = string, D = any> = {
export declare type Topic<D = unknown> = {
/**
* A property for the name of the topic
*/
readonly name: T;
/**
* Provides iterator syntax to the consumers of a topic. This will loop

@@ -16,3 +12,3 @@ * through all of the events with the type specified in the second type

*/
pushEvent(event: D): void;
push(event: D): void;
/**

@@ -30,3 +26,3 @@ * Utility method that cleans the event list in the topic such that at the

*/
export declare const createTopic: <E>(name: string) => Topic<string, E>;
export declare const createTopic: <E = unknown>() => Topic<E>;
//# sourceMappingURL=topic.d.ts.map

@@ -8,17 +8,23 @@ "use strict";

*/
exports.createTopic = (name) => {
const events = [];
const pushEvent = (event) => {
events.push(event);
};
exports.createTopic = () => {
const staged = [];
const ready = [];
const push = (event) => staged.push(event);
const flush = () => {
array_1.mutableEmpty(events);
array_1.mutableEmpty(ready);
const len = staged.length;
for (let i = len - 1; i >= 0; i--) {
ready[i] = staged.pop();
}
};
return {
name,
[Symbol.iterator]: events.values,
pushEvent,
flush
*[Symbol.iterator]() {
for (let i = 0; i < ready.length; i++) {
yield ready[i];
}
},
push,
flush,
};
};
//# sourceMappingURL=topic.js.map
{
"name": "@javelin/ecs",
"version": "0.7.0",
"version": "0.7.1",
"main": "dist/index.js",

@@ -21,3 +21,3 @@ "license": "MIT",

],
"gitHead": "64448ad383f099146f5ebb758712cea239fe7d1f"
"gitHead": "032f4f9a80eee35f0fcfbabbdb8aa7485bd670a6"
}

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