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
https://github.com/angular/angular.js/blob/25a476ea096b200fb4f422aaa9cd7215e2596ad3/src/ng/directive/select.js#L145-L146 | |
//000011111111110000000000022222222220000000000000000000003333333333000000000000004444444444444440000000005555555555555550000000666666666666666000000000000000777777777700000000000000000008888888888 | |
var NG_OPTIONS_REGEXP = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/, |
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 traverse(scope, level, rootPath, delimiter) { | |
rootPath = rootPath || []; | |
Object.keys(level).forEach(function (key) { | |
const path = rootPath.slice(0); | |
path.push(key); | |
if (angular.isFunction(level[key])) { | |
scope.$on(path.join(delimiter), level[key]); | |
return; | |
} | |
traverse(scope, level[key], path, delimiter); |
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
grunt.registerMultiTask('sassStripImports', | |
'Strips @import statements from the top of SCSS files', | |
// Stripping imports prevents code duplication yet still allows IDEs to properly resolve variables. | |
function () { | |
var options = this.options(); | |
this.files.forEach(function (mapping) { | |
grunt.file.expand(mapping.src).forEach(function (path) { | |
grunt.file.write(path, grunt.file.read(path).replace((options.pattern || /@import\s\".+\";/), '')); | |
}); | |
}); |
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
'use strict'; | |
module.exports = function (grunt) { | |
grunt.initConfig({ | |
fontello: { | |
share: { | |
options: { | |
config: 'fontello-config.json', | |
fonts: 'app/fonts', | |
styles: 'app/core-styles', |
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 () { | |
'use strict'; | |
angular | |
.module('finally', []) | |
.directive('finally', function ( | |
$parse | |
) { | |
return { |
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
let $log, | |
let $q; | |
// currently: | |
beforeEach(inject(function (_$log_, _$q_) { | |
$log = _$log_; | |
$q = _$q_; | |
})); | |
// maybe: |
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
/** | |
* @param {...(string|Array)} paths | |
* | |
* @example | |
* > mergePaths('a.b.c', 'd'); | |
* // ['a', 'b', 'c', 'd'] | |
* | |
* > mergePaths('a.b.c', ['d']); | |
* // ['a', 'b', 'c', 'd'] | |
* |
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
$($window).on('scroll', function () { | |
scope.$apply(function () { | |
if ($window.pageYOffset > offsetTop) { | |
elem.css('left', offsetLeft + 'px'); | |
elem.css('width', width + 'px') | |
// position: fixed; top: 100px; | |
elem.addClass('sticky'); | |
} else { | |
elem.removeClass('sticky'); |
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
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
$color-rebeccapurple: rebeccapurple; | |
$color-red: red; | |
$color-blue: blue; | |
@mixin color( |
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": "stats", | |
"version": "0.0.1" | |
} |
OlderNewer