Skip to content

Commit e2723f4

Browse files
committed
minor fixes
1 parent 2cc51b5 commit e2723f4

File tree

7 files changed

+14
-41
lines changed

7 files changed

+14
-41
lines changed

grunt/sauce.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
var each = require('../src/utils').each
21
var sauceConfig = {
32
username: 'nuclearjs',
43
accessKey: process.env.SAUCE_ACCESS_KEY,
@@ -71,7 +70,9 @@ var batches = {
7170
},
7271
}
7372

74-
each(batches, function(value, key) {
73+
for (var key in batches) {
74+
value = batches[key]
75+
7576
exports[key] = {
7677
sauceLabs: sauceConfig,
7778
// mobile emulators are really slow
@@ -81,4 +82,4 @@ each(batches, function(value, key) {
8182
browsers: Object.keys(value),
8283
reporters: ['progress', 'saucelabs'],
8384
}
84-
})
85+
}

src/getter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function getStoreDeps(getter) {
102102
return storeDeps
103103
}
104104

105-
export {
105+
export default {
106106
isGetter,
107107
getComputeFn,
108108
getFlattenedDeps,

src/reactor/evaluate.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/reactor/reactor-state.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ exports.partial = function(func) {
150150
* Returns a factory method that allows construction with or without `new`
151151
*/
152152
exports.toFactory = function(Klass) {
153-
var Factory = function() {
154-
return new (Function.prototype.bind.apply(Klass, arguments));
153+
var Factory = function(...args) {
154+
return new Klass(...args)
155155
}
156156

157157
Factory.__proto__ = Klass

tests/getter-tests.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Getter, { isGetter } from '../src/getter'
1+
import { isGetter, getFlattenedDeps, fromKeyPath } from '../src/getter'
22
import { Set, List, is } from 'immutable'
33

44
describe('Getter', () => {
@@ -27,7 +27,7 @@ describe('Getter', () => {
2727
it('should throw an Error for a nonvalid KeyPath', () => {
2828
var invalidKeypath = 'foo.bar'
2929
expect(function() {
30-
Getter.fromKeyPath(invalidKeypath)
30+
fromKeyPath(invalidKeypath)
3131
}).toThrow()
3232
})
3333
})
@@ -36,7 +36,7 @@ describe('Getter', () => {
3636
describe('when passed the identity getter', () => {
3737
it('should return a set with only an empty list', () => {
3838
var getter = [[], (x) => x]
39-
var result = Getter.getFlattenedDeps(getter)
39+
var result = getFlattenedDeps(getter)
4040
var expected = Set().add(List())
4141
expect(is(result, expected)).toBe(true)
4242
})
@@ -49,7 +49,7 @@ describe('Getter', () => {
4949
['store2', 'key2'],
5050
(a, b) => 1,
5151
]
52-
var result = Getter.getFlattenedDeps(getter)
52+
var result = getFlattenedDeps(getter)
5353
var expected = Set()
5454
.add(List(['store1', 'key1']))
5555
.add(List(['store2', 'key2']))
@@ -69,7 +69,7 @@ describe('Getter', () => {
6969
['store3', 'key3'],
7070
(a, b) => 1,
7171
]
72-
var result = Getter.getFlattenedDeps(getter2)
72+
var result = getFlattenedDeps(getter2)
7373
var expected = Set()
7474
.add(List(['store1', 'key1']))
7575
.add(List(['store2', 'key2']))

tests/key-path-tests.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
var Immutable = require('immutable')
2-
var KeyPath = require('../src/key-path')
3-
var isKeyPath = KeyPath.isKeyPath
1+
import Immutable from 'immutable'
2+
import { isKeyPath } from '../src/key-path'
43

54
describe('KeyPath', () => {
65
describe('isKeyPath', () => {

0 commit comments

Comments
 (0)