npm and error messages

This commit is contained in:
2018-10-27 03:51:47 -05:00
parent 692ab70565
commit 025a403027
29601 changed files with 2759363 additions and 14 deletions

1
node_modules/cyclist/.npmignore generated vendored Normal file
View File

@@ -0,0 +1 @@
bench

39
node_modules/cyclist/README.md generated vendored Normal file
View File

@@ -0,0 +1,39 @@
# Cyclist
Cyclist is an efficient [cyclic list](http://en.wikipedia.org/wiki/Circular_buffer) implemention for Javascript.
It is available through npm
npm install cyclist
## What?
Cyclist allows you to create a list of fixed size that is cyclic.
In a cyclist list the element following the last one is the first one.
This property can be really useful when for example trying to order data
packets that can arrive out of order over a network stream.
## Usage
``` js
var cyclist = require('cyclist');
var list = cyclist(4); // if size (4) is not a power of 2 it will be the follwing power of 2
// this buffer can now hold 4 elements in total
list.put(42, 'hello 42'); // store something and index 42
list.put(43, 'hello 43'); // store something and index 43
console.log(list.get(42)); // prints hello 42
console.log(list.get(46)); // prints hello 42 again since 46 - 42 == list.size
```
## API
* `cyclist(size)` creates a new buffer
* `cyclist#get(index)` get an object stored in the buffer
* `cyclist#put(index,value)` insert an object into the buffer
* `cyclist#del(index)` delete an object from an index
* `cyclist#size` property containing current size of buffer
## License
MIT

33
node_modules/cyclist/index.js generated vendored Normal file
View File

@@ -0,0 +1,33 @@
var ensureTwoPower = function(n) {
if (n && !(n & (n - 1))) return n;
var p = 1;
while (p < n) p <<= 1;
return p;
};
var Cyclist = function(size) {
if (!(this instanceof Cyclist)) return new Cyclist(size);
size = ensureTwoPower(size);
this.mask = size-1;
this.size = size;
this.values = new Array(size);
};
Cyclist.prototype.put = function(index, val) {
var pos = index & this.mask;
this.values[pos] = val;
return pos;
};
Cyclist.prototype.get = function(index) {
return this.values[index & this.mask];
};
Cyclist.prototype.del = function(index) {
var pos = index & this.mask;
var val = this.values[pos];
this.values[pos] = undefined;
return val;
};
module.exports = Cyclist;

50
node_modules/cyclist/package.json generated vendored Normal file
View File

@@ -0,0 +1,50 @@
{
"_from": "cyclist@~0.2.2",
"_id": "cyclist@0.2.2",
"_inBundle": false,
"_integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=",
"_location": "/cyclist",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "cyclist@~0.2.2",
"name": "cyclist",
"escapedName": "cyclist",
"rawSpec": "~0.2.2",
"saveSpec": null,
"fetchSpec": "~0.2.2"
},
"_requiredBy": [
"/parallel-transform"
],
"_resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz",
"_shasum": "1b33792e11e914a2fd6d6ed6447464444e5fa640",
"_spec": "cyclist@~0.2.2",
"_where": "C:\\xampp\\htdocs\\w4rpservices\\node_modules\\parallel-transform",
"author": {
"name": "Mathias Buus Madsen",
"email": "mathiasbuus@gmail.com"
},
"bugs": {
"url": "https://github.com/mafintosh/cyclist/issues"
},
"bundleDependencies": false,
"dependencies": {},
"deprecated": false,
"description": "Cyclist is an efficient cyclic list implemention.",
"homepage": "https://github.com/mafintosh/cyclist#readme",
"keywords": [
"circular",
"buffer",
"ring",
"cyclic",
"data"
],
"name": "cyclist",
"repository": {
"type": "git",
"url": "git://github.com/mafintosh/cyclist.git"
},
"version": "0.2.2"
}