Skip to content

Instantly share code, notes, and snippets.

Avatar

Wojciech Frącz fracz

  • Poland
View GitHub Profile
@fracz
fracz / memoize-expirable-decorator.spec.ts
Created Jan 14, 2017
Typescript memoize decorator with expiration time
View memoize-expirable-decorator.spec.ts
import {memoize, clearMemoizedValue} from "./memoize";
describe("memoize", () => {
class MyClass {
@memoize(5)
getNumber() {
return Math.random();
}
}
View README.md
<div loading-cover="coversIfThisIsTrue">
   CONTENT
</div>
@fracz
fracz / README.md
Last active Jun 11, 2016
ReveritbleAction for Angular implementation (allows to undo an operation before the request is sent to the backend).
View README.md

Angular Revertible Action

Example use:

angular.module('xxx').controller 'TreasureController', ($scope, treasureId, RevertibleAction, Restangular) ->

  Restangular.one('treasure', treasureId).get().then (treasure) ->
    $scope.treasure = treasure