Sun calculation js library which is fully based on formula from http://aa.quae.nl/en/reken/zonpositie.html
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
355 B
15 lines
355 B
7 years ago
|
var ownOr = require('./')
|
||
|
var assert = require('assert')
|
||
|
|
||
|
var foo = { bar: 'baz' }
|
||
|
|
||
|
assert.equal(ownOr(foo, 'bar', 'boo'), 'baz')
|
||
|
assert.equal(ownOr(foo, 'boo', 'boo'), 'boo')
|
||
|
|
||
|
var bar = Object.create(foo)
|
||
|
bar.bat = 'boo'
|
||
|
assert.equal(ownOr(bar, 'bar', 'boo'), 'boo')
|
||
|
assert.equal(ownOr(bar, 'bat', 'qux'), 'boo')
|
||
|
|
||
|
console.log('TAP version 13\nok\n1..1')
|