angular-slickgrid 4.2.1 → 4.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/app/modules/angular-slickgrid/components/angular-slickgrid.component.d.ts +2 -2
- package/app/modules/angular-slickgrid/extensions/slickRowDetailView.d.ts +0 -2
- package/docs/assets/lib/multiple-select/README.md +17 -17
- package/esm2020/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +14 -14
- package/esm2020/app/modules/angular-slickgrid/constants.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/extensions/index.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/extensions/slickRowDetailView.mjs +2 -4
- package/esm2020/app/modules/angular-slickgrid/global-grid-options.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/index.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/models/angularComponentOutput.interface.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/models/angularGridInstance.interface.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/models/gridOption.interface.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/models/index.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/models/rowDetailView.interface.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/models/slickGrid.interface.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/modules/angular-slickgrid.module.mjs +7 -10
- package/esm2020/app/modules/angular-slickgrid/services/angularUtil.service.mjs +4 -4
- package/esm2020/app/modules/angular-slickgrid/services/bsDropdown.service.mjs +4 -4
- package/esm2020/app/modules/angular-slickgrid/services/container.service.mjs +4 -4
- package/esm2020/app/modules/angular-slickgrid/services/index.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/services/translater.service.mjs +4 -4
- package/esm2020/app/modules/angular-slickgrid/services/utilities.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/slickgrid-config.mjs +1 -1
- package/esm2020/public_api.mjs +1 -1
- package/fesm2015/angular-slickgrid.mjs +32 -37
- package/fesm2015/angular-slickgrid.mjs.map +1 -1
- package/fesm2020/angular-slickgrid.mjs +32 -37
- package/fesm2020/angular-slickgrid.mjs.map +1 -1
- package/i18n/en.json +89 -89
- package/i18n/fr.json +90 -90
- package/{angular-slickgrid.d.ts → index.d.ts} +0 -0
- package/package.json +11 -11
- package/test/cypress/node_modules/@cypress/request/README.md +1038 -0
- package/test/cypress/node_modules/@cypress/xvfb/README.md +48 -0
- package/test/cypress/node_modules/@cypress/xvfb/node_modules/debug/README.md +437 -0
- package/test/cypress/node_modules/@types/node/README.md +16 -0
- package/test/cypress/node_modules/@types/sinonjs__fake-timers/README.md +16 -0
- package/test/cypress/node_modules/@types/sizzle/README.md +16 -0
- package/test/cypress/node_modules/@types/yauzl/README.md +16 -0
- package/test/cypress/node_modules/@types/yauzl/node_modules/@types/node/README.md +16 -0
- package/test/cypress/node_modules/aggregate-error/README.md +61 -0
- package/test/cypress/node_modules/ansi-colors/README.md +315 -0
- package/test/cypress/node_modules/ansi-escapes/README.md +245 -0
- package/test/cypress/node_modules/ansi-regex/README.md +78 -0
- package/test/cypress/node_modules/ansi-styles/README.md +152 -0
- package/test/cypress/node_modules/arch/README.md +71 -0
- package/test/cypress/node_modules/asn1/README.md +50 -0
- package/test/cypress/node_modules/assert-plus/README.md +162 -0
- package/test/cypress/node_modules/astral-regex/README.md +46 -0
- package/test/cypress/node_modules/async/README.md +60 -0
- package/test/cypress/node_modules/asynckit/README.md +233 -0
- package/test/cypress/node_modules/at-least-node/README.md +25 -0
- package/test/cypress/node_modules/aws-sign2/README.md +4 -0
- package/test/cypress/node_modules/aws4/README.md +183 -0
- package/test/cypress/node_modules/balanced-match/README.md +91 -0
- package/test/cypress/node_modules/base64-js/README.md +34 -0
- package/test/cypress/node_modules/bcrypt-pbkdf/README.md +45 -0
- package/test/cypress/node_modules/blob-util/README.md +623 -0
- package/test/cypress/node_modules/bluebird/README.md +57 -0
- package/test/cypress/node_modules/brace-expansion/README.md +129 -0
- package/test/cypress/node_modules/buffer/README.md +410 -0
- package/test/cypress/node_modules/buffer-crc32/README.md +47 -0
- package/test/cypress/node_modules/cachedir/README.md +27 -0
- package/test/cypress/node_modules/caseless/README.md +45 -0
- package/test/cypress/node_modules/chalk/README.md +293 -0
- package/test/cypress/node_modules/chalk/node_modules/supports-color/README.md +76 -0
- package/test/cypress/node_modules/check-more-types/README.md +952 -0
- package/test/cypress/node_modules/ci-info/README.md +114 -0
- package/test/cypress/node_modules/clean-stack/README.md +76 -0
- package/test/cypress/node_modules/cli-cursor/README.md +55 -0
- package/test/cypress/node_modules/cli-table3/README.md +218 -0
- package/test/cypress/node_modules/cli-truncate/README.md +139 -0
- package/test/cypress/node_modules/color-convert/README.md +68 -0
- package/test/cypress/node_modules/color-name/README.md +11 -0
- package/test/cypress/node_modules/colorette/README.md +102 -0
- package/test/cypress/node_modules/colors/README.md +221 -0
- package/test/cypress/node_modules/combined-stream/README.md +138 -0
- package/test/cypress/node_modules/commander/README.md +737 -0
- package/test/cypress/node_modules/common-tags/README.md +687 -0
- package/test/cypress/node_modules/core-util-is/README.md +3 -0
- package/test/cypress/node_modules/cross-spawn/README.md +96 -0
- package/test/cypress/node_modules/cypress/README.md +25 -0
- package/test/cypress/node_modules/cypress/mount-utils/README.md +14 -0
- package/test/cypress/node_modules/cypress/react/README.md +414 -0
- package/test/cypress/node_modules/cypress/vue/README.md +678 -0
- package/test/cypress/node_modules/cypress/vue2/README.md +693 -0
- package/test/cypress/node_modules/dashdash/README.md +574 -0
- package/test/cypress/node_modules/dayjs/README.md +128 -0
- package/test/cypress/node_modules/debug/README.md +455 -0
- package/test/cypress/node_modules/delayed-stream/README.md +141 -0
- package/test/cypress/node_modules/ecc-jsbn/README.md +8 -0
- package/test/cypress/node_modules/emoji-regex/README.md +73 -0
- package/test/cypress/node_modules/end-of-stream/README.md +54 -0
- package/test/cypress/node_modules/enquirer/README.md +1752 -0
- package/test/cypress/node_modules/escape-string-regexp/README.md +27 -0
- package/test/cypress/node_modules/eventemitter2/README.md +809 -0
- package/test/cypress/node_modules/execa/README.md +656 -0
- package/test/cypress/node_modules/executable/README.md +64 -0
- package/test/cypress/node_modules/extend/README.md +81 -0
- package/test/cypress/node_modules/extract-zip/README.md +57 -0
- package/test/cypress/node_modules/extract-zip/node_modules/debug/README.md +455 -0
- package/test/cypress/node_modules/extsprintf/README.md +46 -0
- package/test/cypress/node_modules/fd-slicer/README.md +199 -0
- package/test/cypress/node_modules/figures/README.md +139 -0
- package/test/cypress/node_modules/forever-agent/README.md +4 -0
- package/test/cypress/node_modules/form-data/README.md +234 -0
- package/test/cypress/node_modules/fs-extra/README.md +264 -0
- package/test/cypress/node_modules/fs.realpath/README.md +33 -0
- package/test/cypress/node_modules/get-stream/README.md +124 -0
- package/test/cypress/node_modules/getos/README.md +79 -0
- package/test/cypress/node_modules/getpass/README.md +32 -0
- package/test/cypress/node_modules/glob/README.md +375 -0
- package/test/cypress/node_modules/global-dirs/README.md +72 -0
- package/test/cypress/node_modules/graceful-fs/README.md +133 -0
- package/test/cypress/node_modules/has-flag/README.md +89 -0
- package/test/cypress/node_modules/http-signature/README.md +80 -0
- package/test/cypress/node_modules/human-signals/README.md +155 -0
- package/test/cypress/node_modules/ieee754/README.md +51 -0
- package/test/cypress/node_modules/indent-string/README.md +70 -0
- package/test/cypress/node_modules/inflight/README.md +37 -0
- package/test/cypress/node_modules/inherits/README.md +42 -0
- package/test/cypress/node_modules/ini/README.md +102 -0
- package/test/cypress/node_modules/is-ci/README.md +50 -0
- package/test/cypress/node_modules/is-fullwidth-code-point/README.md +39 -0
- package/test/cypress/node_modules/is-installed-globally/README.md +31 -0
- package/test/cypress/node_modules/is-path-inside/README.md +63 -0
- package/test/cypress/node_modules/is-stream/README.md +57 -0
- package/test/cypress/node_modules/is-typedarray/README.md +16 -0
- package/test/cypress/node_modules/isexe/README.md +51 -0
- package/test/cypress/node_modules/isstream/README.md +66 -0
- package/test/cypress/node_modules/jsbn/README.md +175 -0
- package/test/cypress/node_modules/json-schema/README.md +3 -0
- package/test/cypress/node_modules/json-stringify-safe/README.md +52 -0
- package/test/cypress/node_modules/jsonfile/README.md +205 -0
- package/test/cypress/node_modules/jsonfile/node_modules/universalify/README.md +76 -0
- package/test/cypress/node_modules/jsprim/README.md +287 -0
- package/test/cypress/node_modules/lazy-ass/README.md +269 -0
- package/test/cypress/node_modules/listr2/README.md +17 -0
- package/test/cypress/node_modules/lodash/README.md +39 -0
- package/test/cypress/node_modules/lodash.once/README.md +18 -0
- package/test/cypress/node_modules/log-symbols/README.md +51 -0
- package/test/cypress/node_modules/log-update/README.md +97 -0
- package/test/cypress/node_modules/log-update/node_modules/slice-ansi/README.md +66 -0
- package/test/cypress/node_modules/log-update/node_modules/wrap-ansi/README.md +97 -0
- package/test/cypress/node_modules/lru-cache/README.md +166 -0
- package/test/cypress/node_modules/merge-stream/README.md +78 -0
- package/test/cypress/node_modules/mime-db/README.md +102 -0
- package/test/cypress/node_modules/mime-types/README.md +123 -0
- package/test/cypress/node_modules/mimic-fn/README.md +69 -0
- package/test/cypress/node_modules/minimatch/README.md +209 -0
- package/test/cypress/node_modules/ms/README.md +60 -0
- package/test/cypress/node_modules/npm-run-path/README.md +115 -0
- package/test/cypress/node_modules/once/README.md +79 -0
- package/test/cypress/node_modules/onetime/README.md +94 -0
- package/test/cypress/node_modules/ospath/README.md +53 -0
- package/test/cypress/node_modules/p-map/README.md +89 -0
- package/test/cypress/node_modules/path-is-absolute/README.md +59 -0
- package/test/cypress/node_modules/path-key/README.md +61 -0
- package/test/cypress/node_modules/pend/README.md +41 -0
- package/test/cypress/node_modules/performance-now/README.md +30 -0
- package/test/cypress/node_modules/pify/README.md +119 -0
- package/test/cypress/node_modules/pretty-bytes/README.md +131 -0
- package/test/cypress/node_modules/proxy-from-env/README.md +131 -0
- package/test/cypress/node_modules/psl/README.md +215 -0
- package/test/cypress/node_modules/pump/README.md +65 -0
- package/test/cypress/node_modules/punycode/README.md +122 -0
- package/test/cypress/node_modules/qs/README.md +475 -0
- package/test/cypress/node_modules/request-progress/README.md +78 -0
- package/test/cypress/node_modules/restore-cursor/README.md +26 -0
- package/test/cypress/node_modules/rimraf/README.md +101 -0
- package/test/cypress/node_modules/rxjs/README.md +147 -0
- package/test/cypress/node_modules/rxjs/_esm2015/README.md +147 -0
- package/test/cypress/node_modules/rxjs/_esm5/README.md +147 -0
- package/test/cypress/node_modules/rxjs/src/README.md +147 -0
- package/test/cypress/node_modules/safe-buffer/README.md +584 -0
- package/test/cypress/node_modules/safer-buffer/README.md +156 -0
- package/test/cypress/node_modules/semver/README.md +566 -0
- package/test/cypress/node_modules/shebang-command/README.md +34 -0
- package/test/cypress/node_modules/shebang-regex/README.md +33 -0
- package/test/cypress/node_modules/signal-exit/README.md +39 -0
- package/test/cypress/node_modules/slice-ansi/README.md +72 -0
- package/test/cypress/node_modules/sshpk/README.md +804 -0
- package/test/cypress/node_modules/string-width/README.md +50 -0
- package/test/cypress/node_modules/strip-ansi/README.md +46 -0
- package/test/cypress/node_modules/strip-final-newline/README.md +30 -0
- package/test/cypress/node_modules/supports-color/README.md +77 -0
- package/test/cypress/node_modules/throttleit/README.md +32 -0
- package/test/cypress/node_modules/tmp/README.md +365 -0
- package/test/cypress/node_modules/tough-cookie/README.md +527 -0
- package/test/cypress/node_modules/tslib/README.md +142 -0
- package/test/cypress/node_modules/tunnel-agent/README.md +4 -0
- package/test/cypress/node_modules/tweetnacl/README.md +459 -0
- package/test/cypress/node_modules/type-fest/README.md +760 -0
- package/test/cypress/node_modules/universalify/README.md +76 -0
- package/test/cypress/node_modules/untildify/README.md +30 -0
- package/test/cypress/node_modules/uuid/README.md +505 -0
- package/test/cypress/node_modules/verror/README.md +528 -0
- package/test/cypress/node_modules/verror/node_modules/extsprintf/README.md +46 -0
- package/test/cypress/node_modules/which/README.md +54 -0
- package/test/cypress/node_modules/wrap-ansi/README.md +91 -0
- package/test/cypress/node_modules/wrappy/README.md +36 -0
- package/test/cypress/node_modules/yallist/README.md +204 -0
- package/test/cypress/node_modules/yauzl/README.md +658 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# ansi-styles [](https://travis-ci.org/chalk/ansi-styles)
|
|
2
|
+
|
|
3
|
+
> [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
|
|
4
|
+
|
|
5
|
+
You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
|
|
6
|
+
|
|
7
|
+
<img src="screenshot.svg" width="900">
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
$ npm install ansi-styles
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
const style = require('ansi-styles');
|
|
19
|
+
|
|
20
|
+
console.log(`${style.green.open}Hello world!${style.green.close}`);
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
// Color conversion between 16/256/truecolor
|
|
24
|
+
// NOTE: If conversion goes to 16 colors or 256 colors, the original color
|
|
25
|
+
// may be degraded to fit that color palette. This means terminals
|
|
26
|
+
// that do not support 16 million colors will best-match the
|
|
27
|
+
// original color.
|
|
28
|
+
console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close);
|
|
29
|
+
console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close);
|
|
30
|
+
console.log(style.color.ansi16m.hex('#abcdef') + 'Hello world!' + style.color.close);
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## API
|
|
34
|
+
|
|
35
|
+
Each style has an `open` and `close` property.
|
|
36
|
+
|
|
37
|
+
## Styles
|
|
38
|
+
|
|
39
|
+
### Modifiers
|
|
40
|
+
|
|
41
|
+
- `reset`
|
|
42
|
+
- `bold`
|
|
43
|
+
- `dim`
|
|
44
|
+
- `italic` *(Not widely supported)*
|
|
45
|
+
- `underline`
|
|
46
|
+
- `inverse`
|
|
47
|
+
- `hidden`
|
|
48
|
+
- `strikethrough` *(Not widely supported)*
|
|
49
|
+
|
|
50
|
+
### Colors
|
|
51
|
+
|
|
52
|
+
- `black`
|
|
53
|
+
- `red`
|
|
54
|
+
- `green`
|
|
55
|
+
- `yellow`
|
|
56
|
+
- `blue`
|
|
57
|
+
- `magenta`
|
|
58
|
+
- `cyan`
|
|
59
|
+
- `white`
|
|
60
|
+
- `blackBright` (alias: `gray`, `grey`)
|
|
61
|
+
- `redBright`
|
|
62
|
+
- `greenBright`
|
|
63
|
+
- `yellowBright`
|
|
64
|
+
- `blueBright`
|
|
65
|
+
- `magentaBright`
|
|
66
|
+
- `cyanBright`
|
|
67
|
+
- `whiteBright`
|
|
68
|
+
|
|
69
|
+
### Background colors
|
|
70
|
+
|
|
71
|
+
- `bgBlack`
|
|
72
|
+
- `bgRed`
|
|
73
|
+
- `bgGreen`
|
|
74
|
+
- `bgYellow`
|
|
75
|
+
- `bgBlue`
|
|
76
|
+
- `bgMagenta`
|
|
77
|
+
- `bgCyan`
|
|
78
|
+
- `bgWhite`
|
|
79
|
+
- `bgBlackBright` (alias: `bgGray`, `bgGrey`)
|
|
80
|
+
- `bgRedBright`
|
|
81
|
+
- `bgGreenBright`
|
|
82
|
+
- `bgYellowBright`
|
|
83
|
+
- `bgBlueBright`
|
|
84
|
+
- `bgMagentaBright`
|
|
85
|
+
- `bgCyanBright`
|
|
86
|
+
- `bgWhiteBright`
|
|
87
|
+
|
|
88
|
+
## Advanced usage
|
|
89
|
+
|
|
90
|
+
By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
|
|
91
|
+
|
|
92
|
+
- `style.modifier`
|
|
93
|
+
- `style.color`
|
|
94
|
+
- `style.bgColor`
|
|
95
|
+
|
|
96
|
+
###### Example
|
|
97
|
+
|
|
98
|
+
```js
|
|
99
|
+
console.log(style.color.green.open);
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values.
|
|
103
|
+
|
|
104
|
+
###### Example
|
|
105
|
+
|
|
106
|
+
```js
|
|
107
|
+
console.log(style.codes.get(36));
|
|
108
|
+
//=> 39
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728)
|
|
112
|
+
|
|
113
|
+
`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors.
|
|
114
|
+
|
|
115
|
+
The following color spaces from `color-convert` are supported:
|
|
116
|
+
|
|
117
|
+
- `rgb`
|
|
118
|
+
- `hex`
|
|
119
|
+
- `keyword`
|
|
120
|
+
- `hsl`
|
|
121
|
+
- `hsv`
|
|
122
|
+
- `hwb`
|
|
123
|
+
- `ansi`
|
|
124
|
+
- `ansi256`
|
|
125
|
+
|
|
126
|
+
To use these, call the associated conversion function with the intended output, for example:
|
|
127
|
+
|
|
128
|
+
```js
|
|
129
|
+
style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code
|
|
130
|
+
style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code
|
|
131
|
+
|
|
132
|
+
style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
|
|
133
|
+
style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
|
|
134
|
+
|
|
135
|
+
style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code
|
|
136
|
+
style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Related
|
|
140
|
+
|
|
141
|
+
- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal
|
|
142
|
+
|
|
143
|
+
## Maintainers
|
|
144
|
+
|
|
145
|
+
- [Sindre Sorhus](https://github.com/sindresorhus)
|
|
146
|
+
- [Josh Junon](https://github.com/qix-)
|
|
147
|
+
|
|
148
|
+
## For enterprise
|
|
149
|
+
|
|
150
|
+
Available as part of the Tidelift Subscription.
|
|
151
|
+
|
|
152
|
+
The maintainers of `ansi-styles` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-ansi-styles?utm_source=npm-ansi-styles&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# arch [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
|
|
2
|
+
|
|
3
|
+
[travis-image]: https://img.shields.io/travis/feross/arch/master.svg
|
|
4
|
+
[travis-url]: https://travis-ci.org/feross/arch
|
|
5
|
+
[npm-image]: https://img.shields.io/npm/v/arch.svg
|
|
6
|
+
[npm-url]: https://npmjs.org/package/arch
|
|
7
|
+
[downloads-image]: https://img.shields.io/npm/dm/arch.svg
|
|
8
|
+
[downloads-url]: https://npmjs.org/package/arch
|
|
9
|
+
[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
|
|
10
|
+
[standard-url]: https://standardjs.com
|
|
11
|
+
|
|
12
|
+
### Better `os.arch()` for node and the browser -- detect OS architecture
|
|
13
|
+
|
|
14
|
+
[](https://saucelabs.com/u/arch2)
|
|
15
|
+
|
|
16
|
+
This module is used by [WebTorrent Desktop](http://webtorrent.io/desktop) to
|
|
17
|
+
determine if the user is on a 32-bit vs. 64-bit operating system to offer the
|
|
18
|
+
right app installer.
|
|
19
|
+
|
|
20
|
+
In Node.js, the `os.arch()` method (and `process.arch` property) returns a string
|
|
21
|
+
identifying the operating system CPU architecture **for which the Node.js binary
|
|
22
|
+
was compiled**.
|
|
23
|
+
|
|
24
|
+
This is not the same as the **operating system CPU architecture**. For example,
|
|
25
|
+
you can run Node.js 32-bit on a 64-bit OS. In that situation, `os.arch()` will
|
|
26
|
+
return a misleading 'x86' (32-bit) value, instead of 'x64' (64-bit).
|
|
27
|
+
|
|
28
|
+
Use this package to get the actual operating system CPU architecture.
|
|
29
|
+
|
|
30
|
+
**BONUS: This package works in the browser too.**
|
|
31
|
+
|
|
32
|
+
## install
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
npm install arch
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## usage
|
|
39
|
+
|
|
40
|
+
```js
|
|
41
|
+
var arch = require('arch')
|
|
42
|
+
console.log(arch()) // always returns 'x64' or 'x86'
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
In the browser, there is no spec that defines where this information lives, so we
|
|
46
|
+
check all known locations including `navigator.userAgent`, `navigator.platform`,
|
|
47
|
+
and `navigator.cpuClass` to make a best guess.
|
|
48
|
+
|
|
49
|
+
If there is no *affirmative indication* that the architecture is 64-bit, then
|
|
50
|
+
32-bit will be assumed. This makes this package perfect for determining what
|
|
51
|
+
installer executable to offer to desktop app users. If there is ambiguity, then
|
|
52
|
+
the user will get the 32-bit installer, which will work fine even for a user with
|
|
53
|
+
a 64-bit OS.
|
|
54
|
+
|
|
55
|
+
For reference, `x64` means 64-bit and `x86` means 32-bit.
|
|
56
|
+
|
|
57
|
+
Here is some history behind these naming conventions:
|
|
58
|
+
|
|
59
|
+
- https://en.wikipedia.org/wiki/X86
|
|
60
|
+
- https://en.wikipedia.org/wiki/IA-32
|
|
61
|
+
- https://en.wikipedia.org/wiki/X86-64
|
|
62
|
+
|
|
63
|
+
## Node.js proposal - `os.sysarch()`
|
|
64
|
+
|
|
65
|
+
Note: There is
|
|
66
|
+
[a proposal](https://github.com/nodejs/node-v0.x-archive/issues/2862#issuecomment-103942051)
|
|
67
|
+
to add this functionality to Node.js as `os.sysarch()`.
|
|
68
|
+
|
|
69
|
+
## license
|
|
70
|
+
|
|
71
|
+
MIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org).
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS.
|
|
2
|
+
Currently BER encoding is supported; at some point I'll likely have to do DER.
|
|
3
|
+
|
|
4
|
+
## Usage
|
|
5
|
+
|
|
6
|
+
Mostly, if you're *actually* needing to read and write ASN.1, you probably don't
|
|
7
|
+
need this readme to explain what and why. If you have no idea what ASN.1 is,
|
|
8
|
+
see this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc
|
|
9
|
+
|
|
10
|
+
The source is pretty much self-explanatory, and has read/write methods for the
|
|
11
|
+
common types out there.
|
|
12
|
+
|
|
13
|
+
### Decoding
|
|
14
|
+
|
|
15
|
+
The following reads an ASN.1 sequence with a boolean.
|
|
16
|
+
|
|
17
|
+
var Ber = require('asn1').Ber;
|
|
18
|
+
|
|
19
|
+
var reader = new Ber.Reader(Buffer.from([0x30, 0x03, 0x01, 0x01, 0xff]));
|
|
20
|
+
|
|
21
|
+
reader.readSequence();
|
|
22
|
+
console.log('Sequence len: ' + reader.length);
|
|
23
|
+
if (reader.peek() === Ber.Boolean)
|
|
24
|
+
console.log(reader.readBoolean());
|
|
25
|
+
|
|
26
|
+
### Encoding
|
|
27
|
+
|
|
28
|
+
The following generates the same payload as above.
|
|
29
|
+
|
|
30
|
+
var Ber = require('asn1').Ber;
|
|
31
|
+
|
|
32
|
+
var writer = new Ber.Writer();
|
|
33
|
+
|
|
34
|
+
writer.startSequence();
|
|
35
|
+
writer.writeBoolean(true);
|
|
36
|
+
writer.endSequence();
|
|
37
|
+
|
|
38
|
+
console.log(writer.buffer);
|
|
39
|
+
|
|
40
|
+
## Installation
|
|
41
|
+
|
|
42
|
+
npm install asn1
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
MIT.
|
|
47
|
+
|
|
48
|
+
## Bugs
|
|
49
|
+
|
|
50
|
+
See <https://github.com/joyent/node-asn1/issues>.
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# assert-plus
|
|
2
|
+
|
|
3
|
+
This library is a super small wrapper over node's assert module that has two
|
|
4
|
+
things: (1) the ability to disable assertions with the environment variable
|
|
5
|
+
NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like
|
|
6
|
+
`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks
|
|
7
|
+
like this:
|
|
8
|
+
|
|
9
|
+
```javascript
|
|
10
|
+
var assert = require('assert-plus');
|
|
11
|
+
|
|
12
|
+
function fooAccount(options, callback) {
|
|
13
|
+
assert.object(options, 'options');
|
|
14
|
+
assert.number(options.id, 'options.id');
|
|
15
|
+
assert.bool(options.isManager, 'options.isManager');
|
|
16
|
+
assert.string(options.name, 'options.name');
|
|
17
|
+
assert.arrayOfString(options.email, 'options.email');
|
|
18
|
+
assert.func(callback, 'callback');
|
|
19
|
+
|
|
20
|
+
// Do stuff
|
|
21
|
+
callback(null, {});
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
# API
|
|
26
|
+
|
|
27
|
+
All methods that *aren't* part of node's core assert API are simply assumed to
|
|
28
|
+
take an argument, and then a string 'name' that's not a message; `AssertionError`
|
|
29
|
+
will be thrown if the assertion fails with a message like:
|
|
30
|
+
|
|
31
|
+
AssertionError: foo (string) is required
|
|
32
|
+
at test (/home/mark/work/foo/foo.js:3:9)
|
|
33
|
+
at Object.<anonymous> (/home/mark/work/foo/foo.js:15:1)
|
|
34
|
+
at Module._compile (module.js:446:26)
|
|
35
|
+
at Object..js (module.js:464:10)
|
|
36
|
+
at Module.load (module.js:353:31)
|
|
37
|
+
at Function._load (module.js:311:12)
|
|
38
|
+
at Array.0 (module.js:484:10)
|
|
39
|
+
at EventEmitter._tickCallback (node.js:190:38)
|
|
40
|
+
|
|
41
|
+
from:
|
|
42
|
+
|
|
43
|
+
```javascript
|
|
44
|
+
function test(foo) {
|
|
45
|
+
assert.string(foo, 'foo');
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`:
|
|
50
|
+
|
|
51
|
+
```javascript
|
|
52
|
+
function test(foo) {
|
|
53
|
+
assert.arrayOfString(foo, 'foo');
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
You can assert IFF an argument is not `undefined` (i.e., an optional arg):
|
|
58
|
+
|
|
59
|
+
```javascript
|
|
60
|
+
assert.optionalString(foo, 'foo');
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Lastly, you can opt-out of assertion checking altogether by setting the
|
|
64
|
+
environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have
|
|
65
|
+
lots of assertions, and don't want to pay `typeof ()` taxes to v8 in
|
|
66
|
+
production. Be advised: The standard functions re-exported from `assert` are
|
|
67
|
+
also disabled in assert-plus if NDEBUG is specified. Using them directly from
|
|
68
|
+
the `assert` module avoids this behavior.
|
|
69
|
+
|
|
70
|
+
The complete list of APIs is:
|
|
71
|
+
|
|
72
|
+
* assert.array
|
|
73
|
+
* assert.bool
|
|
74
|
+
* assert.buffer
|
|
75
|
+
* assert.func
|
|
76
|
+
* assert.number
|
|
77
|
+
* assert.finite
|
|
78
|
+
* assert.object
|
|
79
|
+
* assert.string
|
|
80
|
+
* assert.stream
|
|
81
|
+
* assert.date
|
|
82
|
+
* assert.regexp
|
|
83
|
+
* assert.uuid
|
|
84
|
+
* assert.arrayOfArray
|
|
85
|
+
* assert.arrayOfBool
|
|
86
|
+
* assert.arrayOfBuffer
|
|
87
|
+
* assert.arrayOfFunc
|
|
88
|
+
* assert.arrayOfNumber
|
|
89
|
+
* assert.arrayOfFinite
|
|
90
|
+
* assert.arrayOfObject
|
|
91
|
+
* assert.arrayOfString
|
|
92
|
+
* assert.arrayOfStream
|
|
93
|
+
* assert.arrayOfDate
|
|
94
|
+
* assert.arrayOfRegexp
|
|
95
|
+
* assert.arrayOfUuid
|
|
96
|
+
* assert.optionalArray
|
|
97
|
+
* assert.optionalBool
|
|
98
|
+
* assert.optionalBuffer
|
|
99
|
+
* assert.optionalFunc
|
|
100
|
+
* assert.optionalNumber
|
|
101
|
+
* assert.optionalFinite
|
|
102
|
+
* assert.optionalObject
|
|
103
|
+
* assert.optionalString
|
|
104
|
+
* assert.optionalStream
|
|
105
|
+
* assert.optionalDate
|
|
106
|
+
* assert.optionalRegexp
|
|
107
|
+
* assert.optionalUuid
|
|
108
|
+
* assert.optionalArrayOfArray
|
|
109
|
+
* assert.optionalArrayOfBool
|
|
110
|
+
* assert.optionalArrayOfBuffer
|
|
111
|
+
* assert.optionalArrayOfFunc
|
|
112
|
+
* assert.optionalArrayOfNumber
|
|
113
|
+
* assert.optionalArrayOfFinite
|
|
114
|
+
* assert.optionalArrayOfObject
|
|
115
|
+
* assert.optionalArrayOfString
|
|
116
|
+
* assert.optionalArrayOfStream
|
|
117
|
+
* assert.optionalArrayOfDate
|
|
118
|
+
* assert.optionalArrayOfRegexp
|
|
119
|
+
* assert.optionalArrayOfUuid
|
|
120
|
+
* assert.AssertionError
|
|
121
|
+
* assert.fail
|
|
122
|
+
* assert.ok
|
|
123
|
+
* assert.equal
|
|
124
|
+
* assert.notEqual
|
|
125
|
+
* assert.deepEqual
|
|
126
|
+
* assert.notDeepEqual
|
|
127
|
+
* assert.strictEqual
|
|
128
|
+
* assert.notStrictEqual
|
|
129
|
+
* assert.throws
|
|
130
|
+
* assert.doesNotThrow
|
|
131
|
+
* assert.ifError
|
|
132
|
+
|
|
133
|
+
# Installation
|
|
134
|
+
|
|
135
|
+
npm install assert-plus
|
|
136
|
+
|
|
137
|
+
## License
|
|
138
|
+
|
|
139
|
+
The MIT License (MIT)
|
|
140
|
+
Copyright (c) 2012 Mark Cavage
|
|
141
|
+
|
|
142
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
143
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
144
|
+
the Software without restriction, including without limitation the rights to
|
|
145
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
146
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
147
|
+
subject to the following conditions:
|
|
148
|
+
|
|
149
|
+
The above copyright notice and this permission notice shall be included in all
|
|
150
|
+
copies or substantial portions of the Software.
|
|
151
|
+
|
|
152
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
153
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
154
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
155
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
156
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
157
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
158
|
+
SOFTWARE.
|
|
159
|
+
|
|
160
|
+
## Bugs
|
|
161
|
+
|
|
162
|
+
See <https://github.com/mcavage/node-assert-plus/issues>.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# astral-regex [](https://travis-ci.org/kevva/astral-regex)
|
|
2
|
+
|
|
3
|
+
> Regular expression for matching [astral symbols](https://everything2.com/title/astral+plane)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
$ npm install astral-regex
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
const astralRegex = require('astral-regex');
|
|
17
|
+
|
|
18
|
+
astralRegex({exact: true}).test('🦄');
|
|
19
|
+
//=> true
|
|
20
|
+
|
|
21
|
+
'foo 🦄 💩 bar'.match(astralRegex());
|
|
22
|
+
//=> ['🦄', '💩']
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## API
|
|
27
|
+
|
|
28
|
+
### astralRegex([options])
|
|
29
|
+
|
|
30
|
+
Returns a `RegExp` for matching astral symbols.
|
|
31
|
+
|
|
32
|
+
#### options
|
|
33
|
+
|
|
34
|
+
Type: `Object`
|
|
35
|
+
|
|
36
|
+
##### exact
|
|
37
|
+
|
|
38
|
+
Type: `boolean`<br>
|
|
39
|
+
Default: `false` *(Matches any astral symbols in a string)*
|
|
40
|
+
|
|
41
|
+
Only match an exact string. Useful with `RegExp#test()` to check if a string is a astral symbol.
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
MIT © [Kevin Mårtensson](https://github.com/kevva)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
[](https://travis-ci.org/caolan/async)
|
|
4
|
+
[](https://dev.azure.com/caolanmcmahon/async/_build/latest?definitionId=1&branchName=master)
|
|
5
|
+
[](https://www.npmjs.com/package/async)
|
|
6
|
+
[](https://coveralls.io/r/caolan/async?branch=master)
|
|
7
|
+
[](https://gitter.im/caolan/async?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
8
|
+
[](https://www.jsdelivr.com/package/npm/async)
|
|
9
|
+
|
|
10
|
+
<!--
|
|
11
|
+
|Linux|Windows|MacOS|
|
|
12
|
+
|-|-|-|
|
|
13
|
+
|[](https://dev.azure.com/caolanmcmahon/async/_build/latest?definitionId=1&branchName=master) | [](https://dev.azure.com/caolanmcmahon/async/_build/latest?definitionId=1&branchName=master) | [](https://dev.azure.com/caolanmcmahon/async/_build/latest?definitionId=1&branchName=master)| -->
|
|
14
|
+
|
|
15
|
+
Async is a utility module which provides straight-forward, powerful functions for working with [asynchronous JavaScript](http://caolan.github.io/async/v3/global.html). Although originally designed for use with [Node.js](https://nodejs.org/) and installable via `npm i async`, it can also be used directly in the browser. A ESM/MJS version is included in the main `async` package that should automatically be used with compatible bundlers such as Webpack and Rollup.
|
|
16
|
+
|
|
17
|
+
A pure ESM version of Async is available as [`async-es`](https://www.npmjs.com/package/async-es).
|
|
18
|
+
|
|
19
|
+
For Documentation, visit <https://caolan.github.io/async/>
|
|
20
|
+
|
|
21
|
+
*For Async v1.5.x documentation, go [HERE](https://github.com/caolan/async/blob/v1.5.2/README.md)*
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
```javascript
|
|
25
|
+
// for use with Node-style callbacks...
|
|
26
|
+
var async = require("async");
|
|
27
|
+
|
|
28
|
+
var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"};
|
|
29
|
+
var configs = {};
|
|
30
|
+
|
|
31
|
+
async.forEachOf(obj, (value, key, callback) => {
|
|
32
|
+
fs.readFile(__dirname + value, "utf8", (err, data) => {
|
|
33
|
+
if (err) return callback(err);
|
|
34
|
+
try {
|
|
35
|
+
configs[key] = JSON.parse(data);
|
|
36
|
+
} catch (e) {
|
|
37
|
+
return callback(e);
|
|
38
|
+
}
|
|
39
|
+
callback();
|
|
40
|
+
});
|
|
41
|
+
}, err => {
|
|
42
|
+
if (err) console.error(err.message);
|
|
43
|
+
// configs is now a map of JSON data
|
|
44
|
+
doSomethingWith(configs);
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```javascript
|
|
49
|
+
var async = require("async");
|
|
50
|
+
|
|
51
|
+
// ...or ES2017 async functions
|
|
52
|
+
async.mapLimit(urls, 5, async function(url) {
|
|
53
|
+
const response = await fetch(url)
|
|
54
|
+
return response.body
|
|
55
|
+
}, (err, results) => {
|
|
56
|
+
if (err) throw err
|
|
57
|
+
// results is now an array of the response bodies
|
|
58
|
+
console.log(results)
|
|
59
|
+
})
|
|
60
|
+
```
|