This file contains 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
/** | |
* Exploring animation keyframes with display `none` etc. | |
*/ | |
document.body.innerHTML = ` | |
<style> | |
@keyframes slide-in { | |
0% { | |
display: none; |
This file contains 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
document.body.innerHTML = ` | |
<style> | |
table { | |
position: relative; | |
overflow: auto; | |
} | |
table, td, th { | |
border: 1px solid; | |
} | |
thead th { |
This file contains 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
document.body.innerHTML = ` | |
<style> | |
html, body { | |
font-family: Arial, Verdana Helvetica, Sans-serif; | |
} | |
table { | |
width: 80vw; | |
} |
This file contains 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
class TN { | |
constructor(assocList) { | |
if (assocList) { | |
assocList.forEach(([k, v]) => { | |
this.set(k, v); | |
}); | |
} | |
} | |
set(k, v)) { |
This file contains 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
export const | |
getRowIndex = (itemIdx: number, itemsPerRow: number): number => | |
Math.round((itemIdx - (itemIdx % itemsPerRow)) / itemsPerRow), | |
getColumnIndex = (itemIdx: number, itemsPerRow: number): number => | |
itemIdx % itemsPerRow | |
; |
This file contains 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
/** | |
* Idea for assoc_list_helpers (for going to and fro associated lists on specific keys and as a whole) (untested, and/or incomplete implementations) | |
*/ | |
const | |
/** | |
* Returns an associated list on incoming's object type. | |
* @note Does deep conversion on all values of passed in type's type. | |
* @note Useful for working with object primitive (json and the like). |
This file contains 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
import {isset} from 'fjl'; | |
const easings = { | |
linear(t) { | |
return t; | |
}, | |
easeInQuad(t) { | |
return t * t; | |
}, | |
easeOutQuad(t) { |
This file contains 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
const | |
util = require('util'), | |
stream = require('stream'), | |
Readable = stream.Readable, | |
packageJson = require('../package'); | |
function VersionNumberReadStream (options) { | |
Readable.call(this, Object.assign({ | |
encoding: 'utf8', | |
objectMode: false, |
This file contains 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
define(function () { | |
'use strict'; | |
var typeofIsObject = function (value) { return typeof value === 'object'; }, | |
hasOwnProperty = function (obj, key) { return Object.prototype.hasOwnProperty.call(obj, key) }; | |
function deepEquals (obj1, obj2) { | |
return Object.keys(obj1).every(function (key) { | |
if (!hasOwnProperty(obj2, key)) { |
This file contains 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
/** | |
* Created by elydelacruz on 11/8/16. | |
* Simple function to extract delimited content from a string. | |
*/ | |
'use strict'; | |
/** | |
* Returns whether our content has opening and closing delimiters. | |
* @param content {String} |