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
var hasPermission = function hasPermission(permission) { | |
var mockUser = { | |
role: 'ADMIN' | |
}; | |
var rolePermissions = { | |
'ADMIN': ['viewEmail'], | |
'ADMIN2': ['editEmail'] | |
}; |
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
<load-component | |
[loadingMessage]="'Loading customers'" | |
[errorMessage]="'Problem during loading customer list'" | |
[emptyMessage]="'There are no customer'"> | |
<customer-list (onload)="loaded()" | |
(onerror)="error()" | |
(onempty)="empty()"></customer-list> | |
</load-component> | |
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
<load-component | |
[loadingMessage]="'Loading customers'" | |
[errorMessage]="'Problem during loading customer list'" | |
[emptyMessage]="'There are no customer'"> | |
<customer-list (onload)="loaded()" | |
(onerror)="error()" | |
(onempty)="empty()"></customer-list> | |
</load-component> | |
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
{ | |
// autoformat on save | |
"autoformat": true, | |
// array of extensions for autoformat | |
"extensions": ["js", "sublime-settings", "jsx"], | |
// options for jsfmt | |
"options": { | |
"preset": "jquery", |
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
{ | |
"name": "myapp", | |
"version": "0.0.0", | |
"dependencies": { | |
"classnames": "^2.1.3", | |
"dev": "^0.1.3", | |
"flux": "^2.0.3", | |
"grunt": "^0.4.5", | |
"gulp": "^3.9.0", | |
"immutable": "^3.7.4", |
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
viktor@viktor-pc:~/Projects/github/LRN-React$ npm test | |
> myapp@0.0.0 test /home/viktor/Projects/github/LRN-React | |
> jest | |
== NOTICE: == | |
Node and io.js will be merging. http://bit.ly/1dOjLVK | |
On August 1st, 2015, Jest v0.5.x will work only on io.js until the merger is complete | |
Legacy v0.4.x for Node 0.10.x will still be available on |
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
function applyFilter(filters){ | |
var f1 = function(phone){ | |
return phone.price >= 60; | |
}; | |
var f2 = function(phone){ | |
return phone.price <= 70; | |
}; | |
var phones = [{price: 61, name: '1'}, {price: 89, name: 'exclude'}, {price: 67, name: '2'}]; |
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
{ | |
"name": "databits", | |
"version": "0.0.0", | |
"dependencies": { | |
"angular": "1.3.16", | |
"json3": "~3.2.6", | |
"es5-shim": "~2.1.0", | |
"jquery": "~1.11.0", | |
"bootstrap-sass-official": "~3", | |
"angular-resource": "1.3.16", |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
console.clear(); |