progress on migrating to heex templates and font-icons
This commit is contained in:
parent
d43daafdb7
commit
3eff955672
21793 changed files with 2161968 additions and 16895 deletions
assets_old/node_modules/unbox-primitive
20
assets_old/node_modules/unbox-primitive/.editorconfig
generated
vendored
Normal file
20
assets_old/node_modules/unbox-primitive/.editorconfig
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
max_line_length = 150
|
||||
|
||||
[CHANGELOG.md]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.json]
|
||||
max_line_length = off
|
||||
|
||||
[Makefile]
|
||||
max_line_length = off
|
9
assets_old/node_modules/unbox-primitive/.eslintrc
generated
vendored
Normal file
9
assets_old/node_modules/unbox-primitive/.eslintrc
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"max-statements": [2, 16],
|
||||
},
|
||||
}
|
12
assets_old/node_modules/unbox-primitive/.github/FUNDING.yml
generated
vendored
Normal file
12
assets_old/node_modules/unbox-primitive/.github/FUNDING.yml
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
# 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/unbox-primitive
|
||||
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']
|
311
assets_old/node_modules/unbox-primitive/.travis.yml
generated
vendored
Normal file
311
assets_old/node_modules/unbox-primitive/.travis.yml
generated
vendored
Normal file
|
@ -0,0 +1,311 @@
|
|||
language: node_js
|
||||
os:
|
||||
- linux
|
||||
node_js:
|
||||
- "12.8"
|
||||
- "11.15"
|
||||
- "10.16"
|
||||
- "9.11"
|
||||
- "8.16"
|
||||
- "7.10"
|
||||
- "6.17"
|
||||
- "5.12"
|
||||
- "4.9"
|
||||
- "iojs-v3.3"
|
||||
- "iojs-v2.5"
|
||||
- "iojs-v1.8"
|
||||
- "0.12"
|
||||
- "0.10"
|
||||
- "0.8"
|
||||
before_install:
|
||||
- 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac'
|
||||
- 'nvm install-latest-npm'
|
||||
install:
|
||||
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
|
||||
script:
|
||||
- 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi'
|
||||
- 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi'
|
||||
- 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi'
|
||||
- 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi'
|
||||
sudo: false
|
||||
env:
|
||||
- TEST=true
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- node_js: "lts/*"
|
||||
env: PRETEST=true
|
||||
- node_js: "lts/*"
|
||||
env: POSTTEST=true
|
||||
- node_js: "12.7"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "12.6"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "12.5"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "12.4"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "12.3"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "12.2"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "12.1"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "12.0"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "11.14"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "11.13"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "11.12"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "11.11"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "11.10"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "11.9"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "11.8"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "11.7"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "11.6"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "11.5"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "11.4"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "11.3"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "11.2"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "11.1"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "11.0"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "10.15"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "10.14"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "10.13"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "10.12"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "10.11"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "10.10"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "10.9"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "10.8"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "10.7"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "10.6"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "10.5"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "10.4"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "10.3"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "10.2"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "10.1"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "10.0"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "9.10"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "9.9"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "9.8"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "9.7"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "9.6"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "9.5"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "9.4"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "9.3"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "9.2"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "9.1"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "9.0"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "8.15"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "8.14"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "8.13"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "8.12"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "8.11"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "8.10"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "8.9"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "8.8"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "8.7"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "8.6"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "8.5"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "8.4"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "8.3"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "8.2"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "8.1"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "8.0"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "7.9"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "7.8"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "7.7"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "7.6"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "7.5"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "7.4"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "7.3"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "7.2"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "7.1"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "7.0"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "6.16"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "6.15"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "6.14"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "6.13"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "6.12"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "6.11"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "6.10"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "6.9"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "6.8"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "6.7"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "6.6"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "6.5"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "6.4"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "6.3"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "6.2"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "6.1"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "6.0"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "5.11"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "5.10"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "5.9"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "5.8"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "5.7"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "5.6"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "5.5"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "5.4"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "5.3"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "5.2"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "5.1"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "5.0"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "4.8"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "4.7"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "4.6"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "4.5"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "4.4"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "4.3"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "4.2"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "4.1"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "4.0"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "iojs-v3.2"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "iojs-v3.1"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "iojs-v3.0"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "iojs-v2.4"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "iojs-v2.3"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "iojs-v2.2"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "iojs-v2.1"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "iojs-v2.0"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "iojs-v1.7"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "iojs-v1.6"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "iojs-v1.5"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "iojs-v1.4"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "iojs-v1.3"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "iojs-v1.2"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "iojs-v1.1"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "iojs-v1.0"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "0.11"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "0.9"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "0.6"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "0.4"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
allow_failures:
|
||||
- os: osx
|
||||
- env: TEST=true ALLOW_FAILURE=true
|
||||
- env: COVERAGE=true
|
19
assets_old/node_modules/unbox-primitive/CHANGELOG.md
generated
vendored
Normal file
19
assets_old/node_modules/unbox-primitive/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
# 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.0.0 - 2019-08-11
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] add `.travis.yml` [`8c9a5ef`](https://github.com/ljharb/unbox-primitive/commit/8c9a5efdb54be4866e2884bf32cbe830788b2c2a)
|
||||
- Initial commit [`feaff15`](https://github.com/ljharb/unbox-primitive/commit/feaff159eb999adc8763ff3e51d2d3d56d6164f8)
|
||||
- [Tests] add tests [`3dd18d6`](https://github.com/ljharb/unbox-primitive/commit/3dd18d65748efb4af9b8ca66f8d8c5521d8f2dec)
|
||||
- implementation [`472fb41`](https://github.com/ljharb/unbox-primitive/commit/472fb41d049ddee80ebf3219a5837e639a6e9341)
|
||||
- npm init [`e9e426f`](https://github.com/ljharb/unbox-primitive/commit/e9e426fc90b9a3f07ffc48db75f78c414f77bc2b)
|
||||
- [Tests] add linting [`139e74b`](https://github.com/ljharb/unbox-primitive/commit/139e74b94cdfd187b43b24de76c6d84af21ee467)
|
||||
- [meta] create FUNDING.yml [`a9509e1`](https://github.com/ljharb/unbox-primitive/commit/a9509e122163e2b9d98af421e5c0575df36e2310)
|
||||
- Only apps should have lockfiles [`b3d0834`](https://github.com/ljharb/unbox-primitive/commit/b3d0834d69dcbf4cbc1e61ccfaef05acf96cf630)
|
21
assets_old/node_modules/unbox-primitive/LICENSE
generated
vendored
Normal file
21
assets_old/node_modules/unbox-primitive/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2019 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.
|
2
assets_old/node_modules/unbox-primitive/README.md
generated
vendored
Normal file
2
assets_old/node_modules/unbox-primitive/README.md
generated
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
# unbox-primitive
|
||||
Unbox a boxed JS primitive value.
|
39
assets_old/node_modules/unbox-primitive/index.js
generated
vendored
Normal file
39
assets_old/node_modules/unbox-primitive/index.js
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
'use strict';
|
||||
|
||||
var whichBoxedPrimitive = require('which-boxed-primitive');
|
||||
var bind = require('function-bind');
|
||||
var hasSymbols = require('has-symbols')();
|
||||
var hasBigInts = require('has-bigints')();
|
||||
|
||||
var stringToString = bind.call(Function.call, String.prototype.toString);
|
||||
var numberValueOf = bind.call(Function.call, Number.prototype.valueOf);
|
||||
var booleanValueOf = bind.call(Function.call, Boolean.prototype.valueOf);
|
||||
var symbolValueOf = hasSymbols && bind.call(Function.call, Symbol.prototype.valueOf);
|
||||
var bigIntValueOf = hasBigInts && bind.call(Function.call, BigInt.prototype.valueOf);
|
||||
|
||||
module.exports = function unboxPrimitive(value) {
|
||||
var which = whichBoxedPrimitive(value);
|
||||
if (typeof which !== 'string') {
|
||||
throw new TypeError(which === null ? 'value is an unboxed primitive' : 'value is a non-boxed-primitive object');
|
||||
}
|
||||
|
||||
if (which === 'String') {
|
||||
return stringToString(value);
|
||||
}
|
||||
if (which === 'Number') {
|
||||
return numberValueOf(value);
|
||||
}
|
||||
if (which === 'Boolean') {
|
||||
return booleanValueOf(value);
|
||||
}
|
||||
if (which === 'Symbol') {
|
||||
if (!hasSymbols) {
|
||||
throw new EvalError('somehow this environment does not have Symbols, but you have a boxed Symbol value. Please report this!');
|
||||
}
|
||||
return symbolValueOf(value);
|
||||
}
|
||||
if (which === 'BigInt') {
|
||||
return bigIntValueOf(value);
|
||||
}
|
||||
throw new RangeError('unknown boxed primitive found: ' + which);
|
||||
};
|
55
assets_old/node_modules/unbox-primitive/package.json
generated
vendored
Normal file
55
assets_old/node_modules/unbox-primitive/package.json
generated
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"name": "unbox-primitive",
|
||||
"version": "1.0.0",
|
||||
"description": "Unbox a boxed JS primitive value.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"prepublish": "not-in-publish || safe-publish-latest",
|
||||
"preversion": "auto-changelog",
|
||||
"lint": "eslint .",
|
||||
"pretest": "npm run lint",
|
||||
"tests-only": "node test",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "npx aud"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ljharb/unbox-primitive.git"
|
||||
},
|
||||
"keywords": [
|
||||
"unbox",
|
||||
"boxed",
|
||||
"primitive",
|
||||
"object",
|
||||
"javascript",
|
||||
"ecmascript"
|
||||
],
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ljharb/unbox-primitive/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ljharb/unbox-primitive#readme",
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^14.0.2",
|
||||
"auto-changelog": "^1.14.1",
|
||||
"eslint": "^6.1.0",
|
||||
"for-each": "^0.3.3",
|
||||
"in-publish": "^2.0.0",
|
||||
"object-inspect": "^1.6.0",
|
||||
"object-is": "^1.0.1",
|
||||
"safe-publish-latest": "^1.1.2",
|
||||
"tape": "^4.11.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1",
|
||||
"has-bigints": "^1.0.0",
|
||||
"has-symbols": "^1.0.0",
|
||||
"which-boxed-primitive": "^1.0.1"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"backfillLimit": false,
|
||||
"commitLimit": false,
|
||||
"template": "keepachangelog"
|
||||
}
|
||||
}
|
59
assets_old/node_modules/unbox-primitive/test/index.js
generated
vendored
Normal file
59
assets_old/node_modules/unbox-primitive/test/index.js
generated
vendored
Normal file
|
@ -0,0 +1,59 @@
|
|||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var inspect = require('object-inspect');
|
||||
var is = require('object-is');
|
||||
var forEach = require('for-each');
|
||||
var hasSymbols = require('has-symbols')();
|
||||
var hasBigInts = require('has-bigints')();
|
||||
|
||||
var unboxPrimitive = require('..');
|
||||
|
||||
var debug = function (v, m) { return inspect(v) + ' ' + m; };
|
||||
|
||||
test('primitives', function (t) {
|
||||
var primitives = [
|
||||
true,
|
||||
false,
|
||||
'',
|
||||
'foo',
|
||||
42,
|
||||
NaN,
|
||||
Infinity,
|
||||
0
|
||||
];
|
||||
if (hasSymbols) {
|
||||
primitives.push(Symbol(), Symbol.iterator, Symbol('f'));
|
||||
}
|
||||
if (hasBigInts) {
|
||||
primitives.push(BigInt(42), BigInt(0));
|
||||
}
|
||||
forEach(primitives, function (primitive) {
|
||||
var obj = Object(primitive);
|
||||
t.ok(
|
||||
is(unboxPrimitive(obj), primitive),
|
||||
debug(obj, 'unboxes to ' + inspect(primitive))
|
||||
);
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('objects', function (t) {
|
||||
var objects = [
|
||||
{},
|
||||
[],
|
||||
function () {},
|
||||
/a/g,
|
||||
new Date()
|
||||
];
|
||||
forEach(objects, function (object) {
|
||||
t['throws'](
|
||||
function () { unboxPrimitive(object); },
|
||||
TypeError,
|
||||
debug(object, 'is not a primitive')
|
||||
);
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue