mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2025-12-18 10:52:17 +01:00
Remove bundle.js from index
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,3 +3,5 @@ node_modules
|
|||||||
build
|
build
|
||||||
BitwiseCmdPages/
|
BitwiseCmdPages/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
bundle.js
|
||||||
|
bundle.js.map
|
||||||
|
|||||||
@@ -110,6 +110,8 @@ var expression = {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// Represents numeric value
|
||||||
export class Operand {
|
export class Operand {
|
||||||
constructor(input) {
|
constructor(input) {
|
||||||
this.input = input;
|
this.input = input;
|
||||||
@@ -130,8 +132,6 @@ export class Operand {
|
|||||||
return Math.floor(Math.log(this.value) / Math.log(2)) + 1;
|
return Math.floor(Math.log(this.value) / Math.log(2)) + 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
getOtherKind(kind) {
|
getOtherKind(kind) {
|
||||||
switch(kind || this.kind) {
|
switch(kind || this.kind) {
|
||||||
case 'dec': return 'hex';
|
case 'dec': return 'hex';
|
||||||
@@ -195,6 +195,7 @@ export class Operand {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Expressions like ~1
|
||||||
export class SingleOperandExpression {
|
export class SingleOperandExpression {
|
||||||
constructor(expressionString, operand, sign) {
|
constructor(expressionString, operand, sign) {
|
||||||
this.expressionString = expressionString;
|
this.expressionString = expressionString;
|
||||||
@@ -222,6 +223,7 @@ export class SingleOperandExpression {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Expression like 1|2 or 4^5
|
||||||
export class TwoOperandExpression {
|
export class TwoOperandExpression {
|
||||||
constructor(expressionString, operand1, operand2, sign) {
|
constructor(expressionString, operand1, operand2, sign) {
|
||||||
this.expressionString = expressionString;
|
this.expressionString = expressionString;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,20 +0,0 @@
|
|||||||
describe("cloned container", function() {
|
|
||||||
var objA = { id: "a"};
|
|
||||||
var objB = { id: "b" };
|
|
||||||
var objC = { id: 'c'};
|
|
||||||
|
|
||||||
var parent = new core.Container();
|
|
||||||
|
|
||||||
parent.register('a', objA);
|
|
||||||
parent.register('b', objB);
|
|
||||||
|
|
||||||
var cloned = parent.clone();
|
|
||||||
cloned.register('a', objC);
|
|
||||||
|
|
||||||
it("should be independent from source container", function() {
|
|
||||||
expect(parent.resolve('a')).toBe(objA);
|
|
||||||
expect(cloned.resolve('a')).toBe(objC);
|
|
||||||
expect(parent.resolve('b')).toBe(objB);
|
|
||||||
expect(cloned.resolve('b')).toBe(objB);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
describe('html templates', function () {
|
|
||||||
var html = core.html;
|
|
||||||
|
|
||||||
it('should compile template', function() {
|
|
||||||
var t = "<div>{m.name}</div>";
|
|
||||||
var compiled = html.compileTemplate(t);
|
|
||||||
expect(typeof compiled).toBe("function");
|
|
||||||
expect(compiled({name: 'test'})).toBe('<div>test</div>');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should support each', function () {
|
|
||||||
var t = '{each n in m.lst}{each c in m.lst2}{n}{c}{/}{/}';
|
|
||||||
var compiled = html.compileTemplate(t);
|
|
||||||
var result = compiled({lst:[1,2,3], lst2:['a','b']});
|
|
||||||
console.log(result);
|
|
||||||
expect(result).toBe('1a1b2a2b3a3b');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
Reference in New Issue
Block a user