change approach again

This commit is contained in:
2018-05-09 14:31:22 +02:00
parent 54a933c83a
commit 0686e02b75
2252 changed files with 864743 additions and 270 deletions

2
node_modules/test-value/.npmignore generated vendored Normal file
View File

@ -0,0 +1,2 @@
tmp
out

8
node_modules/test-value/.travis.yml generated vendored Normal file
View File

@ -0,0 +1,8 @@
language: node_js
node_js:
- '0.10'
- 0.12
- iojs
- 4
- 5
- 6

21
node_modules/test-value/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015-16 Lloyd Brookes <75pound@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

45
node_modules/test-value/README.md generated vendored Normal file
View File

@ -0,0 +1,45 @@
[![view on npm](http://img.shields.io/npm/v/test-value.svg)](https://www.npmjs.org/package/test-value)
[![npm module downloads](http://img.shields.io/npm/dt/test-value.svg)](https://www.npmjs.org/package/test-value)
[![Build Status](https://travis-ci.org/75lb/test-value.svg?branch=master)](https://travis-ci.org/75lb/test-value)
[![Dependency Status](https://david-dm.org/75lb/test-value.svg)](https://david-dm.org/75lb/test-value)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)
<a name="module_test-value"></a>
## test-value
**Example**
```js
var testValue = require('test-value')
```
* [test-value](#module_test-value)
* [testValue(value, test, [options])](#exp_module_test-value--testValue) ⇒ <code>boolean</code>
* [.where(test)](#module_test-value--testValue.where) ⇒ <code>function</code>
<a name="exp_module_test-value--testValue"></a>
### testValue(value, test, [options]) ⇒ <code>boolean</code> ⏏
**Kind**: Exported function
| Param | Type | Description |
| --- | --- | --- |
| value | <code>any</code> | a value to test |
| test | <code>any</code> | the test query |
| [options] | <code>object</code> | |
| [options.strict] | <code>boolean</code> | Treat an object like a value not a query. |
<a name="module_test-value--testValue.where"></a>
#### testValue.where(test) ⇒ <code>function</code>
Returns a callback suitable for use by `Array` methods like `some`, `filter`, `find` etc.
**Kind**: static method of <code>[testValue](#exp_module_test-value--testValue)</code>
| Param | Type | Description |
| --- | --- | --- |
| test | <code>any</code> | the test query |
* * *
&copy; 2015-16 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).

11
node_modules/test-value/jsdoc2md/README.hbs generated vendored Normal file
View File

@ -0,0 +1,11 @@
[![view on npm](http://img.shields.io/npm/v/test-value.svg)](https://www.npmjs.org/package/test-value)
[![npm module downloads](http://img.shields.io/npm/dt/test-value.svg)](https://www.npmjs.org/package/test-value)
[![Build Status](https://travis-ci.org/75lb/test-value.svg?branch=master)](https://travis-ci.org/75lb/test-value)
[![Dependency Status](https://david-dm.org/75lb/test-value.svg)](https://david-dm.org/75lb/test-value)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)
{{>main}}
* * *
&copy; 2015-16 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).

83
node_modules/test-value/lib/test-value.js generated vendored Normal file
View File

@ -0,0 +1,83 @@
'use strict'
var arrayify = require('array-back')
var t = require('typical')
/**
* @module test-value
* @example
* var testValue = require('test-value')
*/
module.exports = testValue
/**
* @alias module:test-value
* @param {any} - a value to test
* @param {any} - the test query
* @param [options] {object}
* @param [options.strict] {boolean} - Treat an object like a value not a query.
* @returns {boolean}
*/
function testValue (value, test, options) {
options = options || {}
if (test !== Object.prototype && t.isPlainObject(test) && t.isObject(value) && !options.strict) {
return Object.keys(test).every(function (prop) {
var queryValue = test[prop]
/* get flags */
var isNegated = false
var isContains = false
if (prop.charAt(0) === '!') {
isNegated = true
} else if (prop.charAt(0) === '+') {
isContains = true
}
/* strip flag char */
prop = (isNegated || isContains) ? prop.slice(1) : prop
var objectValue = value[prop]
if (isContains) {
queryValue = arrayify(queryValue)
objectValue = arrayify(objectValue)
}
var result = testValue(objectValue, queryValue, options)
return isNegated ? !result : result
})
} else if (test !== Array.prototype && Array.isArray(test)) {
var tests = test
if (value === Array.prototype || !Array.isArray(value)) value = [ value ]
return value.some(function (val) {
return tests.some(function (test) {
return testValue(val, test, options)
})
})
/*
regexes queries will always return `false` for `null`, `undefined`, `NaN`.
This is to prevent a query like `/.+/` matching the string `undefined`.
*/
} else if (test instanceof RegExp) {
if ([ 'boolean', 'string', 'number' ].indexOf(typeof value) === -1) {
return false
} else {
return test.test(value)
}
} else if (test !== Function.prototype && typeof test === 'function') {
return test(value)
} else {
return test === value
}
}
/**
* Returns a callback suitable for use by `Array` methods like `some`, `filter`, `find` etc.
* @param {any} - the test query
* @returns {function}
*/
testValue.where = function (test) {
return function (value) {
return testValue(value, test)
}
}

View File

@ -0,0 +1,2 @@
tmp
out

View File

@ -0,0 +1,8 @@
language: node_js
node_js:
- 7
- 6
- 5
- 4
- iojs
- 0.12

View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015-16 Lloyd Brookes <75pound@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,51 @@
[![view on npm](http://img.shields.io/npm/v/array-back.svg)](https://www.npmjs.org/package/array-back)
[![npm module downloads](http://img.shields.io/npm/dt/array-back.svg)](https://www.npmjs.org/package/array-back)
[![Build Status](https://travis-ci.org/75lb/array-back.svg?branch=master)](https://travis-ci.org/75lb/array-back)
[![Dependency Status](https://david-dm.org/75lb/array-back.svg)](https://david-dm.org/75lb/array-back)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)
<a name="module_array-back"></a>
## array-back
**Example**
```js
var arrayify = require("array-back")
```
<a name="exp_module_array-back--arrayify"></a>
### arrayify(input) ⇒ <code>Array</code> ⏏
Takes any input and guarantees an array back.
- converts array-like objects (e.g. `arguments`) to a real array
- converts `undefined` to an empty array
- converts any another other, singular value (including `null`) into an array containing that value
- ignores input which is already an array
**Kind**: Exported function
| Param | Type | Description |
| --- | --- | --- |
| input | <code>\*</code> | the input value to convert to an array |
**Example**
```js
> a.arrayify(undefined)
[]
> a.arrayify(null)
[ null ]
> a.arrayify(0)
[ 0 ]
> a.arrayify([ 1, 2 ])
[ 1, 2 ]
> function f(){ return a.arrayify(arguments); }
> f(1,2,3)
[ 1, 2, 3 ]
```
* * *
&copy; 2015-16 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown).

View File

@ -0,0 +1,11 @@
[![view on npm](http://img.shields.io/npm/v/array-back.svg)](https://www.npmjs.org/package/array-back)
[![npm module downloads](http://img.shields.io/npm/dt/array-back.svg)](https://www.npmjs.org/package/array-back)
[![Build Status](https://travis-ci.org/75lb/array-back.svg?branch=master)](https://travis-ci.org/75lb/array-back)
[![Dependency Status](https://david-dm.org/75lb/array-back.svg)](https://david-dm.org/75lb/array-back)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)
{{>main}}
* * *
&copy; 2015-16 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown).

View File

@ -0,0 +1,47 @@
'use strict'
var t = require('typical')
/**
* @module array-back
* @example
* var arrayify = require("array-back")
*/
module.exports = arrayify
/**
* Takes any input and guarantees an array back.
*
* - converts array-like objects (e.g. `arguments`) to a real array
* - converts `undefined` to an empty array
* - converts any another other, singular value (including `null`) into an array containing that value
* - ignores input which is already an array
*
* @param {*} - the input value to convert to an array
* @returns {Array}
* @alias module:array-back
* @example
* > a.arrayify(undefined)
* []
*
* > a.arrayify(null)
* [ null ]
*
* > a.arrayify(0)
* [ 0 ]
*
* > a.arrayify([ 1, 2 ])
* [ 1, 2 ]
*
* > function f(){ return a.arrayify(arguments); }
* > f(1,2,3)
* [ 1, 2, 3 ]
*/
function arrayify (input) {
if (input === undefined) {
return []
} else if (t.isArrayLike(input)) {
return Array.prototype.slice.call(input)
} else {
return Array.isArray(input) ? input : [ input ]
}
}

View File

@ -0,0 +1,66 @@
{
"_from": "array-back@^1.0.3",
"_id": "array-back@1.0.4",
"_inBundle": false,
"_integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=",
"_location": "/test-value/array-back",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "array-back@^1.0.3",
"name": "array-back",
"escapedName": "array-back",
"rawSpec": "^1.0.3",
"saveSpec": null,
"fetchSpec": "^1.0.3"
},
"_requiredBy": [
"/test-value"
],
"_resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz",
"_shasum": "644ba7f095f7ffcf7c43b5f0dc39d3c1f03c063b",
"_spec": "array-back@^1.0.3",
"_where": "/home/wn/workspace-node/homepage/node_modules/test-value",
"author": {
"name": "Lloyd Brookes",
"email": "75pound@gmail.com"
},
"bugs": {
"url": "https://github.com/75lb/array-back/issues"
},
"bundleDependencies": false,
"dependencies": {
"typical": "^2.6.0"
},
"deprecated": false,
"description": "Guarantees an array back",
"devDependencies": {
"core-assert": "^0.2.1",
"jsdoc-to-markdown": "^2.0.1",
"test-runner": "^0.3.0"
},
"engines": {
"node": ">=0.12.0"
},
"homepage": "https://github.com/75lb/array-back#readme",
"keywords": [
"to",
"convert",
"return",
"array",
"arrayify"
],
"license": "MIT",
"main": "./lib/array-back.js",
"name": "array-back",
"repository": {
"type": "git",
"url": "git+https://github.com/75lb/array-back.git"
},
"scripts": {
"docs": "jsdoc2md -t jsdoc2md/README.hbs lib/*.js > README.md; echo",
"test": "test-runner test/*.js"
},
"version": "1.0.4"
}

View File

@ -0,0 +1,18 @@
'use strict'
var TestRunner = require('test-runner')
var arrayify = require('../')
var a = require('core-assert')
var runner = new TestRunner()
runner.test('arrayify()', function () {
a.deepStrictEqual(arrayify(undefined), [])
a.deepStrictEqual(arrayify(null), [ null ])
a.deepStrictEqual(arrayify(0), [ 0 ])
a.deepStrictEqual(arrayify([ 1, 2 ]), [ 1, 2 ])
function func () {
a.deepStrictEqual(arrayify(arguments), [ 1, 2, 3 ])
}
func(1, 2, 3)
})

63
node_modules/test-value/package.json generated vendored Normal file
View File

@ -0,0 +1,63 @@
{
"_from": "test-value@^2.1.0",
"_id": "test-value@2.1.0",
"_inBundle": false,
"_integrity": "sha1-Edpv9nDzRxpztiXKTz/c97t0gpE=",
"_location": "/test-value",
"_phantomChildren": {
"typical": "2.6.1"
},
"_requested": {
"type": "range",
"registry": true,
"raw": "test-value@^2.1.0",
"name": "test-value",
"escapedName": "test-value",
"rawSpec": "^2.1.0",
"saveSpec": null,
"fetchSpec": "^2.1.0"
},
"_requiredBy": [
"/find-replace"
],
"_resolved": "https://registry.npmjs.org/test-value/-/test-value-2.1.0.tgz",
"_shasum": "11da6ff670f3471a73b625ca4f3fdcf7bb748291",
"_spec": "test-value@^2.1.0",
"_where": "/home/wn/workspace-node/homepage/node_modules/find-replace",
"author": {
"name": "Lloyd Brookes",
"email": "75pound@gmail.com"
},
"bugs": {
"url": "https://github.com/75lb/test-value/issues"
},
"bundleDependencies": false,
"dependencies": {
"array-back": "^1.0.3",
"typical": "^2.6.0"
},
"deprecated": false,
"description": "Test a value in a variety of ways",
"devDependencies": {
"core-assert": "^0.2.0",
"jsdoc-to-markdown": "^2.0.0-alpha",
"test-runner": "^0.2.3"
},
"engines": {
"node": ">=0.10.0"
},
"homepage": "https://github.com/75lb/test-value#readme",
"keywords": [],
"license": "MIT",
"main": "./lib/test-value.js",
"name": "test-value",
"repository": {
"type": "git",
"url": "git+https://github.com/75lb/test-value.git"
},
"scripts": {
"docs": "jsdoc2md -t jsdoc2md/README.hbs lib/*.js > README.md; echo",
"test": "test-runner test/*.js"
},
"version": "2.1.0"
}

255
node_modules/test-value/test/test.js generated vendored Normal file
View File

@ -0,0 +1,255 @@
'use strict'
var TestRunner = require('test-runner')
var testValue = require('../')
var a = require('core-assert')
function TestClass () {
this.one = 1
}
var testClass = new TestClass()
var runner = new TestRunner()
var fixture = {
result: 'clive',
hater: true,
colour: 'red-ish',
deep: {
name: 'Zhana',
favourite: {
colour: [ 'white', 'red' ]
},
arr: [ 1, 2, 3 ]
},
nullVal: null,
boolTrue: true,
number: 5,
testClass: testClass,
arr: [ 1, 2, 3 ],
arrObjects: [
{ number: 1 },
{ number: 2 }
]
}
runner.test('testValue(obj, { property: primative })', function () {
a.strictEqual(testValue(fixture, { result: 'clive' }), true)
a.strictEqual(testValue(fixture, { hater: true }), true)
a.strictEqual(testValue(fixture, { result: 'clive', hater: true }), true)
a.strictEqual(testValue(fixture, { ibe: true }), false)
})
runner.test('testValue(obj, { !property: primative })', function () {
a.strictEqual(testValue(fixture, { '!result': 'clive' }), false)
a.strictEqual(testValue(fixture, { '!result': 'ian' }), true)
a.strictEqual(testValue(fixture, { '!result': 'ian', '!hater': false }), true)
})
runner.test('testValue(obj, { property: primative[] })', function () {
a.strictEqual(testValue(fixture, { arr: [ 1, 2, 3 ] }), true)
a.strictEqual(testValue(fixture, { arr: [ /1/ ] }), true)
a.strictEqual(testValue(fixture, { arr: [ /4/ ] }), false)
a.strictEqual(testValue(fixture, { colour: [ 1, 2, 3 ] }), false, 'querying a string with array')
a.strictEqual(testValue(fixture, { undefinedProperty: [ 1, 2, 3 ] }), false, 'querying undefined property')
a.strictEqual(testValue(fixture, { undefinedProperty: [ undefined ] }), true)
a.strictEqual(testValue(fixture, { undefinedProperty: [ null ] }), false)
})
runner.test('testValue(obj, { property: { property: primative[] } })', function () {
a.strictEqual(testValue(fixture, { deep: { arr: [ 1, 2 ] } }), true)
a.strictEqual(testValue(fixture, { deep: { arr: [ 3, 4 ] } }), true)
a.strictEqual(testValue(fixture, { deep: { favourite: { colour: [ 'white', 'red' ] } } }), true)
})
runner.test('testValue(obj, { property: undefined, property: regex })', function () {
a.strictEqual(testValue(fixture.deep, { undefinedProperty: undefined, name: /.+/ }), true)
})
runner.test('testValue(obj, { property: /regex/ })', function () {
a.strictEqual(testValue(fixture, { colour: /red/ }), true)
a.strictEqual(testValue(fixture, { colour: /black/ }), false)
a.strictEqual(testValue(fixture, { colour: /RED/i }), true)
a.strictEqual(testValue(fixture, { colour: /.+/ }), true)
a.strictEqual(testValue(fixture, { undefinedProperty: /.+/ }), false, 'testing undefined val')
a.strictEqual(testValue(fixture, { deep: /.+/ }), false, 'testing an object val')
a.strictEqual(testValue(fixture, { nullVal: /.+/ }), false, 'testing a null val')
a.strictEqual(testValue(fixture, { boolTrue: /true/ }), true, 'testing a boolean val')
a.strictEqual(testValue(fixture, { boolTrue: /addf/ }), false, 'testing a boolean val')
})
runner.test('testValue(obj, { !property: /regex/ })', function () {
a.strictEqual(testValue(fixture, { '!colour': /red/ }), false)
a.strictEqual(testValue(fixture, { '!colour': /black/ }), true)
a.strictEqual(testValue(fixture, { '!colour': /blue/ }), true)
})
runner.test('testValue(obj, { property: function })', function () {
a.strictEqual(testValue(fixture, { number: function (n) { return n < 4 } }), false, '< 4')
a.strictEqual(testValue(fixture, { number: function (n) { return n < 10 } }), true, '< 10')
})
runner.test('testValue(obj, { !property: function })', function () {
a.strictEqual(testValue(fixture, { '!number': function (n) { return n < 10 } }), false, '< 10')
})
runner.test('testValue(obj, { property: object })', function () {
a.strictEqual(testValue(fixture, { testClass: { one: 1 } }), true, 'querying a plain object')
a.strictEqual(testValue(fixture, { testClass: testClass }), true, 'querying an object instance')
})
runner.test('testValue(obj, { +property: primitive })', function () {
a.strictEqual(testValue(fixture, { arr: 1 }), false)
a.strictEqual(testValue(fixture, { '+arr': 1 }), true)
})
runner.test('testValue(obj, { property. { +property: query } })', function () {
a.strictEqual(testValue(fixture, { deep: { favourite: { '+colour': 'red' } } }), true)
a.strictEqual(testValue(fixture, { deep: { favourite: { '+colour': /red/ } } }), true)
a.strictEqual(testValue(fixture, { deep: { favourite: { '+colour': function (c) {
return c === 'red'
} } } }), true)
a.strictEqual(testValue(fixture, { deep: { favourite: { '+colour': /green/ } } }), false)
})
runner.test('testValue(obj, { +property: query })', function () {
a.strictEqual(testValue(fixture, { arrObjects: { number: 1 } }), false)
a.strictEqual(testValue(fixture, { '+arrObjects': { number: 1 } }), true)
})
runner.test('object deep exists, summary', function () {
var query = {
one: {
one: {
three: 'three',
'!four': 'four'
},
two: {
one: {
one: 'one'
},
'!two': undefined,
'!three': [ { '!one': { '!one': '110' } } ]
}
}
}
var obj1 = {
one: {
one: {
one: 'one',
two: 'two',
three: 'three'
},
two: {
one: {
one: 'one'
},
two: 2
}
}
}
var obj2 = {
one: {
one: {
one: 'one',
two: 'two'
},
two: {
one: {
one: 'one'
},
two: 2
}
}
}
var obj3 = {
one: {
one: {
one: 'one',
two: 'two',
three: 'three'
},
two: {
one: {
one: 'one'
},
two: 2,
three: [
{ one: { one: '100' } },
{ one: { one: '110' } }
]
}
}
}
var obj4 = {
one: {
one: {
one: 'one',
two: 'two',
three: 'three'
},
two: {
one: {
one: 'one'
},
two: 2,
three: [
{ one: { one: '100' } }
]
}
}
}
a.strictEqual(testValue(obj1, query), true, 'true obj1')
a.strictEqual(testValue(obj2, query), false, 'false obj2')
a.strictEqual(testValue(obj3, query), false, 'false in obj3')
a.strictEqual(testValue(obj4, query), true, 'true in obj4')
})
runner.test('testValue.where({ property: primative })', function () {
var arr = [
{ num: 1 }, { num: 2 }, { num: 3 }
]
a.strictEqual(arr.some(testValue.where({ num: 2 })), true)
a.strictEqual(arr.some(testValue.where({ num: 4 })), false)
a.deepEqual(arr.filter(testValue.where({ num: 2 })), [ { num: 2 } ])
a.deepEqual(arr.filter(testValue.where({ num: 4 })), [])
})
runner.test('testValue(val, object, { strict: true })', function () {
var obj1 = { one: 1 }
var query1 = { one: 1 }
var query2 = { two: 2 }
a.strictEqual(testValue(obj1, query1), true)
a.strictEqual(testValue(obj1, query1, { strict: true }), false)
a.strictEqual(testValue(obj1, query2), false)
a.strictEqual(testValue(obj1, query2, { strict: true }), false)
a.strictEqual(testValue(obj1, [ query1 ]), true)
a.strictEqual(testValue(obj1, [ query1 ], { strict: true }), false)
a.strictEqual(testValue(obj1, [ query2 ]), false)
a.strictEqual(testValue(obj1, [ query2 ], { strict: true }), false)
a.strictEqual(testValue(obj1, [ query1, query2 ]), true)
a.strictEqual(testValue(obj1, [ query1, query2 ], { strict: true }), false)
a.strictEqual(testValue(obj1, [ query1, query2, obj1 ], { strict: true }), true)
a.strictEqual(testValue(Object.getPrototypeOf([ 1, 2 ]), Array.prototype), true)
a.strictEqual(testValue(Object.getPrototypeOf([ 1, 2 ]), [ Array.prototype ]), true)
a.strictEqual(testValue(Object.getPrototypeOf([ 1, 2 ]), Array.prototype, { strict: true }), true)
a.strictEqual(testValue(Object.getPrototypeOf([ 1, 2 ]), [ Array.prototype ], { strict: true }), true)
function one () {}
a.strictEqual(testValue(one, Function.prototype), false)
a.strictEqual(testValue(Object.getPrototypeOf(one), Function.prototype), true)
a.strictEqual(testValue(Object.getPrototypeOf(one), [ Function.prototype ]), true)
a.strictEqual(testValue(Object.getPrototypeOf(one), Function.prototype, { strict: true }), true)
a.strictEqual(testValue(Object.getPrototypeOf(one), [ Function.prototype ], { strict: true }), true)
a.strictEqual(testValue({}, Object.prototype), false)
a.strictEqual(testValue(Object.getPrototypeOf({}), Object.prototype), true)
a.strictEqual(testValue(Object.getPrototypeOf({}), [ Object.prototype ]), true)
a.strictEqual(testValue(Object.getPrototypeOf({}), Object.prototype, { strict: true }), true)
a.strictEqual(testValue(Object.getPrototypeOf({}), [ Object.prototype ], { strict: true }), true)
})