Created by Christopher Manning
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var obj = {name:"test", result:"hello world"}; | |
| var string = JSON.stringify(obj); | |
| console.log(obj) | |
| var arr = []; | |
| encode = Array.from(string); | |
| while(encode.length>0){ | |
| arr.push(encode.shift().charCodeAt(0)); | |
| } | |
| var u16 = new Uint16Array(arr); | |
| var blob = new Blob([u16], {type:'application/json'}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Overwrite `Common.isElement` to allow for SVG elements also | |
| */ | |
| Matter.Common.isElement = function(obj) { | |
| try { | |
| return obj instanceof HTMLElement || obj instanceof SVGElement; | |
| } catch (e) { | |
| return (typeof obj === "object") && | |
| (obj.nodeType === 1) && (typeof obj.style === "object") && | |
| (typeof obj.ownerDocument === "object"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "presets": [ | |
| { | |
| "Name": "Major", | |
| "Value": "1;3;5;6;8;10;12", | |
| "Group": "Common" | |
| }, | |
| { | |
| "Name": "Minor", | |
| "Value": "1;3;4;6;8;9;11", |
NewerOlder



