This file contains hidden or 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 setValueOf(fieldName, obj) { | |
| var originVal = obj[fieldName] || {}; | |
| var getters = []; | |
| var builder = { | |
| inRange: function (collection, findKey) { | |
| getters.push(function () { | |
| return _.find(collection, function (i) { | |
| return findKey ? (i[findKey] === originVal[findKey]) : (i === originVal); | |
| }); | |
| }); |
This file contains hidden or 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 include($dep){ | |
| if(-not $__includeContainer){ | |
| $__includeContainer = New-Object "system.collections.generic.hashset[string]" | |
| } | |
| $folder = Split-Path $MyInvocation.ScriptName -Parent | |
| $searchPaths = $folder, $__searchPaths | |
| foreach($path in $searchPaths){ | |
| if(Test-Path "$path\$dep.ps1"){ | |
| $file = "$path\$dep.ps1" |
NewerOlder