pax_global_header00006660000000000000000000000064140124020430014500gustar00rootroot0000000000000052 comment=e7053e06178d31f266d41014ad72905f600a2a48 es-value-fixtures-1.2.1/000077500000000000000000000000001401240204300150715ustar00rootroot00000000000000es-value-fixtures-1.2.1/.eslintignore000066400000000000000000000000121401240204300175650ustar00rootroot00000000000000coverage/ es-value-fixtures-1.2.1/.eslintrc000066400000000000000000000004661401240204300167230ustar00rootroot00000000000000{ "root": true, "extends": "@ljharb", "rules": { "array-bracket-newline": 0, "id-length": 0, "max-statements-per-line": 0, "no-magic-numbers": 0, "sort-keys": 0, }, "overrides": [ { "files": "test/**", "rules": { "func-style": 0, "max-lines-per-function": 0, }, }, ], } es-value-fixtures-1.2.1/.github/000077500000000000000000000000001401240204300164315ustar00rootroot00000000000000es-value-fixtures-1.2.1/.github/FUNDING.yml000066400000000000000000000011141401240204300202430ustar00rootroot00000000000000# These are supported funding model platforms github: [ljharb] patreon: # Replace with a single Patreon username open_collective: # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username tidelift: npm/es-value-fixtures community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] es-value-fixtures-1.2.1/.github/workflows/000077500000000000000000000000001401240204300204665ustar00rootroot00000000000000es-value-fixtures-1.2.1/.github/workflows/node-4+.yml000066400000000000000000000025321401240204300223540ustar00rootroot00000000000000name: 'Tests: node.js' on: [pull_request, push] jobs: matrix: runs-on: ubuntu-latest outputs: latest: ${{ steps.set-matrix.outputs.requireds }} minors: ${{ steps.set-matrix.outputs.optionals }} steps: - uses: ljharb/actions/node/matrix@main id: set-matrix with: preset: '>=4' latest: needs: [matrix] name: 'latest minors' runs-on: ubuntu-latest strategy: matrix: ${{ fromJson(needs.matrix.outputs.latest) }} steps: - uses: actions/checkout@v2 - uses: ljharb/actions/node/run@main name: 'npm install && npm run tests-only' with: node-version: ${{ matrix.node-version }} command: 'tests-only' minors: needs: [matrix, latest] name: 'non-latest minors' continue-on-error: true if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }} runs-on: ubuntu-latest strategy: matrix: ${{ fromJson(needs.matrix.outputs.minors) }} steps: - uses: actions/checkout@v2 - uses: ljharb/actions/node/run@main name: 'npm install && npm run tests-only' with: node-version: ${{ matrix.node-version }} command: 'tests-only' node: name: 'node 4+' needs: [latest, minors] runs-on: ubuntu-latest steps: - run: 'echo tests completed' es-value-fixtures-1.2.1/.github/workflows/node-iojs.yml000066400000000000000000000026361401240204300231070ustar00rootroot00000000000000name: 'Tests: node.js (io.js)' on: [pull_request, push] jobs: matrix: runs-on: ubuntu-latest outputs: latest: ${{ steps.set-matrix.outputs.requireds }} minors: ${{ steps.set-matrix.outputs.optionals }} steps: - uses: ljharb/actions/node/matrix@main id: set-matrix with: preset: 'iojs' latest: needs: [matrix] name: 'latest minors' runs-on: ubuntu-latest strategy: matrix: ${{ fromJson(needs.matrix.outputs.latest) }} steps: - uses: actions/checkout@v2 - uses: ljharb/actions/node/run@main name: 'npm install && npm run tests-only' with: node-version: ${{ matrix.node-version }} command: 'tests-only' skip-ls-check: true minors: needs: [matrix, latest] name: 'non-latest minors' continue-on-error: true if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }} runs-on: ubuntu-latest strategy: matrix: ${{ fromJson(needs.matrix.outputs.minors) }} steps: - uses: actions/checkout@v2 - uses: ljharb/actions/node/run@main name: 'npm install && npm run tests-only' with: node-version: ${{ matrix.node-version }} command: 'tests-only' skip-ls-check: true node: name: 'io.js' needs: [latest, minors] runs-on: ubuntu-latest steps: - run: 'echo tests completed' es-value-fixtures-1.2.1/.github/workflows/node-pretest.yml000066400000000000000000000010671401240204300236260ustar00rootroot00000000000000name: 'Tests: pretest/posttest' on: [pull_request, push] jobs: pretest: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: ljharb/actions/node/run@main name: 'npm install && npm run pretest' with: node-version: 'lts/*' command: 'pretest' posttest: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: ljharb/actions/node/run@main name: 'npm install && npm run posttest' with: node-version: 'lts/*' command: 'posttest' es-value-fixtures-1.2.1/.github/workflows/node-zero.yml000066400000000000000000000032041401240204300231120ustar00rootroot00000000000000name: 'Tests: node.js (0.x)' on: [pull_request, push] jobs: matrix: runs-on: ubuntu-latest outputs: stable: ${{ steps.set-matrix.outputs.requireds }} unstable: ${{ steps.set-matrix.outputs.optionals }} steps: - uses: ljharb/actions/node/matrix@main id: set-matrix with: preset: '0.x' stable: needs: [matrix] name: 'stable minors' runs-on: ubuntu-latest strategy: matrix: ${{ fromJson(needs.matrix.outputs.stable) }} steps: - uses: actions/checkout@v2 - uses: ljharb/actions/node/run@main name: 'npm install && npm run tests-only' with: node-version: ${{ matrix.node-version }} command: 'tests-only' cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }} skip-ls-check: true unstable: needs: [matrix, stable] name: 'unstable minors' continue-on-error: true if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }} runs-on: ubuntu-latest strategy: matrix: ${{ fromJson(needs.matrix.outputs.unstable) }} steps: - uses: actions/checkout@v2 - uses: ljharb/actions/node/run@main name: 'npm install && npm run tests-only' with: node-version: ${{ matrix.node-version }} command: 'tests-only' cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }} skip-ls-check: true node: name: 'node 0.x' needs: [stable, unstable] runs-on: ubuntu-latest steps: - run: 'echo tests completed' es-value-fixtures-1.2.1/.github/workflows/rebase.yml000066400000000000000000000004011401240204300224450ustar00rootroot00000000000000name: Automatic Rebase on: [pull_request_target] jobs: _: name: "Automatic Rebase" runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: ljharb/rebase@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} es-value-fixtures-1.2.1/.github/workflows/require-allow-edits.yml000066400000000000000000000003011401240204300251010ustar00rootroot00000000000000name: Require “Allow Edits” on: [pull_request_target] jobs: _: name: "Require “Allow Edits”" runs-on: ubuntu-latest steps: - uses: ljharb/require-allow-edits@main es-value-fixtures-1.2.1/.gitignore000066400000000000000000000032351401240204300170640ustar00rootroot00000000000000# Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* lerna-debug.log* # Diagnostic reports (https://nodejs.org/api/report.html) report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json # Runtime data pids *.pid *.seed *.pid.lock # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage *.lcov # nyc test coverage .nyc_output # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) .grunt # Bower dependency directory (https://bower.io/) bower_components # node-waf configuration .lock-wscript # Compiled binary addons (https://nodejs.org/api/addons.html) build/Release # Dependency directories node_modules/ jspm_packages/ # TypeScript v1 declaration files typings/ # TypeScript cache *.tsbuildinfo # Optional npm cache directory .npm # Optional eslint cache .eslintcache # Microbundle cache .rpt2_cache/ .rts2_cache_cjs/ .rts2_cache_es/ .rts2_cache_umd/ # Optional REPL history .node_repl_history # Output of 'npm pack' *.tgz # Yarn Integrity file .yarn-integrity # dotenv environment variables file .env .env.test # parcel-bundler cache (https://parceljs.org/) .cache # Next.js build output .next # Nuxt.js build / generate output .nuxt dist # Gatsby files .cache/ # Comment in the public line in if your project uses Gatsby and *not* Next.js # https://nextjs.org/blog/next-9-1#public-directory-support # public # vuepress build output .vuepress/dist # Serverless directories .serverless/ # FuseBox cache .fusebox/ # DynamoDB Local files .dynamodb/ # TernJS port file .tern-port # Only apps should have lockfiles npm-shrinkwrap.json package-lock.json yarn.lock es-value-fixtures-1.2.1/.npmignore000066400000000000000000000032601401240204300170710ustar00rootroot00000000000000# Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* lerna-debug.log* # Diagnostic reports (https://nodejs.org/api/report.html) report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json # Runtime data pids *.pid *.seed *.pid.lock # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage *.lcov # nyc test coverage .nyc_output # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) .grunt # Bower dependency directory (https://bower.io/) bower_components # node-waf configuration .lock-wscript # Compiled binary addons (https://nodejs.org/api/addons.html) build/Release # Dependency directories node_modules/ jspm_packages/ # TypeScript v1 declaration files typings/ # TypeScript cache *.tsbuildinfo # Optional npm cache directory .npm # Optional eslint cache .eslintcache # Microbundle cache .rpt2_cache/ .rts2_cache_cjs/ .rts2_cache_es/ .rts2_cache_umd/ # Optional REPL history .node_repl_history # Output of 'npm pack' *.tgz # Yarn Integrity file .yarn-integrity # dotenv environment variables file .env .env.test # parcel-bundler cache (https://parceljs.org/) .cache # Next.js build output .next # Nuxt.js build / generate output .nuxt dist # Gatsby files .cache/ # Comment in the public line in if your project uses Gatsby and *not* Next.js # https://nextjs.org/blog/next-9-1#public-directory-support # public # vuepress build output .vuepress/dist # Serverless directories .serverless/ # FuseBox cache .fusebox/ # DynamoDB Local files .dynamodb/ # TernJS port file .tern-port # Only apps should have lockfiles npm-shrinkwrap.json package-lock.json yarn.lock .github/workflows es-value-fixtures-1.2.1/.npmrc000066400000000000000000000000671401240204300162140ustar00rootroot00000000000000package-lock=false allow-same-version=true message=v%s es-value-fixtures-1.2.1/.nycrc000066400000000000000000000003301401240204300162040ustar00rootroot00000000000000{ "all": true, "check-coverage": false, "reporter": ["text-summary", "text", "html", "json"], "lines": 86, "statements": 85.93, "functions": 82.43, "branches": 76.06, "exclude": [ "coverage", "test" ] } es-value-fixtures-1.2.1/CHANGELOG.md000066400000000000000000000072421401240204300167070ustar00rootroot00000000000000# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [v1.2.1](https://github.com/ljharb/es-value-fixtures/compare/v1.2.0...v1.2.1) - 2021-02-14 ### Commits - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud` [`01f838d`](https://github.com/ljharb/es-value-fixtures/commit/01f838d67283999139a453fc7800634a90d3c6f7) - [Fix] move prod deps from dev to prod section [`41375bc`](https://github.com/ljharb/es-value-fixtures/commit/41375bc50308d7ffdd603dc30308ad4f6dc43e73) ## [v1.2.0](https://github.com/ljharb/es-value-fixtures/compare/v1.1.0...v1.2.0) - 2021-02-04 ### Commits - [New] add `bigints` [`8b85bae`](https://github.com/ljharb/es-value-fixtures/commit/8b85baec40a3616e1936560909dc85b7809c2e99) ## [v1.1.0](https://github.com/ljharb/es-value-fixtures/compare/v1.0.0...v1.1.0) - 2021-02-04 ### Commits - [Tests] migrate to github actions; run `nyc` on all tests [`b01abdb`](https://github.com/ljharb/es-value-fixtures/commit/b01abdb8b1242f294764cdeb73f682607f73b6eb) - [meta] do not publish github action workflow files [`b296cff`](https://github.com/ljharb/es-value-fixtures/commit/b296cff5e3fa392438aebb5513c7015c8259643d) - [actions] remove misplaced workflow files [`d898f7d`](https://github.com/ljharb/es-value-fixtures/commit/d898f7dc26297b34145a5531c0b80150b8d2f066) - [meta] add Automatic Rebase and Require Allow Edits workflows [`991dd63`](https://github.com/ljharb/es-value-fixtures/commit/991dd6347bd0a5c78e0ce30e7ca51a38363375b5) - [New] add `int32s`, `arrowFunctions`, `generatorFunctions`, `asyncFunctions`, `nonConstructorFunctions`, `notNonNegativeIntegers` [`2f8b24a`](https://github.com/ljharb/es-value-fixtures/commit/2f8b24a36bfa6a9ff7c3091bcc62240b62c97d3c) - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`22181ab`](https://github.com/ljharb/es-value-fixtures/commit/22181ab5b402011bc466c819fc72f58a2ff8504d) - [Deps] update `has-bigints`, `object.assign` [`9ba0056`](https://github.com/ljharb/es-value-fixtures/commit/9ba0056338ac4892ec4492ad2522401a9927039f) - [patch] expose `package.json` in `exports` [`cda9dff`](https://github.com/ljharb/es-value-fixtures/commit/cda9dff3ad41225194991a4439ea801f4ea6bfc0) - [meta] fix FUNDING.yml [`6678bbd`](https://github.com/ljharb/es-value-fixtures/commit/6678bbd367b028929fdea8a38baf067643687849) ## v1.0.0 - 2020-10-29 ### Commits - Implementation [`b313385`](https://github.com/ljharb/es-value-fixtures/commit/b313385868effb10cabd4f400a3a9955385d5019) - Initial commit [`c08fbbb`](https://github.com/ljharb/es-value-fixtures/commit/c08fbbb7e64e1bcb368b5b414babf042cf407c37) - Tests [`8162bb7`](https://github.com/ljharb/es-value-fixtures/commit/8162bb7fe37d6a3a6863b414b85617ed73f9262d) - npm init [`4916c17`](https://github.com/ljharb/es-value-fixtures/commit/4916c1766d2efb88a2a000a3e0cf8b5abb3e7832) - [meta] add Automatic Rebase and Require Allow Edits workflows [`ea3d703`](https://github.com/ljharb/es-value-fixtures/commit/ea3d70301ca705b2625ae69b1dd759ef0b4a5fc3) - [meta] add `auto-changelog` [`c40f765`](https://github.com/ljharb/es-value-fixtures/commit/c40f7651fc09c86aa46581cda77aa4dbc1c91a9c) - [meta] add "funding"; create `FUNDING.yml` [`107051e`](https://github.com/ljharb/es-value-fixtures/commit/107051e687fe51301f7687a312423af766e19820) - [Tests] add `npm run lint` [`bc646df`](https://github.com/ljharb/es-value-fixtures/commit/bc646df03f1b877a38a181c08d81d58abc928723) - Only apps should have lockfiles [`90edefc`](https://github.com/ljharb/es-value-fixtures/commit/90edefc179f9b09d881b1f5c36fffe78e019f414) es-value-fixtures-1.2.1/LICENSE000066400000000000000000000020571401240204300161020ustar00rootroot00000000000000MIT License Copyright (c) 2020 Jordan Harband 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. es-value-fixtures-1.2.1/README.md000066400000000000000000000001011401240204300163400ustar00rootroot00000000000000# es-value-fixtures Fixtures of ES values, for testing purposes. es-value-fixtures-1.2.1/index.js000066400000000000000000000125771401240204300165520ustar00rootroot00000000000000'use strict'; var assign = require('object.assign'); var hasSymbols = require('has-symbols')(); var hasBigInts = require('has-bigints')(); var arrowFunctions = require('make-arrow-function').list(); var generatorFunctions = require('make-generator-function')(); var asyncFunctions = require('make-async-function').list(); var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; var coercibleFnObject = { valueOf: function () { return function valueOfFn() {}; }, toString: function () { return 42; } }; var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; var uncoercibleFnObject = { valueOf: function () { return function valueOfFn() {}; }, toString: function () { return function toStrFn() {}; } }; var objects = [{}, coercibleObject, coercibleFnObject, toStringOnlyObject, valueOfOnlyObject]; var nullPrimitives = [undefined, null]; var nonIntegerNumbers = [-1.3, 0.2, 1.8, 1 / 3]; var int32s = [1, 7, 42]; var integerNumbers = int32s.concat([1e17]); var zeroes = [0, -0]; var infinities = [Infinity, -Infinity]; var numbers = zeroes.concat([42], infinities, nonIntegerNumbers); var strings = ['', 'foo', 'a\uD83D\uDCA9c']; var booleans = [true, false]; var symbols = hasSymbols ? [Symbol.iterator, Symbol('foo')] : []; var bigints = hasBigInts ? [BigInt(42), BigInt(0)] : []; var nonSymbolPrimitives = [].concat(nullPrimitives, booleans, strings, numbers, bigints); var nonNumberPrimitives = [].concat(nullPrimitives, booleans, strings, symbols); var nonNullPrimitives = [].concat(booleans, strings, numbers, symbols, bigints); var nonUndefinedPrimitives = [].concat(null, nonNullPrimitives); var nonStrings = [].concat(nullPrimitives, booleans, numbers, symbols, objects, bigints); var primitives = [].concat(nullPrimitives, nonNullPrimitives); var nonPropertyKeys = [].concat(nullPrimitives, booleans, numbers, objects); var propertyKeys = [].concat(strings, symbols); var nonBooleans = [].concat(nullPrimitives, strings, symbols, numbers, objects); var falsies = [].concat(nullPrimitives, false, '', 0, -0, NaN); var truthies = [].concat(true, 'foo', 42, symbols, objects); var timestamps = [].concat(0, 946713600000, 1546329600000); var nonFunctions = [].concat(primitives, objects, [42]); var nonArrays = [].concat(nonFunctions); var nonBigInts = [].concat(nonNumberPrimitives, numbers); var nonConstructorFunctions = [].concat(arrowFunctions, generatorFunctions, asyncFunctions); var nonNumbers = nonNumberPrimitives.concat(objects); var notNonNegativeIntegers = nonNumbers.concat(nonIntegerNumbers, NaN, infinities, [-1, -7, -42, -1e17]); var descriptors = { configurable: function (descriptor) { return assign({}, descriptor, { '[[Configurable]]': true }); }, nonConfigurable: function (descriptor) { return assign({}, descriptor, { '[[Configurable]]': false }); }, enumerable: function (descriptor) { return assign({}, descriptor, { '[[Enumerable]]': true }); }, nonEnumerable: function (descriptor) { return assign({}, descriptor, { '[[Enumerable]]': false }); }, writable: function (descriptor) { return assign({}, descriptor, { '[[Writable]]': true }); }, nonWritable: function (descriptor) { return assign({}, descriptor, { '[[Writable]]': false }); } }; module.exports = { booleans: booleans, coercibleFnObject: coercibleFnObject, coercibleObject: coercibleObject, falsies: falsies, hasSymbols: hasSymbols, infinities: infinities, int32s: int32s, integerNumbers: integerNumbers, nonArrays: nonArrays, bigints: bigints, nonBigInts: nonBigInts, nonBooleans: nonBooleans, nonFunctions: nonFunctions, arrowFunctions: arrowFunctions, generatorFunctions: generatorFunctions, asyncFunctions: asyncFunctions, nonConstructorFunctions: nonConstructorFunctions, nonIntegerNumbers: nonIntegerNumbers, notNonNegativeIntegers: notNonNegativeIntegers, nonNullPrimitives: nonNullPrimitives, nonNumberPrimitives: nonNumberPrimitives, nonNumbers: nonNumbers, nonPropertyKeys: nonPropertyKeys, nonStrings: nonStrings, nonSymbolPrimitives: nonSymbolPrimitives, nonUndefinedPrimitives: nonUndefinedPrimitives, nullPrimitives: nullPrimitives, numbers: numbers, objects: objects, primitives: primitives, propertyKeys: propertyKeys, strings: strings, symbols: symbols, timestamps: timestamps, toStringOnlyObject: toStringOnlyObject, truthies: truthies, uncoercibleFnObject: uncoercibleFnObject, uncoercibleObject: uncoercibleObject, valueOfOnlyObject: valueOfOnlyObject, zeroes: zeroes, bothDescriptor: function () { return { '[[Get]]': function () {}, '[[Value]]': true }; }, bothDescriptorWritable: function () { return descriptors.writable({ '[[Get]]': function () {} }); }, accessorDescriptor: function (value) { return descriptors.enumerable(descriptors.configurable({ '[[Get]]': function get() { return value; } })); }, mutatorDescriptor: function () { return descriptors.enumerable(descriptors.configurable({ '[[Set]]': function () {} })); }, dataDescriptor: function (value) { return descriptors.nonWritable({ '[[Value]]': arguments.length > 0 ? value : 42 }); }, genericDescriptor: function () { return descriptors.configurable(descriptors.nonEnumerable()); }, descriptors: descriptors }; es-value-fixtures-1.2.1/package.json000066400000000000000000000034411401240204300173610ustar00rootroot00000000000000{ "name": "es-value-fixtures", "version": "1.2.1", "description": "Fixtures of ES values, for testing purposes", "main": "index.js", "exports": { ".": [ { "default": "./index.js" }, "./index.js" ], "./package.json": "./package.json" }, "scripts": { "lint": "eslint --ext=.js,.mjs .", "pretest": "npm run lint", "tests-only": "nyc tape 'test/*'", "test": "npm run tests-only", "posttest": "aud --production", "version": "auto-changelog && git add CHANGELOG.md", "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" }, "repository": { "type": "git", "url": "git+https://github.com/ljharb/es-value-fixtures.git" }, "keywords": [ "javascript", "ecmascript", "es", "js", "values", "value", "fixture", "fixtures", "es-abstract" ], "author": "Jordan Harband ", "funding": { "url": "https://github.com/sponsors/ljharb" }, "license": "MIT", "bugs": { "url": "https://github.com/ljharb/es-value-fixtures/issues" }, "homepage": "https://github.com/ljharb/es-value-fixtures#readme", "devDependencies": { "@ljharb/eslint-config": "^17.5.1", "aud": "^1.1.4", "auto-changelog": "^2.2.1", "eslint": "^7.20.0", "foreach": "^2.0.5", "isarray": "^2.0.5", "nyc": "^10.3.2", "object-keys": "^1.1.1", "tape": "^5.1.1" }, "dependencies": { "has-bigints": "^1.0.1", "has-symbols": "^1.0.1", "make-arrow-function": "^1.2.0", "make-async-function": "^1.0.0", "make-generator-function": "^2.0.0", "object.assign": "^4.1.2" }, "auto-changelog": { "output": "CHANGELOG.md", "template": "keepachangelog", "unreleased": false, "commitLimit": false, "backfillLimit": false, "hideCredit": true } } es-value-fixtures-1.2.1/test/000077500000000000000000000000001401240204300160505ustar00rootroot00000000000000es-value-fixtures-1.2.1/test/index.js000066400000000000000000000037221401240204300175210ustar00rootroot00000000000000'use strict'; var values = require('../'); var test = require('tape'); var keys = require('object-keys'); var forEach = require('foreach'); var isArray = require('isarray'); function testItem(t, key, item) { t.ok(item || item === false, key + ' is truthy or literal `false`'); if (isArray(item)) { t.ok(true, key + ' is an array'); } else if (typeof item === 'function') { t.equal(typeof item, 'function', key + ' is a function'); if (key.slice(-'Object'.length) !== 'Object') { t.equal(typeof item(), 'object', key + ' function returns an object'); } } else if (typeof item === 'object') { t.ok(typeof item === 'object', key + ' is an object'); if (key.slice(-'Object'.length) !== 'Object') { forEach(keys(item), function (itemKey) { testItem(t, key + '.' + itemKey, item[itemKey]); }); } } else { t.ok(true, key + ' is a ' + typeof item); } } test('es-value-fixtures', function (t) { var expected = [ 'booleans', 'coercibleFnObject', 'coercibleObject', 'falsies', 'hasSymbols', 'infinities', 'int32s', 'integerNumbers', 'nonArrays', 'nonBigInts', 'nonBooleans', 'nonFunctions', 'arrowFunctions', 'generatorFunctions', 'asyncFunctions', 'nonConstructorFunctions', 'nonIntegerNumbers', 'notNonNegativeIntegers', 'nonNullPrimitives', 'nonNumberPrimitives', 'nonNumbers', 'nonPropertyKeys', 'nonStrings', 'nonSymbolPrimitives', 'nonUndefinedPrimitives', 'nullPrimitives', 'numbers', 'objects', 'primitives', 'propertyKeys', 'strings', 'symbols', 'timestamps', 'toStringOnlyObject', 'truthies', 'uncoercibleFnObject', 'uncoercibleObject', 'valueOfOnlyObject', 'zeroes', 'bothDescriptor', 'bothDescriptorWritable', 'accessorDescriptor', 'mutatorDescriptor', 'dataDescriptor', 'genericDescriptor', 'descriptors' ]; t.deepEqual(keys(values), expected, 'has expected fixture names'); forEach(expected, function (key) { testItem(t, key, values[key]); }); t.end(); });