pax_global_header00006660000000000000000000000064131222466620014516gustar00rootroot0000000000000052 comment=98047038ba3cc7abf67aa14bfabdf168ea62ae30 tsame-1.1.2/000077500000000000000000000000001312224666200126305ustar00rootroot00000000000000tsame-1.1.2/.gitignore000066400000000000000000000000421312224666200146140ustar00rootroot00000000000000node_modules .nyc_output coverage tsame-1.1.2/.travis.yml000066400000000000000000000002211312224666200147340ustar00rootroot00000000000000language: node_js sudo: false node_js: - 8 - 6 - 4 notifications: email: false cache: directories: - $HOME/.npm - node_modules tsame-1.1.2/LICENSE000066400000000000000000000014211312224666200136330ustar00rootroot00000000000000The ISC License Copyright (c) Forrest L Norvell, Isaac Z. Schlueter, and Contributors Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. tsame-1.1.2/README.md000066400000000000000000000011011312224666200141000ustar00rootroot00000000000000# tsame Verify that two objects are the same, for use in [tap](http://www.node-tap.org/). The less accepting cousin of [tmatch](http://npm.im/tmatch). This merges code originally found in [only-shallow](http://npm.im/only-shallow) and [deeper](http://npm.im/deeper). See license file for more details. ## USAGE ```javascript const tsame = require('tsame') const obj1 = { foo: '1' } const obj2 = { foo: 1 } // nonstrict by default assert(tsame(obj1, obj2)) // strictly the same, types and all assert(!tsame.strict(obj1, obj2)) ``` Pretty much what it says on the tin. tsame-1.1.2/index.js000066400000000000000000000114411312224666200142760ustar00rootroot00000000000000'use strict' module.exports = shallow shallow.strict = strict // TODO a future version of this that drops node 0.x support will // check for Symbol.iterator, and handle anything that can be passed // to Array.from() var hasSet = typeof Set === 'function' function isSet (object) { return hasSet && (object instanceof Set) } function isMap (object) { return hasSet && (object instanceof Map) } function setSame (a, b) { var ret = a.size === b.size if (a.size && ret) { a.forEach(function (entry) { if (ret) ret = b.has(entry) }) } return ret } function mapSame (a, b, ca, cb, fn) { var ret = a.size === b.size if (a.size && ret) { a.forEach(function (value, key) { if (ret) ret = b.has(key) if (ret) ret = fn(value, b.get(key), ca, cb) }) } return ret } function isArguments (object) { return Object.prototype.toString.call(object) === '[object Arguments]' } function arrayFrom (obj) { return Array.isArray(obj) ? obj : Array.from ? Array.from(obj) : Array.prototype.slice.call(obj) } function strict (a, b) { return deeper(a, b, [], []) } function deeper (a, b, ca, cb) { return a === b ? true : a !== a ? b !== b : typeof a !== 'object' || typeof b !== 'object' ? false : a === null || b === null ? false : Buffer.isBuffer(a) && Buffer.isBuffer(b) ? bufferSame(a, b) : a instanceof Date && b instanceof Date ? a.getTime() === b.getTime() : a instanceof RegExp && b instanceof RegExp ? regexpSame(a, b) : isArguments(a) ? isArguments(b) && deeper(arrayFrom(a), arrayFrom(b), ca, cb) : isArguments(b) ? false : a.constructor !== b.constructor ? false : isSet(a) && isSet(b) ? setSame(a, b) : isMap(a) && isMap(b) ? mapSame(a, b, ca, cb, deeper) : deeperObj(a, b, Object.keys(a), Object.keys(b), ca, cb) } function deeperObj (a, b, ka, kb, ca, cb) { // don't bother with stack acrobatics if there's nothing there return ka.length === 0 && kb.length === 0 ? true : ka.length !== kb.length ? false : deeperObj_(a, b, ka, kb, ca, cb) } function deeperObj_ (a, b, ka, kb, ca, cb) { var ret = true var cal = ca.length var go = true while (cal-- && go) { if (ca[cal] === a) { ret = cb[cal] === b go = false } } if (go) { ca.push(a) cb.push(b) ka.sort() kb.sort() for (var j = ka.length - 1; j >= 0 && ret; j--) { if (ka[j] !== kb[j]) ret = false } if (ret) { var key for (var k = ka.length - 1; k >= 0 && ret; k--) { key = ka[k] if (!deeper(a[key], b[key], ca, cb)) ret = false } } if (ret) { ca.pop() cb.pop() } } return ret } function shallow (a, b) { return shallower(a, b, [], []) } function regexpSame (a, b) { return a.source === b.source && a.global === b.global && a.multiline === b.multiline && a.lastIndex === b.lastIndex && a.ignoreCase === b.ignoreCase } function bufferSame (a, b) { var ret if (a.equals) { ret = a.equals(b) } else if (a.length !== b.length) { ret = false } else { ret = true for (var j = 0; j < a.length && ret; j++) { if (a[j] != b[j]) ret = false } } return ret } function shallower (a, b, ca, cb) { return typeof a !== 'object' && typeof b !== 'object' && a == b ? true : a === null || b === null ? a == b : a !== a ? b !== b : typeof a !== 'object' || typeof b !== 'object' ? false : Buffer.isBuffer(a) && Buffer.isBuffer(b) ? bufferSame(a, b) : a instanceof Date && b instanceof Date ? a.getTime() === b.getTime() : a instanceof RegExp && b instanceof RegExp ? regexpSame(a, b) : isArguments(a) || isArguments(b) ? shallower(arrayFrom(a), arrayFrom(b), ca, cb) : isSet(a) && isSet(b) ? setSame(a, b) : isMap(a) && isMap(b) ? mapSame(a, b, ca, cb, shallower) : shallowerObj(a, b, Object.keys(a), Object.keys(b), ca, cb) } function shallowerObj (a, b, ka, kb, ca, cb) { // don't bother with stack acrobatics if there's nothing there return ka.length === 0 && kb.length === 0 ? true : ka.length !== kb.length ? false : shallowerObj_(a, b, ka, kb, ca, cb) } function shallowerObj_ (a, b, ka, kb, ca, cb) { var ret var cal = ca.length var go = true while (cal-- && go) { if (ca[cal] === a) { ret = cb[cal] === b go = false } } if (go) { ca.push(a) cb.push(b) ka.sort() kb.sort() ret = true for (var k = ka.length - 1; k >= 0 && ret; k--) { if (ka[k] !== kb[k]) ret = false } if (ret) { var key for (var l = ka.length - 1; l >= 0 && ret; l--) { key = ka[l] if (!shallower(a[key], b[key], ca, cb)) ret = false } } if (ret) { ca.pop() cb.pop() } } return ret } tsame-1.1.2/package-lock.json000066400000000000000000001303311312224666200160450ustar00rootroot00000000000000{ "name": "tsame", "version": "1.1.2", "lockfileVersion": 1, "dependencies": { "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, "ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, "argparse": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=" }, "asn1": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" }, "assert-plus": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "aws-sign2": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=" }, "aws4": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "bcrypt-pbkdf": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", "optional": true }, "bind-obj-methods": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/bind-obj-methods/-/bind-obj-methods-1.0.0.tgz", "integrity": "sha1-T1l5ysFXk633DkiBYeRj4gnKUJw=" }, "bluebird": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", "integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw=" }, "boom": { "version": "2.10.1", "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=" }, "brace-expansion": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=" }, "caseless": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=" }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=" }, "clean-yaml-object": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz", "integrity": "sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=" }, "color-support": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==" }, "combined-stream": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=" }, "commander": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=" }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "coveralls": { "version": "2.13.1", "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-2.13.1.tgz", "integrity": "sha1-1wu5rMGDXsTwY/+drFQjwXsR8Xg=", "dependencies": { "js-yaml": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz", "integrity": "sha1-bl/mfYsgXOTSL60Ft3geja3MSzA=" } } }, "cross-spawn": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=" }, "cryptiles": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=" }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "dependencies": { "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, "debug": { "version": "2.6.8", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=" }, "deeper": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/deeper/-/deeper-2.1.0.tgz", "integrity": "sha1-vFZOX3MXT98gHgiwADDooU2nQ2g=" }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, "diff": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=" }, "ecc-jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", "optional": true }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "esprima": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" }, "events-to-array": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz", "integrity": "sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y=" }, "extend": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" }, "extsprintf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=" }, "foreground-child": { "version": "1.5.6", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=" }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "form-data": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=" }, "fs-exists-cached": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-exists-cached/-/fs-exists-cached-1.0.0.tgz", "integrity": "sha1-zyVVTKBQ3EmuZla0HeQiWJidy84=" }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "function-loop": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/function-loop/-/function-loop-1.0.1.tgz", "integrity": "sha1-gHa7MF6OajzO7ikgdl8zDRkPNAw=" }, "generate-function": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=" }, "generate-object-property": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=" }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "dependencies": { "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==" }, "graceful-readlink": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=" }, "har-validator": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=" }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=" }, "hawk": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=" }, "hoek": { "version": "2.16.3", "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" }, "http-signature": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=" }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=" }, "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "is-my-json-valid": { "version": "2.16.0", "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz", "integrity": "sha1-8Hndm/2uZe4gOKrorLyGqxCeNpM=" }, "is-property": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=" }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "isexe": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/isexe/-/isexe-1.1.2.tgz", "integrity": "sha1-NvPiLmB1CSD15yQaR2qMakInWtA=" }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, "js-yaml": { "version": "3.8.4", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.8.4.tgz", "integrity": "sha1-UgtFZPhlc7qWZir4Woyvp7S1pvY=", "dependencies": { "esprima": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" } } }, "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "optional": true }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "jsonpointer": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=" }, "jsprim": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz", "integrity": "sha1-o7h+QCmNjDgFUtjMdiigu5WiKRg=", "dependencies": { "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, "lcov-parse": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=" }, "log-driver": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.5.tgz", "integrity": "sha1-euTsJXMC/XkNVXyxDJcQDYV7AFY=" }, "lru-cache": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==" }, "mime-db": { "version": "1.27.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE=" }, "mime-types": { "version": "2.1.15", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=" }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==" }, "minimist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "nyc": { "version": "11.0.2", "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.0.2.tgz", "integrity": "sha512-31rRd6ME9NM17w0oPKqi51a6fzJAqYarnzQXK+iL8XaX+3H6VH0BQut7qHIgrv2mBASRic4oNi2KRgcbFODrsQ==", "dependencies": { "align-text": { "version": "0.1.4", "bundled": true }, "amdefine": { "version": "1.0.1", "bundled": true }, "ansi-regex": { "version": "2.1.1", "bundled": true }, "ansi-styles": { "version": "2.2.1", "bundled": true }, "append-transform": { "version": "0.4.0", "bundled": true }, "archy": { "version": "1.0.0", "bundled": true }, "arr-diff": { "version": "2.0.0", "bundled": true }, "arr-flatten": { "version": "1.0.3", "bundled": true }, "array-unique": { "version": "0.2.1", "bundled": true }, "arrify": { "version": "1.0.1", "bundled": true }, "async": { "version": "1.5.2", "bundled": true }, "babel-code-frame": { "version": "6.22.0", "bundled": true }, "babel-generator": { "version": "6.24.1", "bundled": true }, "babel-messages": { "version": "6.23.0", "bundled": true }, "babel-runtime": { "version": "6.23.0", "bundled": true }, "babel-template": { "version": "6.24.1", "bundled": true }, "babel-traverse": { "version": "6.24.1", "bundled": true }, "babel-types": { "version": "6.24.1", "bundled": true }, "babylon": { "version": "6.17.2", "bundled": true }, "balanced-match": { "version": "0.4.2", "bundled": true }, "brace-expansion": { "version": "1.1.7", "bundled": true }, "braces": { "version": "1.8.5", "bundled": true }, "builtin-modules": { "version": "1.1.1", "bundled": true }, "caching-transform": { "version": "1.0.1", "bundled": true }, "center-align": { "version": "0.1.3", "bundled": true, "optional": true }, "chalk": { "version": "1.1.3", "bundled": true }, "cliui": { "version": "2.1.0", "bundled": true, "optional": true, "dependencies": { "wordwrap": { "version": "0.0.2", "bundled": true, "optional": true } } }, "code-point-at": { "version": "1.1.0", "bundled": true }, "commondir": { "version": "1.0.1", "bundled": true }, "concat-map": { "version": "0.0.1", "bundled": true }, "convert-source-map": { "version": "1.5.0", "bundled": true }, "core-js": { "version": "2.4.1", "bundled": true }, "cross-spawn": { "version": "4.0.2", "bundled": true }, "debug": { "version": "2.6.8", "bundled": true }, "debug-log": { "version": "1.0.1", "bundled": true }, "decamelize": { "version": "1.2.0", "bundled": true }, "default-require-extensions": { "version": "1.0.0", "bundled": true }, "detect-indent": { "version": "4.0.0", "bundled": true }, "error-ex": { "version": "1.3.1", "bundled": true }, "escape-string-regexp": { "version": "1.0.5", "bundled": true }, "esutils": { "version": "2.0.2", "bundled": true }, "execa": { "version": "0.5.1", "bundled": true }, "expand-brackets": { "version": "0.1.5", "bundled": true }, "expand-range": { "version": "1.8.2", "bundled": true }, "extglob": { "version": "0.3.2", "bundled": true }, "filename-regex": { "version": "2.0.1", "bundled": true }, "fill-range": { "version": "2.2.3", "bundled": true }, "find-cache-dir": { "version": "0.1.1", "bundled": true }, "find-up": { "version": "2.1.0", "bundled": true }, "for-in": { "version": "1.0.2", "bundled": true }, "for-own": { "version": "0.1.5", "bundled": true }, "foreground-child": { "version": "1.5.6", "bundled": true }, "fs.realpath": { "version": "1.0.0", "bundled": true }, "get-caller-file": { "version": "1.0.2", "bundled": true }, "get-stream": { "version": "2.3.1", "bundled": true }, "glob": { "version": "7.1.2", "bundled": true }, "glob-base": { "version": "0.3.0", "bundled": true }, "glob-parent": { "version": "2.0.0", "bundled": true }, "globals": { "version": "9.17.0", "bundled": true }, "graceful-fs": { "version": "4.1.11", "bundled": true }, "handlebars": { "version": "4.0.10", "bundled": true, "dependencies": { "source-map": { "version": "0.4.4", "bundled": true } } }, "has-ansi": { "version": "2.0.0", "bundled": true }, "has-flag": { "version": "1.0.0", "bundled": true }, "hosted-git-info": { "version": "2.4.2", "bundled": true }, "imurmurhash": { "version": "0.1.4", "bundled": true }, "inflight": { "version": "1.0.6", "bundled": true }, "inherits": { "version": "2.0.3", "bundled": true }, "invariant": { "version": "2.2.2", "bundled": true }, "invert-kv": { "version": "1.0.0", "bundled": true }, "is-arrayish": { "version": "0.2.1", "bundled": true }, "is-buffer": { "version": "1.1.5", "bundled": true }, "is-builtin-module": { "version": "1.0.0", "bundled": true }, "is-dotfile": { "version": "1.0.3", "bundled": true }, "is-equal-shallow": { "version": "0.1.3", "bundled": true }, "is-extendable": { "version": "0.1.1", "bundled": true }, "is-extglob": { "version": "1.0.0", "bundled": true }, "is-finite": { "version": "1.0.2", "bundled": true }, "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true }, "is-glob": { "version": "2.0.1", "bundled": true }, "is-number": { "version": "2.1.0", "bundled": true }, "is-posix-bracket": { "version": "0.1.1", "bundled": true }, "is-primitive": { "version": "2.0.0", "bundled": true }, "is-stream": { "version": "1.1.0", "bundled": true }, "is-utf8": { "version": "0.2.1", "bundled": true }, "isarray": { "version": "1.0.0", "bundled": true }, "isexe": { "version": "2.0.0", "bundled": true }, "isobject": { "version": "2.1.0", "bundled": true }, "istanbul-lib-coverage": { "version": "1.1.1", "bundled": true }, "istanbul-lib-hook": { "version": "1.0.7", "bundled": true }, "istanbul-lib-instrument": { "version": "1.7.2", "bundled": true }, "istanbul-lib-report": { "version": "1.1.1", "bundled": true, "dependencies": { "supports-color": { "version": "3.2.3", "bundled": true } } }, "istanbul-lib-source-maps": { "version": "1.2.1", "bundled": true }, "istanbul-reports": { "version": "1.1.1", "bundled": true }, "js-tokens": { "version": "3.0.1", "bundled": true }, "jsesc": { "version": "1.3.0", "bundled": true }, "kind-of": { "version": "3.2.2", "bundled": true }, "lazy-cache": { "version": "1.0.4", "bundled": true, "optional": true }, "lcid": { "version": "1.0.0", "bundled": true }, "load-json-file": { "version": "1.1.0", "bundled": true }, "locate-path": { "version": "2.0.0", "bundled": true, "dependencies": { "path-exists": { "version": "3.0.0", "bundled": true } } }, "lodash": { "version": "4.17.4", "bundled": true }, "longest": { "version": "1.0.1", "bundled": true }, "loose-envify": { "version": "1.3.1", "bundled": true }, "lru-cache": { "version": "4.0.2", "bundled": true }, "md5-hex": { "version": "1.3.0", "bundled": true }, "md5-o-matic": { "version": "0.1.1", "bundled": true }, "mem": { "version": "1.1.0", "bundled": true }, "merge-source-map": { "version": "1.0.3", "bundled": true }, "micromatch": { "version": "2.3.11", "bundled": true }, "mimic-fn": { "version": "1.1.0", "bundled": true }, "minimatch": { "version": "3.0.4", "bundled": true }, "minimist": { "version": "0.0.8", "bundled": true }, "mkdirp": { "version": "0.5.1", "bundled": true }, "ms": { "version": "2.0.0", "bundled": true }, "normalize-package-data": { "version": "2.3.8", "bundled": true }, "normalize-path": { "version": "2.1.1", "bundled": true }, "npm-run-path": { "version": "2.0.2", "bundled": true }, "number-is-nan": { "version": "1.0.1", "bundled": true }, "object-assign": { "version": "4.1.1", "bundled": true }, "object.omit": { "version": "2.0.1", "bundled": true }, "once": { "version": "1.4.0", "bundled": true }, "optimist": { "version": "0.6.1", "bundled": true }, "os-homedir": { "version": "1.0.2", "bundled": true }, "os-locale": { "version": "2.0.0", "bundled": true }, "p-finally": { "version": "1.0.0", "bundled": true }, "p-limit": { "version": "1.1.0", "bundled": true }, "p-locate": { "version": "2.0.0", "bundled": true }, "parse-glob": { "version": "3.0.4", "bundled": true }, "parse-json": { "version": "2.2.0", "bundled": true }, "path-exists": { "version": "2.1.0", "bundled": true }, "path-is-absolute": { "version": "1.0.1", "bundled": true }, "path-key": { "version": "2.0.1", "bundled": true }, "path-parse": { "version": "1.0.5", "bundled": true }, "path-type": { "version": "1.1.0", "bundled": true }, "pify": { "version": "2.3.0", "bundled": true }, "pinkie": { "version": "2.0.4", "bundled": true }, "pinkie-promise": { "version": "2.0.1", "bundled": true }, "pkg-dir": { "version": "1.0.0", "bundled": true, "dependencies": { "find-up": { "version": "1.1.2", "bundled": true } } }, "preserve": { "version": "0.2.0", "bundled": true }, "pseudomap": { "version": "1.0.2", "bundled": true }, "randomatic": { "version": "1.1.6", "bundled": true }, "read-pkg": { "version": "1.1.0", "bundled": true }, "read-pkg-up": { "version": "1.0.1", "bundled": true, "dependencies": { "find-up": { "version": "1.1.2", "bundled": true } } }, "regenerator-runtime": { "version": "0.10.5", "bundled": true }, "regex-cache": { "version": "0.4.3", "bundled": true }, "remove-trailing-separator": { "version": "1.0.1", "bundled": true }, "repeat-element": { "version": "1.1.2", "bundled": true }, "repeat-string": { "version": "1.6.1", "bundled": true }, "repeating": { "version": "2.0.1", "bundled": true }, "require-directory": { "version": "2.1.1", "bundled": true }, "require-main-filename": { "version": "1.0.1", "bundled": true }, "resolve-from": { "version": "2.0.0", "bundled": true }, "right-align": { "version": "0.1.3", "bundled": true, "optional": true }, "rimraf": { "version": "2.6.1", "bundled": true }, "semver": { "version": "5.3.0", "bundled": true }, "set-blocking": { "version": "2.0.0", "bundled": true }, "signal-exit": { "version": "3.0.2", "bundled": true }, "slide": { "version": "1.1.6", "bundled": true }, "source-map": { "version": "0.5.6", "bundled": true }, "spawn-wrap": { "version": "1.3.6", "bundled": true }, "spdx-correct": { "version": "1.0.2", "bundled": true }, "spdx-expression-parse": { "version": "1.0.4", "bundled": true }, "spdx-license-ids": { "version": "1.2.2", "bundled": true }, "string-width": { "version": "2.0.0", "bundled": true, "dependencies": { "is-fullwidth-code-point": { "version": "2.0.0", "bundled": true } } }, "strip-ansi": { "version": "3.0.1", "bundled": true }, "strip-bom": { "version": "2.0.0", "bundled": true }, "strip-eof": { "version": "1.0.0", "bundled": true }, "supports-color": { "version": "2.0.0", "bundled": true }, "test-exclude": { "version": "4.1.1", "bundled": true }, "to-fast-properties": { "version": "1.0.3", "bundled": true }, "trim-right": { "version": "1.0.1", "bundled": true }, "uglify-js": { "version": "2.8.27", "bundled": true, "optional": true, "dependencies": { "camelcase": { "version": "1.2.1", "bundled": true, "optional": true }, "yargs": { "version": "3.10.0", "bundled": true, "optional": true } } }, "uglify-to-browserify": { "version": "1.0.2", "bundled": true, "optional": true }, "validate-npm-package-license": { "version": "3.0.1", "bundled": true }, "which": { "version": "1.2.14", "bundled": true }, "which-module": { "version": "2.0.0", "bundled": true }, "window-size": { "version": "0.1.0", "bundled": true, "optional": true }, "wordwrap": { "version": "0.0.3", "bundled": true }, "wrap-ansi": { "version": "2.1.0", "bundled": true, "dependencies": { "string-width": { "version": "1.0.2", "bundled": true } } }, "wrappy": { "version": "1.0.2", "bundled": true }, "write-file-atomic": { "version": "1.3.4", "bundled": true }, "y18n": { "version": "3.2.1", "bundled": true }, "yallist": { "version": "2.1.2", "bundled": true }, "yargs": { "version": "8.0.1", "bundled": true, "dependencies": { "camelcase": { "version": "4.1.0", "bundled": true }, "cliui": { "version": "3.2.0", "bundled": true, "dependencies": { "string-width": { "version": "1.0.2", "bundled": true } } }, "load-json-file": { "version": "2.0.0", "bundled": true }, "path-type": { "version": "2.0.0", "bundled": true }, "read-pkg": { "version": "2.0.0", "bundled": true }, "read-pkg-up": { "version": "2.0.0", "bundled": true }, "strip-bom": { "version": "3.0.0", "bundled": true }, "yargs-parser": { "version": "7.0.0", "bundled": true } } }, "yargs-parser": { "version": "5.0.0", "bundled": true, "dependencies": { "camelcase": { "version": "3.0.0", "bundled": true } } } } }, "oauth-sign": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=" }, "only-shallow": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/only-shallow/-/only-shallow-1.2.0.tgz", "integrity": "sha1-cc7O26kyS8BRiu8Q7AgNMkncJGU=" }, "opener": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/opener/-/opener-1.4.3.tgz", "integrity": "sha1-XG2ixdflgx6P+jlklQ+NZnSskLg=" }, "os-homedir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.1.tgz", "integrity": "sha1-DWK99EuRb9O73PLKsZGUj7CU8Ac=" }, "own-or": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/own-or/-/own-or-1.0.0.tgz", "integrity": "sha1-Tod/vtqaLsgAD7wLyuOWRe6L+Nw=" }, "own-or-env": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/own-or-env/-/own-or-env-1.0.0.tgz", "integrity": "sha1-nvkg/IHi5jz1nUEQElg2jPT8pPs=" }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "pinkie": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" }, "pinkie-promise": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=" }, "process-nextick-args": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" }, "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" }, "qs": { "version": "6.3.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=" }, "readable-stream": { "version": "2.2.11", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.11.tgz", "integrity": "sha512-h+8+r3MKEhkiVrwdKL8aWs1oc1VvBu33ueshOvS26RsZQ3Amhx/oO3TKe4lApSV9ueY6as8EAh7mtuFjdlhg9Q==" }, "request": { "version": "2.79.0", "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=" }, "safe-buffer": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=" }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, "sntp": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=" }, "source-map": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=" }, "source-map-support": { "version": "0.4.15", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.15.tgz", "integrity": "sha1-AyAt9lwG0r2MfsI2KhkwVv7407E=" }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, "sshpk": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", "dependencies": { "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, "stack-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz", "integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA=" }, "string_decoder": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.2.tgz", "integrity": "sha1-sp4fThEl+pehA4K4pTNze3SR4Xk=" }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=" }, "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" }, "tap": { "version": "10.4.0", "resolved": "https://registry.npmjs.org/tap/-/tap-10.4.0.tgz", "integrity": "sha512-Di3Z3EHD9rC6mt56VcKKRo0KG+j+lq0EfLm3Yu6pjgSwcSeJ22sjZYzqv0I8bG67pSkeOLg+G+cfAvAywaiBvA==" }, "tap-mocha-reporter": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/tap-mocha-reporter/-/tap-mocha-reporter-3.0.5.tgz", "integrity": "sha512-YIoWejBBb+6gKOdu5B4H4oIKQhmRJsYGHSE5a6Mv87jriBDy/fAVLRVuMHTAP/vufYPcI3CKAck9VvnZxtQ4mA==" }, "tap-parser": { "version": "5.4.0", "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-5.4.0.tgz", "integrity": "sha512-BIsIaGqv7uTQgTW1KLTMNPSEQf4zDDPgYOBRdgOfuB+JFOLRBfEu6cLa/KvMvmqggu1FKXDfitjLwsq4827RvA==" }, "tmatch": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/tmatch/-/tmatch-3.0.0.tgz", "integrity": "sha1-fSBx3tu8WH8ZSs2jBnvQdHtnCZE=" }, "tough-cookie": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=" }, "trivial-deferred": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trivial-deferred/-/trivial-deferred-1.0.1.tgz", "integrity": "sha1-N21NKdlR1jaKb3oK6FwvTV4GWPM=" }, "tunnel-agent": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=" }, "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "optional": true }, "unicode-length": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/unicode-length/-/unicode-length-1.0.3.tgz", "integrity": "sha1-Wtp6f+1RhBpBijKM8UlHisg1irs=" }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "uuid": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" }, "verror": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=" }, "which": { "version": "1.2.14", "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", "dependencies": { "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" } } }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" }, "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" }, "yapool": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/yapool/-/yapool-1.0.0.tgz", "integrity": "sha1-9pPymjFbUNmp2iZGp6ZkXJaYW2o=" } } } tsame-1.1.2/package.json000066400000000000000000000010271312224666200151160ustar00rootroot00000000000000{ "name": "tsame", "version": "1.1.2", "description": "the logic behind tap's t.same() and t.strictSame()", "main": "index.js", "devDependencies": { "tap": "^10.4.0" }, "scripts": { "test": "tap -J --100 test", "preversion": "npm test", "postversion": "npm publish", "postpublish": "git push origin --all; git push origin --tags" }, "repository": { "type": "git", "url": "git+https://github.com/tapjs/tsame.git" }, "keywords": [], "license": "ISC", "files": [ "index.js" ] } tsame-1.1.2/test/000077500000000000000000000000001312224666200136075ustar00rootroot00000000000000tsame-1.1.2/test/loose/000077500000000000000000000000001312224666200147305ustar00rootroot00000000000000tsame-1.1.2/test/loose/array-from-missing.js000066400000000000000000000000651312224666200210150ustar00rootroot00000000000000'use strict' Array.from = null require('./basic.js') tsame-1.1.2/test/loose/basic.js000066400000000000000000000067661312224666200163660ustar00rootroot00000000000000var tap = require('tap') var test = tap.test var same = require('../..') test("NaN matches NaN", function (t) { t.ok(same(NaN, NaN)) t.end() }) test("shouldn't care about key order and types", function (t) { t.ok(same({ a: 1, b: 2 }, { b: 2, a: '1' })) t.end() }) test('should notice objects with different shapes', function (t) { t.notOk(same( { a: 1 }, { a: 1, b: undefined } )) t.end() }) test('should notice objects with different keys', function (t) { t.notOk(same( { a: 1, b: 2 }, { a: 1, c: 2 } )) t.end() }) test('should handle dates', function (t) { t.notOk(same(new Date('1972-08-01'), null)) t.notOk(same(new Date('1972-08-01'), undefined)) t.ok(same(new Date('1972-08-01'), new Date('1972-08-01'))) t.ok(same({ x: new Date('1972-08-01') }, { x: new Date('1972-08-01') })) t.end() }) test('should handle RegExps', function (t) { t.notOk(same(/[b]/, /[a]/)) t.notOk(same(/[a]/i, /[a]/g)) t.ok(same(/[a]/, /[a]/)) t.ok(same(/ab?[a-z]{,6}/g, /ab?[a-z]{,6}/g)) t.end() }) test('should handle functions', function (t) { var fnA = function (a) { return a } var fnB = function (a) { return a } t.notOk(same( function a () {}, function a () {} // but is it the _same_ a tho )) t.notOk(same(fnA, fnB)) t.ok(same(fnA, fnA)) t.ok(same(fnB, fnB)) t.end() }) test('should handle arguments', function (t) { var outer = arguments ;(function inner (tt) { var inner = arguments t.ok(same(outer, outer)) t.ok(same(outer, inner)) t.ok(same(outer, [t])) }(t)) t.end() }) test('same arrays match', function (t) { t.ok(same([1, 2, 3], [1, 2, 3])) t.end() }) test("different arrays don't match", function (t) { t.notOk(same([1, 2, 3], [1, 2, 3, 4])) t.notOk(same([1, 2, 3], [1, 2, 4])) t.end() }) test('empty arrays match', function (t) { t.ok(same([], [])) t.ok(same({ x: [] }, { x: [] })) t.end() }) test("shallower shouldn't care about key order recursively and types", function (t) { t.ok(same( { x: { a: 1, b: 2 }, y: { c: 3, d: 4 } }, { y: { d: 4, c: 3 }, x: { b: '2', a: '1' } } )) t.end() }) test('undefined is the same as itself', function (t) { t.ok(same(undefined, undefined)) t.ok(same({ x: undefined }, { x: undefined })) t.ok(same({ x: [undefined] }, { x: [undefined] })) t.end() }) test('undefined and null are Close Enough', function (t) { t.ok(same(undefined, null)) t.ok(same({ x: null }, { x: undefined })) t.ok(same({ x: [undefined] }, { x: [null] })) t.end() }) test("null is as shallow as you'd expect", function (t) { t.ok(same(null, null)) t.ok(same({ x: null }, { x: null })) t.ok(same({ x: [null] }, { x: [null] })) t.end() }) test('the same number matches', function (t) { t.ok(same(0, 0)) t.ok(same(1, 1)) t.ok(same(3.14, 3.14)) t.end() }) test("different numbers don't match", function (t) { t.notOk(same(0, 1)) t.notOk(same(1, -1)) t.notOk(same(3.14, 2.72)) t.end() }) test("shallower shouldn't care about key order (but still might) and types", function (t) { t.ok(same( [ { foo: { z: 100, y: 200, x: 300 } }, 'bar', 11, { baz: { d: 4, a: 1, b: 2, c: 3 } } ], [ { foo: { z: 100, y: 200, x: 300 } }, 'bar', 11, { baz: { a: '1', b: '2', c: '3', d: '4' } } ] )) t.end() }) test("shallower shouldn't blow up on circular data structures", function (t) { var x1 = { z: 4 } var y1 = { x: x1 } x1.y = y1 var x2 = { z: 4 } var y2 = { x: x2 } x2.y = y2 t.ok(same(x1, x2)) t.end() }) tsame-1.1.2/test/loose/buffer-native-equals.js000066400000000000000000000014201312224666200213100ustar00rootroot00000000000000var tap = require('tap') var test = tap.test var same = require('../..') test('should match empty Buffers', function (t) { t.ok(same(new Buffer([]), new Buffer([]))) t.end() }) test('should match similar Buffers', function (t) { var b1 = new Buffer([0]) var b2 = new Buffer([0]) t.ok(same(b1, b2)) var b3 = new Buffer([0, 1, 3]) var b4 = new Buffer([0, 1, 3]) t.ok(same(b3, b4)) t.end() }) test('should notice different Buffers', function (t) { var b1 = new Buffer([0, 1, 2]) var b2 = new Buffer([0, 1, 23]) t.notOk(same(b1, b2)) var shortb = new Buffer([0, 1]) var longb = new Buffer(320) for (var i = 0; i < 160; i++) longb.writeUInt16LE(i, i * 2) t.notOk(same( { x: { y: { z: shortb } } }, { x: { y: { z: longb } } } )) t.end() }) tsame-1.1.2/test/loose/buffer-pure-js.js000066400000000000000000000016571312224666200201330ustar00rootroot00000000000000var tap = require('tap') var test = tap.test var same = require('../..') test('should match empty Buffers', function (t) { t.ok(same(new Buffer([]), new Buffer([]))) t.end() }) test('should match similar Buffers', function (t) { var b1 = new Buffer([0]) b1.equals = null var b2 = new Buffer([0]) b2.equals = null t.ok(same(b1, b2)) var b3 = new Buffer([0, 1, 3]) b3.equals = null var b4 = new Buffer([0, 1, 3]) b4.equals = null t.ok(same(b3, b4)) t.end() }) test('should notice different Buffers', function (t) { var b1 = new Buffer([0, 1, 2]) b1.equals = null var b2 = new Buffer([0, 1, 23]) b2.equals = null t.notOk(same(b1, b2)) var shortb = new Buffer([0, 1]) shortb.equals = null var longb = new Buffer(320) longb.equals = null for (var i = 0; i < 160; i++) longb.writeUInt16LE(i, i * 2) t.notOk(same( { x: { y: { z: shortb } } }, { x: { y: { z: longb } } } )) t.end() }) tsame-1.1.2/test/loose/set-map.js000066400000000000000000000016421312224666200166370ustar00rootroot00000000000000'use strict' var tsame = require('../..') var t = require('tap') t.test('set', function (t) { var obj = { a: 1 } var a = new Set([1, 2, 3, 4, obj]) var b = new Set([obj, 2, 4, 3, 1]) var c = new Set([4, 3, 2, 1, { a: 1 }]) t.ok(tsame(a, b)) t.notOk(tsame(a, c)) t.notOk(tsame(b, c)) t.ok(tsame(new Set(), new Set())) t.notOk(tsame(a, Array.from(a))) t.end() }) t.test('map', function (t) { var obj = { a: 1 } var a = new Map([[1, 2], [3, 4], [5, obj], [ obj, 6 ]]) var b = new Map([[3, 4], [5, obj], [ obj, 6 ], [1, 2]]) // values match, but not strictly var c = new Map([[3, 4], [5, { a: '1' }], [ obj, 6 ], [1, 2]]) // keys don't match var d = new Map([[3, 4], [5, { a: 1 }], [ { a: 1 }, 6 ], [1, 2]]) t.ok(tsame(a, b)) t.ok(tsame(a, c)) t.ok(tsame(b, c)) t.ok(tsame(new Map(), new Map())) t.notOk(tsame(a, Array.from(a))) t.notOk(tsame(a, d)) t.notOk(tsame(a, d)) t.end() }) tsame-1.1.2/test/strict/000077500000000000000000000000001312224666200151175ustar00rootroot00000000000000tsame-1.1.2/test/strict/array-from-missing.js000066400000000000000000000000651312224666200212040ustar00rootroot00000000000000'use strict' Array.from = null require('./basic.js') tsame-1.1.2/test/strict/basic.js000066400000000000000000000117661312224666200165510ustar00rootroot00000000000000'use strict' var EventEmitter = require('events').EventEmitter var test = require('tap').test var d = require('../..').strict function functionA (a) { return a } var heinous = { nothin: null, nope: undefined, number: 0, funky: functionA, stringer: 'heya', then: new Date('1981-03-30'), rexpy: /^(pi|π)$/, granular: { stuff: [0, 1, 2] } } heinous.granular.self = heinous var awful = { nothin: null, nope: undefined, number: 0, funky: functionA, stringer: 'heya', then: new Date('1981-03-30'), rexpy: /^(pi|π)$/, granular: { stuff: [0, 1, 2] } } awful.granular.self = awful test("NaN matches NaN", function (t) { t.ok(d(NaN, NaN)) t.end() }) test('deeper handles all the edge cases', function (t) { /* * * SUCCESS * */ var functionB = functionA // 1. === gets the job done t.ok(d(null, null), 'null is the same as itself') t.ok(d(undefined, undefined), 'undefined is the same as itself') t.ok(d(0, 0), 'numbers check out') t.ok(d(1 / 0, 1 / 0), "it's a travesty that 1 / 0 = Infinity, but Infinities are equal") t.ok(d('ok', 'ok'), 'strings check out') t.ok(d(functionA, functionB), 'references to the same function are equal') // 4. buffers are compared by value var bufferA = new Buffer('abc') var bufferB = new Buffer('abc') t.ok(d(bufferA, bufferB), 'buffers are compared by value') // 5. dates are compared by numeric (time) value var dateA = new Date('2001-01-11') var dateB = new Date('2001-01-11') t.ok(d(dateA, dateB), 'dates are compared by time value') // 6. regexps are compared by their properties var rexpA = /^h[oe][wl][dl][oy]$/ var rexpB = /^h[oe][wl][dl][oy]$/ t.ok(d(rexpA, rexpB), 'regexps are compared by their properties') // 8. loads of tests for objects t.ok(d({}, {}), 'bare objects check out') var a = { a: 'a' } var b = a t.ok(d(a, b), 'identical object references check out') b = { a: 'a' } t.ok(d(a, b), 'identical simple object values check out') t.ok(d([0, 1], [0, 1]), 'arrays check out') function onerror (error) { console.err(error.stack) } var eeA = new EventEmitter() eeA.on('error', onerror) var eeB = new EventEmitter() eeB.on('error', onerror) t.ok(d(eeA, eeB), 'more complex objects check out') var cyclicA = {} cyclicA.x = cyclicA var cyclicB = {} cyclicB.x = cyclicB t.ok(d(cyclicA, cyclicB), 'can handle cyclic data structures') var y = {v: {v: {v: {v: {v: {v: {v: {v: {v: {v: {v: {v: {v: {v: {v: {}}}}}}}}}}}}}}}} y.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v = y var z = {v: {v: {v: {v: {v: {v: {v: {v: {v: {v: {v: {v: {v: {v: {v: {}}}}}}}}}}}}}}}} z.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v = z t.ok(d(y, z), 'deeply recursive data structures also work') t.ok(d(heinous, awful), 'more complex objects also check out') awful.granular.self = heinous heinous.granular.self = awful t.ok(d(heinous, awful), 'mutual recursion with otherwise identical structures fools deepEquals') /* * * FAILURE * */ // 1. === does its job t.notOk(d(1 / 0, -1 / 0), 'opposite infinities are different') t.notOk(d(1, '1'), 'strict equality, no coercion between strings and numbers') t.notOk(d('ok', 'nok'), 'different strings are different') t.notOk(d(0, '0'), 'strict equality, no coercion between strings and numbers') t.notOk(d(undefined, null), 'so many kinds of nothingness!') t.notOk(d(function nop () {}, function nop () {}), 'functions are only the same by reference') // 2. one is an object, the other is not t.notOk(d(undefined, {}), "if both aren't objects, not the same") // 3. null is an object t.notOk(d({}, null), 'null is of type object') // 4. buffers are compared by both byte length (for speed) and value bufferB = new Buffer('abcd') t.notOk(d(bufferA, bufferB), 'Buffers are checked for length') bufferB = new Buffer('abd') t.notOk(d(bufferA, bufferB), 'Buffers are also checked for value') // 5. dates dateB = new Date('2001-01-12') t.notOk(d(dateA, dateB), 'different dates are not the same') // 6. regexps rexpB = /^(howdy|hello)$/ t.notOk(d(rexpA, rexpB), 'different regexps are not the same') // 7. arguments var outer = arguments ;(function inner (tt) { var inner = arguments t.ok(d(outer, outer)) t.ok(d(outer, inner)) t.notOk(d(outer, [t])) t.notOk(d([t], inner)) }(t)) // 8. objects present edge cases galore t.notOk(d([], {}), "different object types shouldn't match") var nullstructor = Object.create(null) t.notOk(d({}, nullstructor), 'Object.create(null).constructor === undefined') b = { b: 'b' } t.notOk(d(a, b), "different object values aren't the same") var c = { b: 'b', c: undefined } t.notOk(d(b, c), "different object values aren't the same") function ondata (data) { console.log(data) } eeB.on('data', ondata) t.notOk(d(eeA, eeB), "changed objects don't match") awful.granular.stuff[2] = 3 t.notOk(d(heinous, awful), 'small changes should be found') awful.granular.stuff[2] = 2 t.ok(d(heinous, awful), 'small changes should be fixable') t.end() }) tsame-1.1.2/test/strict/buffer-native-equals.js000066400000000000000000000014271312224666200215060ustar00rootroot00000000000000var tap = require('tap') var test = tap.test var same = require('../..').strict test('should match empty Buffers', function (t) { t.ok(same(new Buffer([]), new Buffer([]))) t.end() }) test('should match similar Buffers', function (t) { var b1 = new Buffer([0]) var b2 = new Buffer([0]) t.ok(same(b1, b2)) var b3 = new Buffer([0, 1, 3]) var b4 = new Buffer([0, 1, 3]) t.ok(same(b3, b4)) t.end() }) test('should notice different Buffers', function (t) { var b1 = new Buffer([0, 1, 2]) var b2 = new Buffer([0, 1, 23]) t.notOk(same(b1, b2)) var shortb = new Buffer([0, 1]) var longb = new Buffer(320) for (var i = 0; i < 160; i++) longb.writeUInt16LE(i, i * 2) t.notOk(same( { x: { y: { z: shortb } } }, { x: { y: { z: longb } } } )) t.end() }) tsame-1.1.2/test/strict/buffer-pure-js.js000066400000000000000000000016661312224666200203220ustar00rootroot00000000000000var tap = require('tap') var test = tap.test var same = require('../..').strict test('should match empty Buffers', function (t) { t.ok(same(new Buffer([]), new Buffer([]))) t.end() }) test('should match similar Buffers', function (t) { var b1 = new Buffer([0]) b1.equals = null var b2 = new Buffer([0]) b2.equals = null t.ok(same(b1, b2)) var b3 = new Buffer([0, 1, 3]) b3.equals = null var b4 = new Buffer([0, 1, 3]) b4.equals = null t.ok(same(b3, b4)) t.end() }) test('should notice different Buffers', function (t) { var b1 = new Buffer([0, 1, 2]) b1.equals = null var b2 = new Buffer([0, 1, 23]) b2.equals = null t.notOk(same(b1, b2)) var shortb = new Buffer([0, 1]) shortb.equals = null var longb = new Buffer(320) longb.equals = null for (var i = 0; i < 160; i++) longb.writeUInt16LE(i, i * 2) t.notOk(same( { x: { y: { z: shortb } } }, { x: { y: { z: longb } } } )) t.end() }) tsame-1.1.2/test/strict/set-map.js000066400000000000000000000016571312224666200170340ustar00rootroot00000000000000'use strict' var tsame = require('../..').strict var t = require('tap') t.test('set', function (t) { var obj = { a: 1 } var a = new Set([1, 2, 3, 4, obj]) var b = new Set([obj, 2, 4, 3, 1]) var c = new Set([4, 3, 2, 1, { a: 1 }]) t.ok(tsame(a, b)) t.notOk(tsame(a, c)) t.notOk(tsame(b, c)) t.ok(tsame(new Set(), new Set())) t.notOk(tsame(a, Array.from(a))) t.end() }) t.test('map', function (t) { var obj = { a: 1 } var a = new Map([[1, 2], [3, 4], [5, obj], [ obj, 6 ]]) var b = new Map([[3, 4], [5, obj], [ obj, 6 ], [1, 2]]) // values match, but not strictly var c = new Map([[3, 4], [5, { a: '1' }], [ obj, 6 ], [1, 2]]) // keys don't match var d = new Map([[3, 4], [5, { a: 1 }], [ { a: 1 }, 6 ], [1, 2]]) t.ok(tsame(a, b)) t.notOk(tsame(a, c)) t.notOk(tsame(b, c)) t.ok(tsame(new Map(), new Map())) t.notOk(tsame(a, Array.from(a))) t.notOk(tsame(a, d)) t.notOk(tsame(c, d)) t.end() })