angular-slickgrid 4.2.0 → 4.2.3
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/{dist/app → app}/modules/angular-slickgrid/components/angular-slickgrid.component.d.ts +2 -2
- package/{dist/app → app}/modules/angular-slickgrid/constants.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/extensions/index.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/extensions/slickRowDetailView.d.ts +0 -2
- package/{dist/app → app}/modules/angular-slickgrid/global-grid-options.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/index.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/angularComponentOutput.interface.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/angularGridInstance.interface.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/externalTestingDependencies.interface.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/gridOption.interface.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/index.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/rowDetailView.interface.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/slickGrid.interface.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/modules/angular-slickgrid.module.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/services/angularUtil.service.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/services/bsDropdown.service.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/services/container.service.d.ts +1 -0
- package/{dist/app → app}/modules/angular-slickgrid/services/index.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/services/translater.service.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/services/utilities.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/slickgrid-config.d.ts +0 -0
- package/docs/assets/lib/multiple-select/README.md +17 -0
- package/{dist/esm2020 → esm2020}/angular-slickgrid.mjs +0 -0
- package/esm2020/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +1170 -0
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/constants.mjs +1 -1
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/extensions/index.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/extensions/slickRowDetailView.mjs +298 -0
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/global-grid-options.mjs +1 -1
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/index.mjs +1 -1
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/models/angularComponentOutput.interface.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/models/angularGridInstance.interface.mjs +2 -0
- package/esm2020/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.mjs +2 -0
- package/esm2020/app/modules/angular-slickgrid/models/gridOption.interface.mjs +2 -0
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/models/index.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/models/rowDetailView.interface.mjs +2 -0
- package/esm2020/app/modules/angular-slickgrid/models/slickGrid.interface.mjs +2 -0
- package/esm2020/app/modules/angular-slickgrid/modules/angular-slickgrid.module.mjs +43 -0
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/angularUtil.service.mjs +4 -4
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/bsDropdown.service.mjs +4 -4
- package/esm2020/app/modules/angular-slickgrid/services/container.service.mjs +29 -0
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/index.mjs +1 -1
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/translater.service.mjs +4 -4
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/utilities.mjs +1 -1
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/slickgrid-config.mjs +1 -1
- package/{dist/esm2020 → esm2020}/public_api.mjs +1 -1
- package/{dist/fesm2015 → fesm2015}/angular-slickgrid.mjs +48 -51
- package/fesm2015/angular-slickgrid.mjs.map +1 -0
- package/{dist/fesm2020 → fesm2020}/angular-slickgrid.mjs +48 -51
- package/fesm2020/angular-slickgrid.mjs.map +1 -0
- package/{dist/i18n → i18n}/en.json +89 -89
- package/{dist/i18n → i18n}/fr.json +90 -90
- package/{dist/angular-slickgrid.d.ts → index.d.ts} +0 -0
- package/package.json +33 -118
- package/{dist/public_api.d.ts → public_api.d.ts} +0 -0
- 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
- package/.browserslistrc +0 -12
- package/.codecov.yml +0 -17
- package/.editorconfig +0 -18
- package/.eslintrc.json +0 -50
- package/.github/CODE_OF_CONDUCT.md +0 -76
- package/.github/FUNDING.yml +0 -8
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -54
- package/.github/ISSUE_TEMPLATE/config.yml +0 -5
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -44
- package/.github/renovate.json5 +0 -26
- package/.github/stale.yml +0 -7
- package/.github/workflows/main.yml +0 -83
- package/.vscode/extensions.json +0 -9
- package/.vscode/launch.json +0 -72
- package/.vscode/settings.json +0 -7
- package/.vscode/tasks.json +0 -77
- package/CHANGELOG.md +0 -1172
- package/angular.json +0 -148
- package/dist/LICENSE +0 -20
- package/dist/README.md +0 -182
- package/dist/esm2020/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +0 -1171
- package/dist/esm2020/app/modules/angular-slickgrid/extensions/slickRowDetailView.mjs +0 -300
- package/dist/esm2020/app/modules/angular-slickgrid/models/angularGridInstance.interface.mjs +0 -2
- package/dist/esm2020/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.mjs +0 -2
- package/dist/esm2020/app/modules/angular-slickgrid/models/gridOption.interface.mjs +0 -2
- package/dist/esm2020/app/modules/angular-slickgrid/models/rowDetailView.interface.mjs +0 -2
- package/dist/esm2020/app/modules/angular-slickgrid/models/slickGrid.interface.mjs +0 -2
- package/dist/esm2020/app/modules/angular-slickgrid/modules/angular-slickgrid.module.mjs +0 -46
- package/dist/esm2020/app/modules/angular-slickgrid/services/container.service.mjs +0 -26
- package/dist/fesm2015/angular-slickgrid.mjs.map +0 -1
- package/dist/fesm2020/angular-slickgrid.mjs.map +0 -1
- package/dist/package.json +0 -79
- package/global.d.ts +0 -1
- package/ngcc.config.js +0 -13
- package/screenshots/column-picker.png +0 -0
- package/screenshots/composite-editor.png +0 -0
- package/screenshots/draggable-grouping.png +0 -0
- package/screenshots/editors.png +0 -0
- package/screenshots/export-to-file.png +0 -0
- package/screenshots/filter_and_sort.png +0 -0
- package/screenshots/formatters.png +0 -0
- package/screenshots/frozen.png +0 -0
- package/screenshots/multipleSelectFilter.png +0 -0
- package/screenshots/pagination.png +0 -0
- package/screenshots/selectFilter.png +0 -0
- package/screenshots/singleFilter.png +0 -0
- package/src/app/app-routing.module.ts +0 -83
- package/src/app/app.component.html +0 -160
- package/src/app/app.component.scss +0 -65
- package/src/app/app.component.ts +0 -10
- package/src/app/app.module.ts +0 -175
- package/src/app/examples/custom-angularComponentEditor.ts +0 -184
- package/src/app/examples/custom-angularComponentFilter.ts +0 -126
- package/src/app/examples/custom-inputEditor.ts +0 -124
- package/src/app/examples/custom-inputFilter.ts +0 -142
- package/src/app/examples/custom-titleFormatter.component.ts +0 -8
- package/src/app/examples/editor-ng-select.component.ts +0 -37
- package/src/app/examples/filter-ng-select.component.ts +0 -32
- package/src/app/examples/grid-additem.component.html +0 -48
- package/src/app/examples/grid-additem.component.ts +0 -272
- package/src/app/examples/grid-angular.component.html +0 -79
- package/src/app/examples/grid-angular.component.scss +0 -28
- package/src/app/examples/grid-angular.component.ts +0 -370
- package/src/app/examples/grid-autoheight.component.html +0 -52
- package/src/app/examples/grid-autoheight.component.ts +0 -147
- package/src/app/examples/grid-basic.component.html +0 -29
- package/src/app/examples/grid-basic.component.ts +0 -82
- package/src/app/examples/grid-clientside.component.html +0 -51
- package/src/app/examples/grid-clientside.component.ts +0 -293
- package/src/app/examples/grid-colspan.component.html +0 -39
- package/src/app/examples/grid-colspan.component.scss +0 -11
- package/src/app/examples/grid-colspan.component.ts +0 -155
- package/src/app/examples/grid-composite-editor.component.html +0 -79
- package/src/app/examples/grid-composite-editor.component.scss +0 -19
- package/src/app/examples/grid-composite-editor.component.ts +0 -948
- package/src/app/examples/grid-contextmenu.component.html +0 -62
- package/src/app/examples/grid-contextmenu.component.scss +0 -44
- package/src/app/examples/grid-contextmenu.component.ts +0 -473
- package/src/app/examples/grid-custom-tooltip.component.html +0 -25
- package/src/app/examples/grid-custom-tooltip.component.scss +0 -77
- package/src/app/examples/grid-custom-tooltip.component.ts +0 -483
- package/src/app/examples/grid-draggrouping.component.html +0 -93
- package/src/app/examples/grid-draggrouping.component.ts +0 -397
- package/src/app/examples/grid-editor.component.html +0 -88
- package/src/app/examples/grid-editor.component.ts +0 -699
- package/src/app/examples/grid-formatter.component.html +0 -26
- package/src/app/examples/grid-formatter.component.ts +0 -162
- package/src/app/examples/grid-frozen.component.html +0 -65
- package/src/app/examples/grid-frozen.component.scss +0 -11
- package/src/app/examples/grid-frozen.component.ts +0 -303
- package/src/app/examples/grid-graphql-nopage.component.html +0 -33
- package/src/app/examples/grid-graphql-nopage.component.scss +0 -9
- package/src/app/examples/grid-graphql-nopage.component.ts +0 -242
- package/src/app/examples/grid-graphql.component.html +0 -87
- package/src/app/examples/grid-graphql.component.ts +0 -304
- package/src/app/examples/grid-grouping.component.html +0 -80
- package/src/app/examples/grid-grouping.component.ts +0 -313
- package/src/app/examples/grid-headerbutton.component.html +0 -31
- package/src/app/examples/grid-headerbutton.component.scss +0 -10
- package/src/app/examples/grid-headerbutton.component.ts +0 -233
- package/src/app/examples/grid-headermenu.component.html +0 -31
- package/src/app/examples/grid-headermenu.component.scss +0 -25
- package/src/app/examples/grid-headermenu.component.ts +0 -159
- package/src/app/examples/grid-localization.component.html +0 -54
- package/src/app/examples/grid-localization.component.ts +0 -293
- package/src/app/examples/grid-menu.component.html +0 -37
- package/src/app/examples/grid-menu.component.scss +0 -28
- package/src/app/examples/grid-menu.component.ts +0 -229
- package/src/app/examples/grid-odata.component.html +0 -116
- package/src/app/examples/grid-odata.component.ts +0 -441
- package/src/app/examples/grid-range.component.html +0 -74
- package/src/app/examples/grid-range.component.ts +0 -291
- package/src/app/examples/grid-remote.component.html +0 -37
- package/src/app/examples/grid-remote.component.ts +0 -153
- package/src/app/examples/grid-resize-by-content.component.html +0 -62
- package/src/app/examples/grid-resize-by-content.component.scss +0 -19
- package/src/app/examples/grid-resize-by-content.component.ts +0 -780
- package/src/app/examples/grid-rowdetail.component.html +0 -35
- package/src/app/examples/grid-rowdetail.component.ts +0 -205
- package/src/app/examples/grid-rowmove.component.html +0 -49
- package/src/app/examples/grid-rowmove.component.ts +0 -234
- package/src/app/examples/grid-rowselection.component.html +0 -76
- package/src/app/examples/grid-rowselection.component.ts +0 -267
- package/src/app/examples/grid-state.component.html +0 -36
- package/src/app/examples/grid-state.component.ts +0 -259
- package/src/app/examples/grid-tabs.component.html +0 -35
- package/src/app/examples/grid-tabs.component.ts +0 -115
- package/src/app/examples/grid-trading.component.html +0 -58
- package/src/app/examples/grid-trading.component.scss +0 -49
- package/src/app/examples/grid-trading.component.ts +0 -319
- package/src/app/examples/grid-tree-data-hierarchical.component.html +0 -79
- package/src/app/examples/grid-tree-data-hierarchical.component.scss +0 -47
- package/src/app/examples/grid-tree-data-hierarchical.component.ts +0 -311
- package/src/app/examples/grid-tree-data-parent-child.component.html +0 -108
- package/src/app/examples/grid-tree-data-parent-child.component.scss +0 -10
- package/src/app/examples/grid-tree-data-parent-child.component.ts +0 -351
- package/src/app/examples/home.component.html +0 -41
- package/src/app/examples/home.component.ts +0 -9
- package/src/app/examples/rowdetail-preload.component.ts +0 -10
- package/src/app/examples/rowdetail-view.component.html +0 -36
- package/src/app/examples/rowdetail-view.component.ts +0 -54
- package/src/app/examples/swt-common-grid-pagination.component.ts +0 -156
- package/src/app/examples/swt-common-grid-test.component.html +0 -30
- package/src/app/examples/swt-common-grid-test.component.ts +0 -219
- package/src/app/examples/swt-common-grid.component.ts +0 -436
- package/src/app/examples/swt-logger.service.ts +0 -165
- package/src/app/modules/angular-slickgrid/components/angular-slickgrid.component.html +0 -4
- package/src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts +0 -1395
- package/src/app/modules/angular-slickgrid/constants.ts +0 -97
- package/src/app/modules/angular-slickgrid/extensions/index.ts +0 -1
- package/src/app/modules/angular-slickgrid/extensions/slickRowDetailView.ts +0 -375
- package/src/app/modules/angular-slickgrid/global-grid-options.ts +0 -245
- package/src/app/modules/angular-slickgrid/index.ts +0 -11
- package/src/app/modules/angular-slickgrid/models/angularComponentOutput.interface.ts +0 -6
- package/src/app/modules/angular-slickgrid/models/angularGridInstance.interface.ts +0 -68
- package/src/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.ts +0 -37
- package/src/app/modules/angular-slickgrid/models/gridOption.interface.ts +0 -12
- package/src/app/modules/angular-slickgrid/models/index.ts +0 -6
- package/src/app/modules/angular-slickgrid/models/rowDetailView.interface.ts +0 -33
- package/src/app/modules/angular-slickgrid/models/slickGrid.interface.ts +0 -7
- package/src/app/modules/angular-slickgrid/modules/angular-slickgrid.module.ts +0 -37
- package/src/app/modules/angular-slickgrid/services/angularUtil.service.ts +0 -48
- package/src/app/modules/angular-slickgrid/services/bsDropdown.service.ts +0 -142
- package/src/app/modules/angular-slickgrid/services/container.service.ts +0 -24
- package/src/app/modules/angular-slickgrid/services/index.ts +0 -5
- package/src/app/modules/angular-slickgrid/services/translater.service.ts +0 -38
- package/src/app/modules/angular-slickgrid/services/utilities.ts +0 -19
- package/src/app/modules/angular-slickgrid/slickgrid-config.ts +0 -10
- package/src/app/slickgrid-custom-variables.scss +0 -10
- package/src/assets/.gitkeep +0 -0
- package/src/assets/data/collection_100_numbers.json +0 -12
- package/src/assets/data/collection_500_numbers.json +0 -52
- package/src/assets/data/countries.json +0 -245
- package/src/assets/data/country_names.json +0 -245
- package/src/assets/data/customers_100.json +0 -102
- package/src/assets/i18n/en.json +0 -90
- package/src/assets/i18n/fr.json +0 -91
- package/src/environments/environment.prod.ts +0 -3
- package/src/environments/environment.ts +0 -8
- package/src/favicon.ico +0 -0
- package/src/index.html +0 -18
- package/src/main.ts +0 -13
- package/src/polyfills.ts +0 -52
- package/src/public_api.ts +0 -1
- package/src/styles.scss +0 -66
- package/src/typings.d.ts +0 -10
- package/tsconfig.app.json +0 -25
- package/tsconfig.json +0 -40
- package/tsconfig.spec.json +0 -23
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# is-path-inside
|
|
2
|
+
|
|
3
|
+
> Check if a path is inside another path
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
$ npm install is-path-inside
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
const isPathInside = require('is-path-inside');
|
|
17
|
+
|
|
18
|
+
isPathInside('a/b/c', 'a/b');
|
|
19
|
+
//=> true
|
|
20
|
+
|
|
21
|
+
isPathInside('a/b/c', 'x/y');
|
|
22
|
+
//=> false
|
|
23
|
+
|
|
24
|
+
isPathInside('a/b/c', 'a/b/c');
|
|
25
|
+
//=> false
|
|
26
|
+
|
|
27
|
+
isPathInside('/Users/sindresorhus/dev/unicorn', '/Users/sindresorhus');
|
|
28
|
+
//=> true
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## API
|
|
33
|
+
|
|
34
|
+
### isPathInside(childPath, parentPath)
|
|
35
|
+
|
|
36
|
+
Note that relative paths are resolved against `process.cwd()` to make them absolute.
|
|
37
|
+
|
|
38
|
+
**Important:** This package is meant for use with path manipulation. It does not check if the paths exist nor does it resolve symlinks. You should not use this as a security mechanism to guard against access to certain places on the file system.
|
|
39
|
+
|
|
40
|
+
#### childPath
|
|
41
|
+
|
|
42
|
+
Type: `string`
|
|
43
|
+
|
|
44
|
+
The path that should be inside `parentPath`.
|
|
45
|
+
|
|
46
|
+
#### parentPath
|
|
47
|
+
|
|
48
|
+
Type: `string`
|
|
49
|
+
|
|
50
|
+
The path that should contain `childPath`.
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
<div align="center">
|
|
56
|
+
<b>
|
|
57
|
+
<a href="https://tidelift.com/subscription/pkg/npm-is-path-inside?utm_source=npm-is-path-inside&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
|
58
|
+
</b>
|
|
59
|
+
<br>
|
|
60
|
+
<sub>
|
|
61
|
+
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
|
62
|
+
</sub>
|
|
63
|
+
</div>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# is-stream [](https://travis-ci.org/sindresorhus/is-stream)
|
|
2
|
+
|
|
3
|
+
> Check if something is a [Node.js stream](https://nodejs.org/api/stream.html)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
$ npm install is-stream
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
const fs = require('fs');
|
|
17
|
+
const isStream = require('is-stream');
|
|
18
|
+
|
|
19
|
+
isStream(fs.createReadStream('unicorn.png'));
|
|
20
|
+
//=> true
|
|
21
|
+
|
|
22
|
+
isStream({});
|
|
23
|
+
//=> false
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## API
|
|
28
|
+
|
|
29
|
+
### isStream(stream)
|
|
30
|
+
|
|
31
|
+
Returns a `boolean` for whether it's a [`Stream`](https://nodejs.org/api/stream.html#stream_stream).
|
|
32
|
+
|
|
33
|
+
#### isStream.writable(stream)
|
|
34
|
+
|
|
35
|
+
Returns a `boolean` for whether it's a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable).
|
|
36
|
+
|
|
37
|
+
#### isStream.readable(stream)
|
|
38
|
+
|
|
39
|
+
Returns a `boolean` for whether it's a [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable).
|
|
40
|
+
|
|
41
|
+
#### isStream.duplex(stream)
|
|
42
|
+
|
|
43
|
+
Returns a `boolean` for whether it's a [`stream.Duplex`](https://nodejs.org/api/stream.html#stream_class_stream_duplex).
|
|
44
|
+
|
|
45
|
+
#### isStream.transform(stream)
|
|
46
|
+
|
|
47
|
+
Returns a `boolean` for whether it's a [`stream.Transform`](https://nodejs.org/api/stream.html#stream_class_stream_transform).
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## Related
|
|
51
|
+
|
|
52
|
+
- [is-file-stream](https://github.com/jamestalmage/is-file-stream) - Detect if a stream is a file stream
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## License
|
|
56
|
+
|
|
57
|
+
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# is-typedarray [](http://github.com/badges/stability-badges)
|
|
2
|
+
|
|
3
|
+
Detect whether or not an object is a
|
|
4
|
+
[Typed Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays).
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
|
|
8
|
+
[](https://nodei.co/npm/is-typedarray/)
|
|
9
|
+
|
|
10
|
+
### isTypedArray(array)
|
|
11
|
+
|
|
12
|
+
Returns `true` when array is a Typed Array, and `false` when it is not.
|
|
13
|
+
|
|
14
|
+
## License
|
|
15
|
+
|
|
16
|
+
MIT. See [LICENSE.md](http://github.com/hughsk/is-typedarray/blob/master/LICENSE.md) for details.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# isexe
|
|
2
|
+
|
|
3
|
+
Minimal module to check if a file is executable, and a normal file.
|
|
4
|
+
|
|
5
|
+
Uses `fs.stat` and tests against the `PATHEXT` environment variable on
|
|
6
|
+
Windows.
|
|
7
|
+
|
|
8
|
+
## USAGE
|
|
9
|
+
|
|
10
|
+
```javascript
|
|
11
|
+
var isexe = require('isexe')
|
|
12
|
+
isexe('some-file-name', function (err, isExe) {
|
|
13
|
+
if (err) {
|
|
14
|
+
console.error('probably file does not exist or something', err)
|
|
15
|
+
} else if (isExe) {
|
|
16
|
+
console.error('this thing can be run')
|
|
17
|
+
} else {
|
|
18
|
+
console.error('cannot be run')
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
// same thing but synchronous, throws errors
|
|
23
|
+
var isExe = isexe.sync('some-file-name')
|
|
24
|
+
|
|
25
|
+
// treat errors as just "not executable"
|
|
26
|
+
isexe('maybe-missing-file', { ignoreErrors: true }, callback)
|
|
27
|
+
var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true })
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## API
|
|
31
|
+
|
|
32
|
+
### `isexe(path, [options], [callback])`
|
|
33
|
+
|
|
34
|
+
Check if the path is executable. If no callback provided, and a
|
|
35
|
+
global `Promise` object is available, then a Promise will be returned.
|
|
36
|
+
|
|
37
|
+
Will raise whatever errors may be raised by `fs.stat`, unless
|
|
38
|
+
`options.ignoreErrors` is set to true.
|
|
39
|
+
|
|
40
|
+
### `isexe.sync(path, [options])`
|
|
41
|
+
|
|
42
|
+
Same as `isexe` but returns the value and throws any errors raised.
|
|
43
|
+
|
|
44
|
+
### Options
|
|
45
|
+
|
|
46
|
+
* `ignoreErrors` Treat all errors as "no, this is not executable", but
|
|
47
|
+
don't raise them.
|
|
48
|
+
* `uid` Number to use as the user id
|
|
49
|
+
* `gid` Number to use as the group id
|
|
50
|
+
* `pathExt` List of path extensions to use instead of `PATHEXT`
|
|
51
|
+
environment variable on Windows.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# isStream
|
|
2
|
+
|
|
3
|
+
[](http://travis-ci.org/rvagg/isstream)
|
|
4
|
+
|
|
5
|
+
**Test if an object is a `Stream`**
|
|
6
|
+
|
|
7
|
+
[](https://nodei.co/npm/isstream/)
|
|
8
|
+
|
|
9
|
+
The missing `Stream.isStream(obj)`: determine if an object is standard Node.js `Stream`. Works for Node-core `Stream` objects (for 0.8, 0.10, 0.11, and in theory, older and newer versions) and all versions of **[readable-stream](https://github.com/isaacs/readable-stream)**.
|
|
10
|
+
|
|
11
|
+
## Usage:
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
var isStream = require('isstream')
|
|
15
|
+
var Stream = require('stream')
|
|
16
|
+
|
|
17
|
+
isStream(new Stream()) // true
|
|
18
|
+
|
|
19
|
+
isStream({}) // false
|
|
20
|
+
|
|
21
|
+
isStream(new Stream.Readable()) // true
|
|
22
|
+
isStream(new Stream.Writable()) // true
|
|
23
|
+
isStream(new Stream.Duplex()) // true
|
|
24
|
+
isStream(new Stream.Transform()) // true
|
|
25
|
+
isStream(new Stream.PassThrough()) // true
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## But wait! There's more!
|
|
29
|
+
|
|
30
|
+
You can also test for `isReadable(obj)`, `isWritable(obj)` and `isDuplex(obj)` to test for implementations of Streams2 (and Streams3) base classes.
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
var isReadable = require('isstream').isReadable
|
|
34
|
+
var isWritable = require('isstream').isWritable
|
|
35
|
+
var isDuplex = require('isstream').isDuplex
|
|
36
|
+
var Stream = require('stream')
|
|
37
|
+
|
|
38
|
+
isReadable(new Stream()) // false
|
|
39
|
+
isWritable(new Stream()) // false
|
|
40
|
+
isDuplex(new Stream()) // false
|
|
41
|
+
|
|
42
|
+
isReadable(new Stream.Readable()) // true
|
|
43
|
+
isReadable(new Stream.Writable()) // false
|
|
44
|
+
isReadable(new Stream.Duplex()) // true
|
|
45
|
+
isReadable(new Stream.Transform()) // true
|
|
46
|
+
isReadable(new Stream.PassThrough()) // true
|
|
47
|
+
|
|
48
|
+
isWritable(new Stream.Readable()) // false
|
|
49
|
+
isWritable(new Stream.Writable()) // true
|
|
50
|
+
isWritable(new Stream.Duplex()) // true
|
|
51
|
+
isWritable(new Stream.Transform()) // true
|
|
52
|
+
isWritable(new Stream.PassThrough()) // true
|
|
53
|
+
|
|
54
|
+
isDuplex(new Stream.Readable()) // false
|
|
55
|
+
isDuplex(new Stream.Writable()) // false
|
|
56
|
+
isDuplex(new Stream.Duplex()) // true
|
|
57
|
+
isDuplex(new Stream.Transform()) // true
|
|
58
|
+
isDuplex(new Stream.PassThrough()) // true
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
*Reminder: when implementing your own streams, please [use **readable-stream** rather than core streams](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).*
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## License
|
|
65
|
+
|
|
66
|
+
**isStream** is Copyright (c) 2015 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# jsbn: javascript big number
|
|
2
|
+
|
|
3
|
+
[Tom Wu's Original Website](http://www-cs-students.stanford.edu/~tjw/jsbn/)
|
|
4
|
+
|
|
5
|
+
I felt compelled to put this on github and publish to npm. I haven't tested every other big integer library out there, but the few that I have tested in comparison to this one have not even come close in performance. I am aware of the `bi` module on npm, however it has been modified and I wanted to publish the original without modifications. This is jsbn and jsbn2 from Tom Wu's original website above, with the modular pattern applied to prevent global leaks and to allow for use with node.js on the server side.
|
|
6
|
+
|
|
7
|
+
## usage
|
|
8
|
+
|
|
9
|
+
var BigInteger = require('jsbn');
|
|
10
|
+
|
|
11
|
+
var a = new BigInteger('91823918239182398123');
|
|
12
|
+
alert(a.bitLength()); // 67
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## API
|
|
16
|
+
|
|
17
|
+
### bi.toString()
|
|
18
|
+
|
|
19
|
+
returns the base-10 number as a string
|
|
20
|
+
|
|
21
|
+
### bi.negate()
|
|
22
|
+
|
|
23
|
+
returns a new BigInteger equal to the negation of `bi`
|
|
24
|
+
|
|
25
|
+
### bi.abs
|
|
26
|
+
|
|
27
|
+
returns new BI of absolute value
|
|
28
|
+
|
|
29
|
+
### bi.compareTo
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### bi.bitLength
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### bi.mod
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### bi.modPowInt
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### bi.clone
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### bi.intValue
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### bi.byteValue
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### bi.shortValue
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### bi.signum
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### bi.toByteArray
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### bi.equals
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
### bi.min
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### bi.max
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
### bi.and
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### bi.or
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
### bi.xor
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
### bi.andNot
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
### bi.not
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### bi.shiftLeft
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
### bi.shiftRight
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
### bi.getLowestSetBit
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
### bi.bitCount
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
### bi.testBit
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
### bi.setBit
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
### bi.clearBit
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
### bi.flipBit
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
### bi.add
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
### bi.subtract
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
### bi.multiply
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
### bi.divide
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
### bi.remainder
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
### bi.divideAndRemainder
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
### bi.modPow
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
### bi.modInverse
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
### bi.pow
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
### bi.gcd
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
### bi.isProbablePrime
|
|
174
|
+
|
|
175
|
+
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
This is a historical repository for the early development of the JSON Schema specification and implementation. This package is considered "finished": it holds the earlier draft specification and a simple, efficient, lightweight implementation of the original core elements of JSON Schema. This repository does not house the latest specifications nor does it implement the latest versions of JSON Schema. This package seeks to maintain the stability (in behavior and size) of this original implementation for the sake of the numerous packages that rely on it. For the latest JSON Schema specifications and implementations, please visit the [JSON Schema site](https://json-schema.org/) (or the [respository](https://github.com/json-schema-org/json-schema-spec)).
|
|
2
|
+
|
|
3
|
+
Code is licensed under the AFL or BSD 3-Clause license.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# json-stringify-safe
|
|
2
|
+
|
|
3
|
+
Like JSON.stringify, but doesn't throw on circular references.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
Takes the same arguments as `JSON.stringify`.
|
|
8
|
+
|
|
9
|
+
```javascript
|
|
10
|
+
var stringify = require('json-stringify-safe');
|
|
11
|
+
var circularObj = {};
|
|
12
|
+
circularObj.circularRef = circularObj;
|
|
13
|
+
circularObj.list = [ circularObj, circularObj ];
|
|
14
|
+
console.log(stringify(circularObj, null, 2));
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Output:
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"circularRef": "[Circular]",
|
|
22
|
+
"list": [
|
|
23
|
+
"[Circular]",
|
|
24
|
+
"[Circular]"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Details
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
stringify(obj, serializer, indent, decycler)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The first three arguments are the same as to JSON.stringify. The last
|
|
36
|
+
is an argument that's only used when the object has been seen already.
|
|
37
|
+
|
|
38
|
+
The default `decycler` function returns the string `'[Circular]'`.
|
|
39
|
+
If, for example, you pass in `function(k,v){}` (return nothing) then it
|
|
40
|
+
will prune cycles. If you pass in `function(k,v){ return {foo: 'bar'}}`,
|
|
41
|
+
then cyclical objects will always be represented as `{"foo":"bar"}` in
|
|
42
|
+
the result.
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
stringify.getSerialize(serializer, decycler)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Returns a serializer that can be used elsewhere. This is the actual
|
|
49
|
+
function that's passed to JSON.stringify.
|
|
50
|
+
|
|
51
|
+
**Note** that the function returned from `getSerialize` is stateful for now, so
|
|
52
|
+
do **not** use it more than once.
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
Node.js - jsonfile
|
|
2
|
+
================
|
|
3
|
+
|
|
4
|
+
Easily read/write JSON files in Node.js. _Note: this module cannot be used in the browser._
|
|
5
|
+
|
|
6
|
+
[](https://www.npmjs.org/package/jsonfile)
|
|
7
|
+
[](http://travis-ci.org/jprichardson/node-jsonfile)
|
|
8
|
+
[](https://ci.appveyor.com/project/jprichardson/node-jsonfile/branch/master)
|
|
9
|
+
|
|
10
|
+
<a href="https://github.com/feross/standard"><img src="https://cdn.rawgit.com/feross/standard/master/sticker.svg" alt="Standard JavaScript" width="100"></a>
|
|
11
|
+
|
|
12
|
+
Why?
|
|
13
|
+
----
|
|
14
|
+
|
|
15
|
+
Writing `JSON.stringify()` and then `fs.writeFile()` and `JSON.parse()` with `fs.readFile()` enclosed in `try/catch` blocks became annoying.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
Installation
|
|
20
|
+
------------
|
|
21
|
+
|
|
22
|
+
npm install --save jsonfile
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
API
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
* [`readFile(filename, [options], callback)`](#readfilefilename-options-callback)
|
|
30
|
+
* [`readFileSync(filename, [options])`](#readfilesyncfilename-options)
|
|
31
|
+
* [`writeFile(filename, obj, [options], callback)`](#writefilefilename-obj-options-callback)
|
|
32
|
+
* [`writeFileSync(filename, obj, [options])`](#writefilesyncfilename-obj-options)
|
|
33
|
+
|
|
34
|
+
----
|
|
35
|
+
|
|
36
|
+
### readFile(filename, [options], callback)
|
|
37
|
+
|
|
38
|
+
`options` (`object`, default `undefined`): Pass in any [`fs.readFile`](https://nodejs.org/api/fs.html#fs_fs_readfile_path_options_callback) options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).
|
|
39
|
+
- `throws` (`boolean`, default: `true`). If `JSON.parse` throws an error, pass this error to the callback.
|
|
40
|
+
If `false`, returns `null` for the object.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
```js
|
|
44
|
+
const jsonfile = require('jsonfile')
|
|
45
|
+
const file = '/tmp/data.json'
|
|
46
|
+
jsonfile.readFile(file, function (err, obj) {
|
|
47
|
+
if (err) console.error(err)
|
|
48
|
+
console.dir(obj)
|
|
49
|
+
})
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
You can also use this method with promises. The `readFile` method will return a promise if you do not pass a callback function.
|
|
53
|
+
|
|
54
|
+
```js
|
|
55
|
+
const jsonfile = require('jsonfile')
|
|
56
|
+
const file = '/tmp/data.json'
|
|
57
|
+
jsonfile.readFile(file)
|
|
58
|
+
.then(obj => console.dir(obj))
|
|
59
|
+
.catch(error => console.error(error))
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
----
|
|
63
|
+
|
|
64
|
+
### readFileSync(filename, [options])
|
|
65
|
+
|
|
66
|
+
`options` (`object`, default `undefined`): Pass in any [`fs.readFileSync`](https://nodejs.org/api/fs.html#fs_fs_readfilesync_path_options) options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).
|
|
67
|
+
- `throws` (`boolean`, default: `true`). If an error is encountered reading or parsing the file, throw the error. If `false`, returns `null` for the object.
|
|
68
|
+
|
|
69
|
+
```js
|
|
70
|
+
const jsonfile = require('jsonfile')
|
|
71
|
+
const file = '/tmp/data.json'
|
|
72
|
+
|
|
73
|
+
console.dir(jsonfile.readFileSync(file))
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
----
|
|
77
|
+
|
|
78
|
+
### writeFile(filename, obj, [options], callback)
|
|
79
|
+
|
|
80
|
+
`options`: Pass in any [`fs.writeFile`](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces` and override `EOL` string.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
```js
|
|
84
|
+
const jsonfile = require('jsonfile')
|
|
85
|
+
|
|
86
|
+
const file = '/tmp/data.json'
|
|
87
|
+
const obj = { name: 'JP' }
|
|
88
|
+
|
|
89
|
+
jsonfile.writeFile(file, obj, function (err) {
|
|
90
|
+
if (err) console.error(err)
|
|
91
|
+
})
|
|
92
|
+
```
|
|
93
|
+
Or use with promises as follows:
|
|
94
|
+
|
|
95
|
+
```js
|
|
96
|
+
const jsonfile = require('jsonfile')
|
|
97
|
+
|
|
98
|
+
const file = '/tmp/data.json'
|
|
99
|
+
const obj = { name: 'JP' }
|
|
100
|
+
|
|
101
|
+
jsonfile.writeFile(file, obj)
|
|
102
|
+
.then(res => {
|
|
103
|
+
console.log('Write complete')
|
|
104
|
+
})
|
|
105
|
+
.catch(error => console.error(error))
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
**formatting with spaces:**
|
|
110
|
+
|
|
111
|
+
```js
|
|
112
|
+
const jsonfile = require('jsonfile')
|
|
113
|
+
|
|
114
|
+
const file = '/tmp/data.json'
|
|
115
|
+
const obj = { name: 'JP' }
|
|
116
|
+
|
|
117
|
+
jsonfile.writeFile(file, obj, { spaces: 2 }, function (err) {
|
|
118
|
+
if (err) console.error(err)
|
|
119
|
+
})
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**overriding EOL:**
|
|
123
|
+
|
|
124
|
+
```js
|
|
125
|
+
const jsonfile = require('jsonfile')
|
|
126
|
+
|
|
127
|
+
const file = '/tmp/data.json'
|
|
128
|
+
const obj = { name: 'JP' }
|
|
129
|
+
|
|
130
|
+
jsonfile.writeFile(file, obj, { spaces: 2, EOL: '\r\n' }, function (err) {
|
|
131
|
+
if (err) console.error(err)
|
|
132
|
+
})
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**appending to an existing JSON file:**
|
|
136
|
+
|
|
137
|
+
You can use `fs.writeFile` option `{ flag: 'a' }` to achieve this.
|
|
138
|
+
|
|
139
|
+
```js
|
|
140
|
+
const jsonfile = require('jsonfile')
|
|
141
|
+
|
|
142
|
+
const file = '/tmp/mayAlreadyExistedData.json'
|
|
143
|
+
const obj = { name: 'JP' }
|
|
144
|
+
|
|
145
|
+
jsonfile.writeFile(file, obj, { flag: 'a' }, function (err) {
|
|
146
|
+
if (err) console.error(err)
|
|
147
|
+
})
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
----
|
|
151
|
+
|
|
152
|
+
### writeFileSync(filename, obj, [options])
|
|
153
|
+
|
|
154
|
+
`options`: Pass in any [`fs.writeFileSync`](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options) options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces` and override `EOL` string.
|
|
155
|
+
|
|
156
|
+
```js
|
|
157
|
+
const jsonfile = require('jsonfile')
|
|
158
|
+
|
|
159
|
+
const file = '/tmp/data.json'
|
|
160
|
+
const obj = { name: 'JP' }
|
|
161
|
+
|
|
162
|
+
jsonfile.writeFileSync(file, obj)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**formatting with spaces:**
|
|
166
|
+
|
|
167
|
+
```js
|
|
168
|
+
const jsonfile = require('jsonfile')
|
|
169
|
+
|
|
170
|
+
const file = '/tmp/data.json'
|
|
171
|
+
const obj = { name: 'JP' }
|
|
172
|
+
|
|
173
|
+
jsonfile.writeFileSync(file, obj, { spaces: 2 })
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**overriding EOL:**
|
|
177
|
+
|
|
178
|
+
```js
|
|
179
|
+
const jsonfile = require('jsonfile')
|
|
180
|
+
|
|
181
|
+
const file = '/tmp/data.json'
|
|
182
|
+
const obj = { name: 'JP' }
|
|
183
|
+
|
|
184
|
+
jsonfile.writeFileSync(file, obj, { spaces: 2, EOL: '\r\n' })
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**appending to an existing JSON file:**
|
|
188
|
+
|
|
189
|
+
You can use `fs.writeFileSync` option `{ flag: 'a' }` to achieve this.
|
|
190
|
+
|
|
191
|
+
```js
|
|
192
|
+
const jsonfile = require('jsonfile')
|
|
193
|
+
|
|
194
|
+
const file = '/tmp/mayAlreadyExistedData.json'
|
|
195
|
+
const obj = { name: 'JP' }
|
|
196
|
+
|
|
197
|
+
jsonfile.writeFileSync(file, obj, { flag: 'a' })
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
License
|
|
201
|
+
-------
|
|
202
|
+
|
|
203
|
+
(MIT License)
|
|
204
|
+
|
|
205
|
+
Copyright 2012-2016, JP Richardson <jprichardson@gmail.com>
|