Skip to content

Instantly share code, notes, and snippets.

@brian-mann
brian-mann / README.md
Created January 27, 2019 03:38 — forked from kentcdodds/README.md
JavaScript Program Slicing with SliceJS
@brian-mann
brian-mann / README.md
Created January 27, 2019 03:38 — forked from kentcdodds/README.md
slice-js so far...

slice-js

So far...

A talk by @inconshreveable at The Strange Loop 2016 called "Idealized Commit Logs: Code Simplification via Program Slicing" about the amazing tools that can be built with program slicing inspired me to work on this project. Learn more about program slicing here.

This is actual output from slice-js (not yet open source), a program slicing tool that I'm working on right now. I can't wait to work out more kinks, make it more practically useful and show it to you all!

The match-sorter.js file is the transpiled CommonJS version of match-sorter and you can find that here.

/***/ }),
/***/ "2UZ2":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export DropdownModuleNgFactory */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return RenderType_Dropdown; });
/* harmony export (immutable) */ __webpack_exports__["b"] = View_Dropdown_0;
/* unused harmony export View_Dropdown_Host_0 */
describe('Creating client', () => {
before(() => {
cy.login();
cy.visit('http://xyz/clients')
cy.get('#user-app-navigation li.active')
.get('a');
cy.get('#user-app-navigation li.active a').should('have.attr', 'href')
@brian-mann
brian-mann / problem.js
Last active December 18, 2015 10:29 — forked from anonymous/problem.js
// JSON tree is this kind:
[
{
name: "Ob1",
subobjects: [
{name: "Un1", age: 2},
{name: "Un2", age: 5},
{name: "Un3", age: 4},
{name: "Un4", age: 5},
class List.Event extends Marionette.ItemView
template: "events/list/templates/_event"
tagName: "tr"
triggers:
"click button" : "edit:event:clicked"
CanSing =
sing: ->
console.log "I am #{@name} la la la"
include = (ctr, mixin) ->
console.log "including", ctr
for key of mixin
ctr.prototype[key] = mixin[key]
class Man