Skip to content

Instantly share code, notes, and snippets.

🐳

JiHan Kim laziel

🐳
Block or report user

Report or block laziel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@laziel
laziel / templateString.js
Created Nov 4, 2015
es6 template string
View templateString.js
let a = 20;
let b = 10;
let c = ‘Test String’;
console.log(`a+b: ${a+b}, c: ${c}`);
// ‘a+b: 30, c: Test String’
View extend.js
function extend() {
var target = arguments[0] || {};
var length = arguments.length;
var prop;
for (var i = 1; i < length; i++) {
if (typeof arguments[i] === 'object') {
for (prop in arguments[i]) {
target[prop] = arguments[i][prop];
}
View EpsilonEqual.js
function isEpsilonEqual(a, b) {
return (Math.abs(a - b) < Number.EPSILON);
}
@laziel
laziel / unlock.js
Created Sep 18, 2015
Unlock Web Audio in iOS 9 Safari
View unlock.js
var ctx = null, usingWebAudio = true;
try {
if (typeof AudioContext !== 'undefined') {
ctx = new AudioContext();
} else if (typeof webkitAudioContext !== 'undefined') {
ctx = new webkitAudioContext();
} else {
usingWebAudio = false;
}
You can’t perform that action at this time.