squaremo / bitsyntax-js Goto Github PK
View Code? Open in Web Editor NEWBinary data pattern matching
License: Other
Binary data pattern matching
License: Other
I'll update and create a PR
➜ bitsyntax-js git:(master) ✗ npm outdated Package Current Wanted Latest Location debug 2.6.9 2.6.9 4.1.1 bitsyntax mocha 1.21.5 1.21.5 6.1.4 bitsyntax pegjs 0.7.0 0.7.0 0.10.0 bitsyntax
I'll update it and submit a pull request
The constructor variable is a reserved entity. It's fairly elusive to figure out how, exactly, but it's pretty special.
$ node
> constructor
[Function: Object]
> constructor.constructor
[Function: Function]
> constructor.constructor
[Function: Function]
> {}.constructor
[Function: Object]
> new Object(null).constructor
[Function: Object]
> module.exports.constructor
[Function: Object]
I've found this can create complications, especially down the road. It may not seem like a big deal, but if you decide to, say, move the constructor function to a class method, then call this.constructor
it becomes ambiguous and poorly defined. What exactly does this do? If you run it, it'll print hello
as you might expect, but it's not a guarantee and I've run into some trouble with doing this.
var MyObject = function() {
this.constructor('hello');
};
MyObject.prototype.constructor = function(message) {
console.log(message);
};
With that in mind, I recommend you avoid using bitsyntax.constructor.
@squaremo I'm sorry, I first posted this as a comment to the already closed issue #6.
Hence, here we go, once again:
Could you please release a new version 0.0.5
of this library which contains the license commit? Currently, 0.0.4
is the latest one, but this does not include the license information in its package.json
file, and hence our license checker fails :-(
Could you add an MIT license?
Thank for You library!
I just can’t understand if it is possible to pull out the data by bit..
For example, extract from buffer [0b1110000, 0b00001111] every 4 bits separately?
Or more complex case: read from [0b11100011, 0b11111111], 3bits, 3bits and 10bits as unsigned integers?
The Buffer
constructor is deprecated and needs to be replaced by safer alternatives.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.