diff --git a/src/versions.json b/src/versions.json deleted file mode 100644 index 81e526430..000000000 --- a/src/versions.json +++ /dev/null @@ -1,5783 +0,0 @@ -{ - "name": "alfresco-content-app", - "version": "1.5.0", - "problems": [ - "peer dep missing: @angular/cdk@^6.3.3, required by @mat-datetimepicker/core@2.0.1", - "peer dep missing: @angular/common@^6.0.0, required by @alfresco/adf-extensions@3.0.0-383b74151a47e188020249aea7ec0dfb586bd0b6", - "peer dep missing: @angular/common@^6.0.0, required by @ngrx/router-store@6.1.2", - "peer dep missing: @angular/core@^6.0.0, required by @alfresco/adf-extensions@3.0.0-383b74151a47e188020249aea7ec0dfb586bd0b6", - "peer dep missing: @angular/core@^6.0.7, required by @mat-datetimepicker/core@2.0.1", - "peer dep missing: @angular/core@^6.0.0, required by @ngrx/effects@6.1.2", - "peer dep missing: @angular/core@^6.0.0, required by @ngrx/router-store@6.1.2", - "peer dep missing: @angular/core@^6.0.0, required by @ngrx/store@6.1.2", - "peer dep missing: @angular/flex-layout@>=6.0.0-beta.18, required by @alfresco/adf-content-services@2.6.1", - "peer dep missing: @angular/flex-layout@>=6.0.0-beta.18, required by @alfresco/adf-core@2.6.1", - "peer dep missing: @angular/http@^6.1.4, required by @alfresco/adf-extensions@3.0.0-383b74151a47e188020249aea7ec0dfb586bd0b6", - "peer dep missing: @angular/material@^6.3.3, required by @mat-datetimepicker/core@2.0.1", - "peer dep missing: @angular/material@^6.3.3, required by @mat-datetimepicker/moment@2.0.1", - "peer dep missing: @angular/material-moment-adapter@^6.3.3, required by @mat-datetimepicker/moment@2.0.1", - "peer dep missing: @angular/router@^6.0.0, required by @ngrx/router-store@6.1.2", - "peer dep missing: @mat-datetimepicker/core@2.0.0, required by @mat-datetimepicker/moment@2.0.1", - "peer dep missing: alfresco-js-api@2.7.0-2a84d662e8134ada8923742adad17351a4a2f777, required by @alfresco/adf-extensions@3.0.0-383b74151a47e188020249aea7ec0dfb586bd0b6", - "peer dep missing: core-js@2.4.1, required by @alfresco/adf-core@2.6.1", - "peer dep missing: pdfjs-dist@2.0.303, required by @alfresco/adf-core@2.6.1" - ], - "dependencies": { - "@alfresco/adf-content-services": { - "version": "2.6.1", - "from": "@alfresco/adf-content-services@2.6.1", - "resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-2.6.1.tgz" - }, - "@alfresco/adf-core": { - "version": "2.6.1", - "from": "@alfresco/adf-core@2.6.1", - "resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-2.6.1.tgz" - }, - "@alfresco/adf-extensions": { - "version": "3.0.0-383b74151a47e188020249aea7ec0dfb586bd0b6", - "from": "@alfresco/adf-extensions@alpha", - "resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-3.0.0-383b74151a47e188020249aea7ec0dfb586bd0b6.tgz" - }, - "@angular/animations": { - "version": "7.0.3", - "from": "@angular/animations@7.0.3", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-7.0.3.tgz" - }, - "@angular/cdk": { - "required": { - "_args": [ - [ - "@angular/cdk@7.0.3", - "/Users/dvuika/github/alfresco-content-app" - ], - [ - "@angular/cdk@7.0.3", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "_from": "@angular/cdk@7.0.3", - "_id": "@angular/cdk@7.0.3", - "_integrity": "sha512-QT7U2tOBVfwn8Q71Nyh0UjlyXfZNKdanq3+b8GJ/+IB/d8mVdMRTXBGQ4PqY7CP+wpkgm+wbbUt3urZF1AqdmQ==", - "_location": "/@angular/cdk", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@angular/cdk@7.0.3", - "name": "@angular/cdk", - "escapedName": "@angular%2fcdk", - "scope": "@angular", - "rawSpec": "7.0.3", - "saveSpec": null, - "fetchSpec": "7.0.3" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-7.0.3.tgz", - "_spec": "7.0.3", - "_where": "/Users/dvuika/github/alfresco-content-app", - "bugs": { - "url": "https://github.com/angular/material2/issues" - }, - "dependencies": { - "parse5": { - "name": "parse5", - "description": "HTML parser and serializer.", - "version": "5.1.0", - "author": { - "name": "Ivan Nikulin", - "email": "ifaaan@gmail.com", - "url": "https://github.com/inikulin" - }, - "contributors": "https://github.com/inikulin/parse5/graphs/contributors", - "homepage": "https://github.com/inikulin/parse5", - "keywords": [ - "html", - "parser", - "html5", - "WHATWG", - "specification", - "fast", - "html parser", - "html5 parser", - "htmlparser", - "parse5", - "serializer", - "html serializer", - "htmlserializer", - "parse", - "serialize" - ], - "license": "MIT", - "main": "./lib/index.js", - "repository": { - "type": "git", - "url": "git://github.com/inikulin/parse5.git" - }, - "files": [ - "lib" - ], - "_resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz", - "_integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==", - "_from": "parse5@5.1.0", - "readme": "

\n \n \"parse5\"\n \n

\n\n
\n

parse5

\nHTML parser and serializer.\n
\n
\n\n
\nnpm install --save parse5\n
\n
\n\n

\n 📖 Documentation 📖\n

\n\n---\n\n

\n List of parse5 toolset packages\n

\n\n

\n GitHub\n

\n\n

\n Online playground\n

\n\n

\n Version history\n

\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/inikulin/parse5/issues" - }, - "_id": "parse5@5.1.0", - "_requested": { - "type": "version", - "registry": true, - "raw": "parse5@5.1.0", - "name": "parse5", - "escapedName": "parse5", - "rawSpec": "5.1.0", - "saveSpec": "[Circular]", - "fetchSpec": "5.1.0" - }, - "_spec": "5.1.0", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_optional": true, - "_args": [ - [ - "parse5@5.1.0", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/@angular/cdk/node_modules/parse5", - "error": "[Circular]", - "extraneous": false - }, - "tslib": { - "name": "tslib", - "author": { - "name": "Microsoft Corp." - }, - "homepage": "http://typescriptlang.org/", - "version": "1.9.3", - "license": "Apache-2.0", - "description": "Runtime library for TypeScript helper functions", - "keywords": [ - "TypeScript", - "Microsoft", - "compiler", - "language", - "javascript", - "tslib", - "runtime" - ], - "bugs": { - "url": "https://github.com/Microsoft/TypeScript/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Microsoft/tslib.git" - }, - "main": "tslib.js", - "module": "tslib.es6.js", - "jsnext:main": "tslib.es6.js", - "typings": "tslib.d.ts", - "_resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "_integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "_from": "tslib@1.9.3", - "readme": "# tslib\r\n\r\nThis is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.\r\n\r\nThis library is primarily used by the `--importHelpers` flag in TypeScript.\r\nWhen using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:\r\n\r\n```ts\r\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n};\r\nexports.x = {};\r\nexports.y = __assign({}, exports.x);\r\n\r\n```\r\n\r\nwill instead be emitted as something like the following:\r\n\r\n```ts\r\nvar tslib_1 = require(\"tslib\");\r\nexports.x = {};\r\nexports.y = tslib_1.__assign({}, exports.x);\r\n```\r\n\r\nBecause this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.\r\nFor optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.\r\n\r\n# Installing\r\n\r\nFor the latest stable version, run:\r\n\r\n## npm\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\nnpm install --save tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\nnpm install --save tslib@1.6.1\r\n```\r\n\r\n## bower\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\nbower install tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\nbower install tslib@1.6.1\r\n```\r\n\r\n## JSPM\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\njspm install tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\njspm install tslib@1.6.1\r\n```\r\n\r\n# Usage\r\n\r\nSet the `importHelpers` compiler option on the command line:\r\n\r\n```\r\ntsc --importHelpers file.ts\r\n```\r\n\r\nor in your tsconfig.json:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"importHelpers\": true\r\n }\r\n}\r\n```\r\n\r\n#### For bower and JSPM users\r\n\r\nYou will need to add a `paths` mapping for `tslib`, e.g. For Bower users:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"module\": \"amd\",\r\n \"importHelpers\": true,\r\n \"baseUrl\": \"./\",\r\n \"paths\": {\r\n \"tslib\" : [\"bower_components/tslib/tslib.d.ts\"]\r\n }\r\n }\r\n}\r\n```\r\n\r\nFor JSPM users:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"module\": \"system\",\r\n \"importHelpers\": true,\r\n \"baseUrl\": \"./\",\r\n \"paths\": {\r\n \"tslib\" : [\"jspm_packages/npm/tslib@1.9.3/tslib.d.ts\"]\r\n }\r\n }\r\n}\r\n```\r\n\r\n\r\n# Contribute\r\n\r\nThere are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.\r\n\r\n* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.\r\n* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).\r\n* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).\r\n* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.\r\n* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).\r\n* Read the language specification ([docx](http://go.microsoft.com/fwlink/?LinkId=267121), [pdf](http://go.microsoft.com/fwlink/?LinkId=267238)).\r\n\r\n# Documentation\r\n\r\n* [Quick tutorial](http://www.typescriptlang.org/Tutorial)\r\n* [Programming handbook](http://www.typescriptlang.org/Handbook)\r\n* [Language specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)\r\n* [Homepage](http://www.typescriptlang.org/)\r\n", - "readmeFilename": "README.md", - "_id": "tslib@1.9.3", - "_requested": { - "type": "version", - "registry": true, - "raw": "tslib@1.9.3", - "name": "tslib", - "escapedName": "tslib", - "rawSpec": "1.9.3", - "saveSpec": "[Circular]", - "fetchSpec": "1.9.3" - }, - "_spec": "1.9.3", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "tslib@1.9.3", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/tslib", - "error": "[Circular]", - "extraneous": false, - "_deduped": "tslib" - } - }, - "description": "Angular Material Component Development Kit", - "es2015": "./esm2015/cdk.js", - "homepage": "https://github.com/angular/material2#readme", - "keywords": [ - "angular", - "cdk", - "component", - "development", - "kit" - ], - "license": "MIT", - "main": "./bundles/cdk.umd.js", - "module": "./esm5/cdk.es5.js", - "name": "@angular/cdk", - "ng-update": { - "migrations": "./schematics/migration.json" - }, - "optionalDependencies": { - "parse5": "^5.0.0" - }, - "peerDependencies": { - "@angular/core": ">=7.0.0", - "@angular/common": ">=7.0.0" - }, - "releaseGitBranch": "7.0.x", - "releaseGitCommitSha": "44db8860f62bc075e56ec65d784bfe8983a18690", - "releaseGitUser": "Jeremy Elbourn ", - "repository": { - "type": "git", - "url": "git+https://github.com/angular/material2.git" - }, - "schematics": "./schematics/collection.json", - "sideEffects": false, - "typings": "./cdk.d.ts", - "version": "7.0.3", - "readme": "Angular Material\n=======\n\nThe sources for this package are in the main [Angular Material](https://github.com/angular/material2) repo. Please file issues and pull requests against that repo.\n\nLicense: MIT", - "readmeFilename": "README.md", - "devDependencies": {}, - "_dependencies": { - "parse5": "^5.0.0", - "tslib": "^1.7.1" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/@angular/cdk", - "error": "[Circular]", - "extraneous": false, - "peerMissing": [ - { - "requiredBy": "@mat-datetimepicker/core@2.0.1", - "requires": "@angular/cdk@^6.3.3" - } - ] - }, - "peerMissing": true - }, - "@angular/common": { - "required": { - "_args": [ - [ - "@angular/common@7.0.3", - "/Users/dvuika/github/alfresco-content-app" - ], - [ - "@angular/common@7.0.3", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "_from": "@angular/common@7.0.3", - "_id": "@angular/common@7.0.3", - "_integrity": "sha512-aiuQh6+5kWFp34SYEtpnkAJWU3Qn17S/9LjWSZbgfiaYG6MyszepxqLZPBSBPTElxx2u5VoCPh97+TpKoDqx+g==", - "_location": "/@angular/common", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@angular/common@7.0.3", - "name": "@angular/common", - "escapedName": "@angular%2fcommon", - "scope": "@angular", - "rawSpec": "7.0.3", - "saveSpec": "[Circular]", - "fetchSpec": "7.0.3" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/@angular/common/-/common-7.0.3.tgz", - "_spec": "7.0.3", - "_where": "/Users/dvuika/github/alfresco-content-app", - "author": { - "name": "angular" - }, - "bugs": { - "url": "https://github.com/angular/angular/issues" - }, - "dependencies": { - "tslib": { - "name": "tslib", - "author": "[Circular]", - "homepage": "http://typescriptlang.org/", - "version": "1.9.3", - "license": "Apache-2.0", - "description": "Runtime library for TypeScript helper functions", - "keywords": "[Circular]", - "bugs": "[Circular]", - "repository": "[Circular]", - "main": "tslib.js", - "module": "tslib.es6.js", - "jsnext:main": "tslib.es6.js", - "typings": "tslib.d.ts", - "_resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "_integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "_from": "tslib@1.9.3", - "readme": "# tslib\r\n\r\nThis is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.\r\n\r\nThis library is primarily used by the `--importHelpers` flag in TypeScript.\r\nWhen using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:\r\n\r\n```ts\r\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n};\r\nexports.x = {};\r\nexports.y = __assign({}, exports.x);\r\n\r\n```\r\n\r\nwill instead be emitted as something like the following:\r\n\r\n```ts\r\nvar tslib_1 = require(\"tslib\");\r\nexports.x = {};\r\nexports.y = tslib_1.__assign({}, exports.x);\r\n```\r\n\r\nBecause this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.\r\nFor optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.\r\n\r\n# Installing\r\n\r\nFor the latest stable version, run:\r\n\r\n## npm\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\nnpm install --save tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\nnpm install --save tslib@1.6.1\r\n```\r\n\r\n## bower\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\nbower install tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\nbower install tslib@1.6.1\r\n```\r\n\r\n## JSPM\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\njspm install tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\njspm install tslib@1.6.1\r\n```\r\n\r\n# Usage\r\n\r\nSet the `importHelpers` compiler option on the command line:\r\n\r\n```\r\ntsc --importHelpers file.ts\r\n```\r\n\r\nor in your tsconfig.json:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"importHelpers\": true\r\n }\r\n}\r\n```\r\n\r\n#### For bower and JSPM users\r\n\r\nYou will need to add a `paths` mapping for `tslib`, e.g. For Bower users:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"module\": \"amd\",\r\n \"importHelpers\": true,\r\n \"baseUrl\": \"./\",\r\n \"paths\": {\r\n \"tslib\" : [\"bower_components/tslib/tslib.d.ts\"]\r\n }\r\n }\r\n}\r\n```\r\n\r\nFor JSPM users:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"module\": \"system\",\r\n \"importHelpers\": true,\r\n \"baseUrl\": \"./\",\r\n \"paths\": {\r\n \"tslib\" : [\"jspm_packages/npm/tslib@1.9.3/tslib.d.ts\"]\r\n }\r\n }\r\n}\r\n```\r\n\r\n\r\n# Contribute\r\n\r\nThere are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.\r\n\r\n* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.\r\n* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).\r\n* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).\r\n* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.\r\n* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).\r\n* Read the language specification ([docx](http://go.microsoft.com/fwlink/?LinkId=267121), [pdf](http://go.microsoft.com/fwlink/?LinkId=267238)).\r\n\r\n# Documentation\r\n\r\n* [Quick tutorial](http://www.typescriptlang.org/Tutorial)\r\n* [Programming handbook](http://www.typescriptlang.org/Handbook)\r\n* [Language specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)\r\n* [Homepage](http://www.typescriptlang.org/)\r\n", - "readmeFilename": "README.md", - "_id": "tslib@1.9.3", - "_requested": { - "type": "version", - "registry": true, - "raw": "tslib@1.9.3", - "name": "tslib", - "escapedName": "tslib", - "rawSpec": "1.9.3", - "saveSpec": "[Circular]", - "fetchSpec": "1.9.3" - }, - "_spec": "1.9.3", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": "[Circular]", - "dependencies": {}, - "devDependencies": "[Circular]", - "optionalDependencies": "[Circular]", - "_dependencies": "[Circular]", - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/tslib", - "error": "[Circular]", - "extraneous": false, - "_deduped": "tslib" - } - }, - "description": "Angular - commonly needed directives and services", - "es2015": "./fesm2015/common.js", - "esm2015": "./esm2015/common.js", - "esm5": "./esm5/common.js", - "fesm2015": "./fesm2015/common.js", - "fesm5": "./fesm5/common.js", - "homepage": "https://github.com/angular/angular#readme", - "license": "MIT", - "locales": "locales", - "main": "./bundles/common.umd.js", - "module": "./fesm5/common.js", - "name": "@angular/common", - "ng-update": { - "packageGroup": [ - "@angular/core", - "@angular/bazel", - "@angular/common", - "@angular/compiler", - "@angular/compiler-cli", - "@angular/animations", - "@angular/elements", - "@angular/platform-browser", - "@angular/platform-browser-dynamic", - "@angular/forms", - "@angular/http", - "@angular/platform-server", - "@angular/platform-webworker", - "@angular/platform-webworker-dynamic", - "@angular/upgrade", - "@angular/router", - "@angular/language-service", - "@angular/service-worker" - ] - }, - "peerDependencies": { - "rxjs": "^6.0.0", - "@angular/core": "7.0.3" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/angular/angular.git" - }, - "sideEffects": false, - "typings": "./common.d.ts", - "version": "7.0.3", - "readme": "Angular\n=======\n\nThe sources for this package are in the main [Angular](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo.\n\nLicense: MIT\n", - "readmeFilename": "README.md", - "devDependencies": {}, - "optionalDependencies": {}, - "_dependencies": { - "tslib": "^1.9.0" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/@angular/common", - "error": "[Circular]", - "extraneous": false, - "peerMissing": [ - { - "requiredBy": "@alfresco/adf-extensions@3.0.0-383b74151a47e188020249aea7ec0dfb586bd0b6", - "requires": "@angular/common@^6.0.0" - }, - { - "requiredBy": "@ngrx/router-store@6.1.2", - "requires": "@angular/common@^6.0.0" - } - ] - }, - "peerMissing": true - }, - "@angular/compiler": { - "version": "7.0.3", - "from": "@angular/compiler@7.0.3", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-7.0.3.tgz" - }, - "@angular/core": { - "required": { - "_args": [ - [ - "@angular/core@7.0.3", - "/Users/dvuika/github/alfresco-content-app" - ], - [ - "@angular/core@7.0.3", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "_from": "@angular/core@7.0.3", - "_id": "@angular/core@7.0.3", - "_integrity": "sha512-x/OYYykVsi2vrKlYQJ37I8HYAI/s/CtL3Sd9bl87F6AnqLWnnKIxQaofT/ShfAfdP44LQoN5BNp5j+sjs8K4Kg==", - "_location": "/@angular/core", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@angular/core@7.0.3", - "name": "@angular/core", - "escapedName": "@angular%2fcore", - "scope": "@angular", - "rawSpec": "7.0.3", - "saveSpec": "[Circular]", - "fetchSpec": "7.0.3" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/@angular/core/-/core-7.0.3.tgz", - "_spec": "7.0.3", - "_where": "/Users/dvuika/github/alfresco-content-app", - "author": { - "name": "angular" - }, - "bugs": { - "url": "https://github.com/angular/angular/issues" - }, - "dependencies": { - "tslib": { - "name": "tslib", - "author": "[Circular]", - "homepage": "http://typescriptlang.org/", - "version": "1.9.3", - "license": "Apache-2.0", - "description": "Runtime library for TypeScript helper functions", - "keywords": "[Circular]", - "bugs": "[Circular]", - "repository": "[Circular]", - "main": "tslib.js", - "module": "tslib.es6.js", - "jsnext:main": "tslib.es6.js", - "typings": "tslib.d.ts", - "_resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "_integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "_from": "tslib@1.9.3", - "readme": "# tslib\r\n\r\nThis is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.\r\n\r\nThis library is primarily used by the `--importHelpers` flag in TypeScript.\r\nWhen using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:\r\n\r\n```ts\r\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n};\r\nexports.x = {};\r\nexports.y = __assign({}, exports.x);\r\n\r\n```\r\n\r\nwill instead be emitted as something like the following:\r\n\r\n```ts\r\nvar tslib_1 = require(\"tslib\");\r\nexports.x = {};\r\nexports.y = tslib_1.__assign({}, exports.x);\r\n```\r\n\r\nBecause this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.\r\nFor optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.\r\n\r\n# Installing\r\n\r\nFor the latest stable version, run:\r\n\r\n## npm\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\nnpm install --save tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\nnpm install --save tslib@1.6.1\r\n```\r\n\r\n## bower\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\nbower install tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\nbower install tslib@1.6.1\r\n```\r\n\r\n## JSPM\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\njspm install tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\njspm install tslib@1.6.1\r\n```\r\n\r\n# Usage\r\n\r\nSet the `importHelpers` compiler option on the command line:\r\n\r\n```\r\ntsc --importHelpers file.ts\r\n```\r\n\r\nor in your tsconfig.json:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"importHelpers\": true\r\n }\r\n}\r\n```\r\n\r\n#### For bower and JSPM users\r\n\r\nYou will need to add a `paths` mapping for `tslib`, e.g. For Bower users:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"module\": \"amd\",\r\n \"importHelpers\": true,\r\n \"baseUrl\": \"./\",\r\n \"paths\": {\r\n \"tslib\" : [\"bower_components/tslib/tslib.d.ts\"]\r\n }\r\n }\r\n}\r\n```\r\n\r\nFor JSPM users:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"module\": \"system\",\r\n \"importHelpers\": true,\r\n \"baseUrl\": \"./\",\r\n \"paths\": {\r\n \"tslib\" : [\"jspm_packages/npm/tslib@1.9.3/tslib.d.ts\"]\r\n }\r\n }\r\n}\r\n```\r\n\r\n\r\n# Contribute\r\n\r\nThere are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.\r\n\r\n* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.\r\n* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).\r\n* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).\r\n* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.\r\n* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).\r\n* Read the language specification ([docx](http://go.microsoft.com/fwlink/?LinkId=267121), [pdf](http://go.microsoft.com/fwlink/?LinkId=267238)).\r\n\r\n# Documentation\r\n\r\n* [Quick tutorial](http://www.typescriptlang.org/Tutorial)\r\n* [Programming handbook](http://www.typescriptlang.org/Handbook)\r\n* [Language specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)\r\n* [Homepage](http://www.typescriptlang.org/)\r\n", - "readmeFilename": "README.md", - "_id": "tslib@1.9.3", - "_requested": { - "type": "version", - "registry": true, - "raw": "tslib@1.9.3", - "name": "tslib", - "escapedName": "tslib", - "rawSpec": "1.9.3", - "saveSpec": "[Circular]", - "fetchSpec": "1.9.3" - }, - "_spec": "1.9.3", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": "[Circular]", - "dependencies": {}, - "devDependencies": "[Circular]", - "optionalDependencies": "[Circular]", - "_dependencies": "[Circular]", - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/tslib", - "error": "[Circular]", - "extraneous": false, - "_deduped": "tslib" - } - }, - "description": "Angular - the core framework", - "es2015": "./fesm2015/core.js", - "esm2015": "./esm2015/core.js", - "esm5": "./esm5/core.js", - "fesm2015": "./fesm2015/core.js", - "fesm5": "./fesm5/core.js", - "homepage": "https://github.com/angular/angular#readme", - "license": "MIT", - "main": "./bundles/core.umd.js", - "module": "./fesm5/core.js", - "name": "@angular/core", - "ng-update": { - "packageGroup": [ - "@angular/core", - "@angular/bazel", - "@angular/common", - "@angular/compiler", - "@angular/compiler-cli", - "@angular/animations", - "@angular/elements", - "@angular/platform-browser", - "@angular/platform-browser-dynamic", - "@angular/forms", - "@angular/http", - "@angular/platform-server", - "@angular/platform-webworker", - "@angular/platform-webworker-dynamic", - "@angular/upgrade", - "@angular/router", - "@angular/language-service", - "@angular/service-worker" - ] - }, - "peerDependencies": { - "rxjs": "^6.0.0", - "zone.js": "~0.8.26" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/angular/angular.git" - }, - "sideEffects": false, - "typings": "./core.d.ts", - "version": "7.0.3", - "readme": "Angular\n=======\n\nThe sources for this package are in the main [Angular](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo.\n\nLicense: MIT\n", - "readmeFilename": "README.md", - "devDependencies": {}, - "optionalDependencies": {}, - "_dependencies": { - "tslib": "^1.9.0" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/@angular/core", - "error": "[Circular]", - "extraneous": false, - "peerMissing": [ - { - "requiredBy": "@alfresco/adf-extensions@3.0.0-383b74151a47e188020249aea7ec0dfb586bd0b6", - "requires": "@angular/core@^6.0.0" - }, - { - "requiredBy": "@mat-datetimepicker/core@2.0.1", - "requires": "@angular/core@^6.0.7" - }, - { - "requiredBy": "@ngrx/effects@6.1.2", - "requires": "@angular/core@^6.0.0" - }, - { - "requiredBy": "@ngrx/router-store@6.1.2", - "requires": "@angular/core@^6.0.0" - }, - { - "requiredBy": "@ngrx/store@6.1.2", - "requires": "@angular/core@^6.0.0" - } - ] - }, - "peerMissing": true - }, - "@angular/flex-layout": { - "required": { - "name": "@angular/flex-layout", - "version": "7.0.0-beta.19", - "description": "Angular Flex-Layout", - "main": "./bundles/flex-layout.umd.js", - "module": "./esm5/flex-layout.es5.js", - "es2015": "./esm2015/flex-layout.js", - "typings": "./flex-layout.d.ts", - "repository": { - "type": "git", - "url": "git+https://github.com/angular/flex-layout.git" - }, - "keywords": [ - "angular", - "flex-layout", - "flexbox css", - "media query", - "breakpoints" - ], - "license": "MIT", - "bugs": { - "url": "https://github.com/angular/flex-layout/issues" - }, - "homepage": "https://github.com/angular/flex-layout#readme", - "peerDependencies": { - "@angular/cdk": "^7.0.0-rc.0", - "@angular/core": ">=7.0.0-rc.0", - "@angular/common": ">=7.0.0-rc.0", - "rxjs": "^6.0.0" - }, - "dependencies": { - "tslib": { - "name": "tslib", - "author": "[Circular]", - "homepage": "http://typescriptlang.org/", - "version": "1.9.3", - "license": "Apache-2.0", - "description": "Runtime library for TypeScript helper functions", - "keywords": "[Circular]", - "bugs": "[Circular]", - "repository": "[Circular]", - "main": "tslib.js", - "module": "tslib.es6.js", - "jsnext:main": "tslib.es6.js", - "typings": "tslib.d.ts", - "_resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "_integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "_from": "tslib@1.9.3", - "readme": "# tslib\r\n\r\nThis is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.\r\n\r\nThis library is primarily used by the `--importHelpers` flag in TypeScript.\r\nWhen using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:\r\n\r\n```ts\r\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n};\r\nexports.x = {};\r\nexports.y = __assign({}, exports.x);\r\n\r\n```\r\n\r\nwill instead be emitted as something like the following:\r\n\r\n```ts\r\nvar tslib_1 = require(\"tslib\");\r\nexports.x = {};\r\nexports.y = tslib_1.__assign({}, exports.x);\r\n```\r\n\r\nBecause this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.\r\nFor optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.\r\n\r\n# Installing\r\n\r\nFor the latest stable version, run:\r\n\r\n## npm\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\nnpm install --save tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\nnpm install --save tslib@1.6.1\r\n```\r\n\r\n## bower\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\nbower install tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\nbower install tslib@1.6.1\r\n```\r\n\r\n## JSPM\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\njspm install tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\njspm install tslib@1.6.1\r\n```\r\n\r\n# Usage\r\n\r\nSet the `importHelpers` compiler option on the command line:\r\n\r\n```\r\ntsc --importHelpers file.ts\r\n```\r\n\r\nor in your tsconfig.json:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"importHelpers\": true\r\n }\r\n}\r\n```\r\n\r\n#### For bower and JSPM users\r\n\r\nYou will need to add a `paths` mapping for `tslib`, e.g. For Bower users:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"module\": \"amd\",\r\n \"importHelpers\": true,\r\n \"baseUrl\": \"./\",\r\n \"paths\": {\r\n \"tslib\" : [\"bower_components/tslib/tslib.d.ts\"]\r\n }\r\n }\r\n}\r\n```\r\n\r\nFor JSPM users:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"module\": \"system\",\r\n \"importHelpers\": true,\r\n \"baseUrl\": \"./\",\r\n \"paths\": {\r\n \"tslib\" : [\"jspm_packages/npm/tslib@1.9.3/tslib.d.ts\"]\r\n }\r\n }\r\n}\r\n```\r\n\r\n\r\n# Contribute\r\n\r\nThere are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.\r\n\r\n* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.\r\n* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).\r\n* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).\r\n* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.\r\n* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).\r\n* Read the language specification ([docx](http://go.microsoft.com/fwlink/?LinkId=267121), [pdf](http://go.microsoft.com/fwlink/?LinkId=267238)).\r\n\r\n# Documentation\r\n\r\n* [Quick tutorial](http://www.typescriptlang.org/Tutorial)\r\n* [Programming handbook](http://www.typescriptlang.org/Handbook)\r\n* [Language specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)\r\n* [Homepage](http://www.typescriptlang.org/)\r\n", - "readmeFilename": "README.md", - "_id": "tslib@1.9.3", - "_requested": { - "type": "version", - "registry": true, - "raw": "tslib@1.9.3", - "name": "tslib", - "escapedName": "tslib", - "rawSpec": "1.9.3", - "saveSpec": "[Circular]", - "fetchSpec": "1.9.3" - }, - "_spec": "1.9.3", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": "[Circular]", - "dependencies": {}, - "devDependencies": "[Circular]", - "optionalDependencies": "[Circular]", - "_dependencies": "[Circular]", - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/tslib", - "error": "[Circular]", - "extraneous": false, - "_deduped": "tslib" - } - }, - "sideEffects": false, - "_resolved": "https://registry.npmjs.org/@angular/flex-layout/-/flex-layout-7.0.0-beta.19.tgz", - "_integrity": "sha512-MXq+zZ6/s5/+GsL9fZ42mKL0LjZ/+L0sVU5FaQuSAJ57soLl5QAGWvdxVmROtqcHd3Htp35R49nKSZBJ0nfAjg==", - "_from": "@angular/flex-layout@7.0.0-beta.19", - "readme": "Angular Flex-Layout\n=======\n\nThe sources for this package are in the main [Angular Flex-Layout](https://github.com/angular/flex-layout) repo. \nPlease file issues and pull requests against that repo.\n\nLicense: MIT\n", - "readmeFilename": "README.md", - "_id": "@angular/flex-layout@7.0.0-beta.19", - "_requested": { - "type": "version", - "registry": true, - "raw": "@angular/flex-layout@7.0.0-beta.19", - "name": "@angular/flex-layout", - "escapedName": "@angular%2fflex-layout", - "scope": "@angular", - "rawSpec": "7.0.0-beta.19", - "saveSpec": "[Circular]", - "fetchSpec": "7.0.0-beta.19" - }, - "_spec": "7.0.0-beta.19", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "@angular/flex-layout@7.0.0-beta.19", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "devDependencies": {}, - "optionalDependencies": {}, - "_dependencies": { - "tslib": "^1.7.1" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/@angular/flex-layout", - "error": "[Circular]", - "extraneous": false, - "peerMissing": [ - { - "requiredBy": "@alfresco/adf-content-services@2.6.1", - "requires": "@angular/flex-layout@>=6.0.0-beta.18" - }, - { - "requiredBy": "@alfresco/adf-core@2.6.1", - "requires": "@angular/flex-layout@>=6.0.0-beta.18" - } - ] - }, - "peerMissing": true - }, - "@angular/forms": { - "version": "7.0.3", - "from": "@angular/forms@7.0.3", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-7.0.3.tgz" - }, - "@angular/http": { - "required": { - "_args": [ - [ - "@angular/http@7.0.3", - "/Users/dvuika/github/alfresco-content-app" - ], - [ - "@angular/http@7.0.3", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "_from": "@angular/http@7.0.3", - "_id": "@angular/http@7.0.3", - "_integrity": "sha512-aL+z1/tbVY8oJw5v46rbMli5vBGDVyJvs95d1l2n3hWnwMTzS9AVetjcL3B3uruAYuXoh4QlSJ+ysBgdmV1+IA==", - "_location": "/@angular/http", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@angular/http@7.0.3", - "name": "@angular/http", - "escapedName": "@angular%2fhttp", - "scope": "@angular", - "rawSpec": "7.0.3", - "saveSpec": "[Circular]", - "fetchSpec": "7.0.3" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/@angular/http/-/http-7.0.3.tgz", - "_spec": "7.0.3", - "_where": "/Users/dvuika/github/alfresco-content-app", - "author": { - "name": "angular" - }, - "bugs": { - "url": "https://github.com/angular/angular/issues" - }, - "dependencies": { - "tslib": { - "name": "tslib", - "author": "[Circular]", - "homepage": "http://typescriptlang.org/", - "version": "1.9.3", - "license": "Apache-2.0", - "description": "Runtime library for TypeScript helper functions", - "keywords": "[Circular]", - "bugs": "[Circular]", - "repository": "[Circular]", - "main": "tslib.js", - "module": "tslib.es6.js", - "jsnext:main": "tslib.es6.js", - "typings": "tslib.d.ts", - "_resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "_integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "_from": "tslib@1.9.3", - "readme": "# tslib\r\n\r\nThis is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.\r\n\r\nThis library is primarily used by the `--importHelpers` flag in TypeScript.\r\nWhen using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:\r\n\r\n```ts\r\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n};\r\nexports.x = {};\r\nexports.y = __assign({}, exports.x);\r\n\r\n```\r\n\r\nwill instead be emitted as something like the following:\r\n\r\n```ts\r\nvar tslib_1 = require(\"tslib\");\r\nexports.x = {};\r\nexports.y = tslib_1.__assign({}, exports.x);\r\n```\r\n\r\nBecause this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.\r\nFor optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.\r\n\r\n# Installing\r\n\r\nFor the latest stable version, run:\r\n\r\n## npm\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\nnpm install --save tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\nnpm install --save tslib@1.6.1\r\n```\r\n\r\n## bower\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\nbower install tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\nbower install tslib@1.6.1\r\n```\r\n\r\n## JSPM\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\njspm install tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\njspm install tslib@1.6.1\r\n```\r\n\r\n# Usage\r\n\r\nSet the `importHelpers` compiler option on the command line:\r\n\r\n```\r\ntsc --importHelpers file.ts\r\n```\r\n\r\nor in your tsconfig.json:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"importHelpers\": true\r\n }\r\n}\r\n```\r\n\r\n#### For bower and JSPM users\r\n\r\nYou will need to add a `paths` mapping for `tslib`, e.g. For Bower users:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"module\": \"amd\",\r\n \"importHelpers\": true,\r\n \"baseUrl\": \"./\",\r\n \"paths\": {\r\n \"tslib\" : [\"bower_components/tslib/tslib.d.ts\"]\r\n }\r\n }\r\n}\r\n```\r\n\r\nFor JSPM users:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"module\": \"system\",\r\n \"importHelpers\": true,\r\n \"baseUrl\": \"./\",\r\n \"paths\": {\r\n \"tslib\" : [\"jspm_packages/npm/tslib@1.9.3/tslib.d.ts\"]\r\n }\r\n }\r\n}\r\n```\r\n\r\n\r\n# Contribute\r\n\r\nThere are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.\r\n\r\n* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.\r\n* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).\r\n* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).\r\n* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.\r\n* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).\r\n* Read the language specification ([docx](http://go.microsoft.com/fwlink/?LinkId=267121), [pdf](http://go.microsoft.com/fwlink/?LinkId=267238)).\r\n\r\n# Documentation\r\n\r\n* [Quick tutorial](http://www.typescriptlang.org/Tutorial)\r\n* [Programming handbook](http://www.typescriptlang.org/Handbook)\r\n* [Language specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)\r\n* [Homepage](http://www.typescriptlang.org/)\r\n", - "readmeFilename": "README.md", - "_id": "tslib@1.9.3", - "_requested": { - "type": "version", - "registry": true, - "raw": "tslib@1.9.3", - "name": "tslib", - "escapedName": "tslib", - "rawSpec": "1.9.3", - "saveSpec": "[Circular]", - "fetchSpec": "1.9.3" - }, - "_spec": "1.9.3", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": "[Circular]", - "dependencies": {}, - "devDependencies": "[Circular]", - "optionalDependencies": "[Circular]", - "_dependencies": "[Circular]", - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/tslib", - "error": "[Circular]", - "extraneous": false, - "_deduped": "tslib" - } - }, - "description": "Angular - the http service", - "es2015": "./fesm2015/http.js", - "esm2015": "./esm2015/http.js", - "esm5": "./esm5/http.js", - "fesm2015": "./fesm2015/http.js", - "fesm5": "./fesm5/http.js", - "homepage": "https://github.com/angular/angular#readme", - "license": "MIT", - "main": "./bundles/http.umd.js", - "module": "./fesm5/http.js", - "name": "@angular/http", - "ng-update": { - "packageGroup": [ - "@angular/core", - "@angular/bazel", - "@angular/common", - "@angular/compiler", - "@angular/compiler-cli", - "@angular/animations", - "@angular/elements", - "@angular/platform-browser", - "@angular/platform-browser-dynamic", - "@angular/forms", - "@angular/http", - "@angular/platform-server", - "@angular/platform-webworker", - "@angular/platform-webworker-dynamic", - "@angular/upgrade", - "@angular/router", - "@angular/language-service", - "@angular/service-worker" - ] - }, - "peerDependencies": { - "rxjs": "^6.0.0", - "@angular/core": "7.0.3", - "@angular/platform-browser": "7.0.3" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/angular/angular.git" - }, - "sideEffects": false, - "typings": "./http.d.ts", - "version": "7.0.3", - "readme": "Angular\n=======\n\nThe sources for this package are in the main [Angular](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo.\n\nLicense: MIT\n", - "readmeFilename": "README.md", - "devDependencies": {}, - "optionalDependencies": {}, - "_dependencies": { - "tslib": "^1.9.0" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/@angular/http", - "error": "[Circular]", - "extraneous": false, - "peerMissing": [ - { - "requiredBy": "@alfresco/adf-extensions@3.0.0-383b74151a47e188020249aea7ec0dfb586bd0b6", - "requires": "@angular/http@^6.1.4" - } - ] - }, - "peerMissing": true - }, - "@angular/material": { - "required": { - "_args": [ - [ - "@angular/material@7.0.3", - "/Users/dvuika/github/alfresco-content-app" - ], - [ - "@angular/material@7.0.3", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "_from": "@angular/material@7.0.3", - "_id": "@angular/material@7.0.3", - "_integrity": "sha512-acJ2zU44k/rsd4OeTdAMVP0R3te8aXwfubDQGc8YI1CdRVW1XqMSvAWkToYDVaGvnZV53zQt/iSi1XWaSXYf1Q==", - "_location": "/@angular/material", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@angular/material@7.0.3", - "name": "@angular/material", - "escapedName": "@angular%2fmaterial", - "scope": "@angular", - "rawSpec": "7.0.3", - "saveSpec": "[Circular]", - "fetchSpec": "7.0.3" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/@angular/material/-/material-7.0.3.tgz", - "_spec": "7.0.3", - "_where": "/Users/dvuika/github/alfresco-content-app", - "bugs": { - "url": "https://github.com/angular/material2/issues" - }, - "dependencies": { - "tslib": { - "name": "tslib", - "author": "[Circular]", - "homepage": "http://typescriptlang.org/", - "version": "1.9.3", - "license": "Apache-2.0", - "description": "Runtime library for TypeScript helper functions", - "keywords": "[Circular]", - "bugs": "[Circular]", - "repository": "[Circular]", - "main": "tslib.js", - "module": "tslib.es6.js", - "jsnext:main": "tslib.es6.js", - "typings": "tslib.d.ts", - "_resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "_integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "_from": "tslib@1.9.3", - "readme": "# tslib\r\n\r\nThis is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.\r\n\r\nThis library is primarily used by the `--importHelpers` flag in TypeScript.\r\nWhen using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:\r\n\r\n```ts\r\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n};\r\nexports.x = {};\r\nexports.y = __assign({}, exports.x);\r\n\r\n```\r\n\r\nwill instead be emitted as something like the following:\r\n\r\n```ts\r\nvar tslib_1 = require(\"tslib\");\r\nexports.x = {};\r\nexports.y = tslib_1.__assign({}, exports.x);\r\n```\r\n\r\nBecause this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.\r\nFor optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.\r\n\r\n# Installing\r\n\r\nFor the latest stable version, run:\r\n\r\n## npm\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\nnpm install --save tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\nnpm install --save tslib@1.6.1\r\n```\r\n\r\n## bower\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\nbower install tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\nbower install tslib@1.6.1\r\n```\r\n\r\n## JSPM\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\njspm install tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\njspm install tslib@1.6.1\r\n```\r\n\r\n# Usage\r\n\r\nSet the `importHelpers` compiler option on the command line:\r\n\r\n```\r\ntsc --importHelpers file.ts\r\n```\r\n\r\nor in your tsconfig.json:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"importHelpers\": true\r\n }\r\n}\r\n```\r\n\r\n#### For bower and JSPM users\r\n\r\nYou will need to add a `paths` mapping for `tslib`, e.g. For Bower users:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"module\": \"amd\",\r\n \"importHelpers\": true,\r\n \"baseUrl\": \"./\",\r\n \"paths\": {\r\n \"tslib\" : [\"bower_components/tslib/tslib.d.ts\"]\r\n }\r\n }\r\n}\r\n```\r\n\r\nFor JSPM users:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"module\": \"system\",\r\n \"importHelpers\": true,\r\n \"baseUrl\": \"./\",\r\n \"paths\": {\r\n \"tslib\" : [\"jspm_packages/npm/tslib@1.9.3/tslib.d.ts\"]\r\n }\r\n }\r\n}\r\n```\r\n\r\n\r\n# Contribute\r\n\r\nThere are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.\r\n\r\n* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.\r\n* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).\r\n* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).\r\n* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.\r\n* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).\r\n* Read the language specification ([docx](http://go.microsoft.com/fwlink/?LinkId=267121), [pdf](http://go.microsoft.com/fwlink/?LinkId=267238)).\r\n\r\n# Documentation\r\n\r\n* [Quick tutorial](http://www.typescriptlang.org/Tutorial)\r\n* [Programming handbook](http://www.typescriptlang.org/Handbook)\r\n* [Language specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)\r\n* [Homepage](http://www.typescriptlang.org/)\r\n", - "readmeFilename": "README.md", - "_id": "tslib@1.9.3", - "_requested": { - "type": "version", - "registry": true, - "raw": "tslib@1.9.3", - "name": "tslib", - "escapedName": "tslib", - "rawSpec": "1.9.3", - "saveSpec": "[Circular]", - "fetchSpec": "1.9.3" - }, - "_spec": "1.9.3", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": "[Circular]", - "dependencies": {}, - "devDependencies": "[Circular]", - "optionalDependencies": "[Circular]", - "_dependencies": "[Circular]", - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/tslib", - "error": "[Circular]", - "extraneous": false, - "_deduped": "tslib" - } - }, - "description": "Angular Material", - "es2015": "./esm2015/material.js", - "homepage": "https://github.com/angular/material2#readme", - "keywords": [ - "angular", - "material", - "material design", - "components" - ], - "license": "MIT", - "main": "./bundles/material.umd.js", - "module": "./esm5/material.es5.js", - "name": "@angular/material", - "ng-update": { - "migrations": "./schematics/migration.json", - "packageGroup": [ - "@angular/material", - "@angular/cdk", - "@angular/material-moment-adapter" - ] - }, - "peerDependencies": { - "@angular/animations": ">=7.0.0", - "@angular/cdk": "7.0.3", - "@angular/core": ">=7.0.0", - "@angular/common": ">=7.0.0" - }, - "releaseGitBranch": "7.0.x", - "releaseGitCommitSha": "44db8860f62bc075e56ec65d784bfe8983a18690", - "releaseGitUser": "Jeremy Elbourn ", - "repository": { - "type": "git", - "url": "git+https://github.com/angular/material2.git" - }, - "schematics": "./schematics/collection.json", - "sideEffects": false, - "typings": "./material.d.ts", - "version": "7.0.3", - "readme": "Angular Material\n=======\n\nThe sources for this package are in the main [Angular Material](https://github.com/angular/material2) repo. Please file issues and pull requests against that repo.\n\nLicense: MIT", - "readmeFilename": "README.md", - "devDependencies": {}, - "optionalDependencies": {}, - "_dependencies": { - "tslib": "^1.7.1" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/@angular/material", - "error": "[Circular]", - "extraneous": false, - "peerMissing": [ - { - "requiredBy": "@mat-datetimepicker/core@2.0.1", - "requires": "@angular/material@^6.3.3" - }, - { - "requiredBy": "@mat-datetimepicker/moment@2.0.1", - "requires": "@angular/material@^6.3.3" - } - ] - }, - "peerMissing": true - }, - "@angular/material-moment-adapter": { - "required": { - "_args": [ - [ - "@angular/material-moment-adapter@7.0.3", - "/Users/dvuika/github/alfresco-content-app" - ], - [ - "@angular/material-moment-adapter@7.0.3", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "_from": "@angular/material-moment-adapter@7.0.3", - "_id": "@angular/material-moment-adapter@7.0.3", - "_integrity": "sha512-vbynHlQYWcgbZKRearq5LpflQp9VPDDNarHL+C4WD6aGLPYmIKotOWcBr083HfN1RnkCa7fh+GhOld/MHglHmg==", - "_location": "/@angular/material-moment-adapter", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@angular/material-moment-adapter@7.0.3", - "name": "@angular/material-moment-adapter", - "escapedName": "@angular%2fmaterial-moment-adapter", - "scope": "@angular", - "rawSpec": "7.0.3", - "saveSpec": "[Circular]", - "fetchSpec": "7.0.3" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/@angular/material-moment-adapter/-/material-moment-adapter-7.0.3.tgz", - "_spec": "7.0.3", - "_where": "/Users/dvuika/github/alfresco-content-app", - "bugs": { - "url": "https://github.com/angular/material2/issues" - }, - "dependencies": { - "tslib": { - "name": "tslib", - "author": "[Circular]", - "homepage": "http://typescriptlang.org/", - "version": "1.9.3", - "license": "Apache-2.0", - "description": "Runtime library for TypeScript helper functions", - "keywords": "[Circular]", - "bugs": "[Circular]", - "repository": "[Circular]", - "main": "tslib.js", - "module": "tslib.es6.js", - "jsnext:main": "tslib.es6.js", - "typings": "tslib.d.ts", - "_resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "_integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "_from": "tslib@1.9.3", - "readme": "# tslib\r\n\r\nThis is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.\r\n\r\nThis library is primarily used by the `--importHelpers` flag in TypeScript.\r\nWhen using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:\r\n\r\n```ts\r\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n};\r\nexports.x = {};\r\nexports.y = __assign({}, exports.x);\r\n\r\n```\r\n\r\nwill instead be emitted as something like the following:\r\n\r\n```ts\r\nvar tslib_1 = require(\"tslib\");\r\nexports.x = {};\r\nexports.y = tslib_1.__assign({}, exports.x);\r\n```\r\n\r\nBecause this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.\r\nFor optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.\r\n\r\n# Installing\r\n\r\nFor the latest stable version, run:\r\n\r\n## npm\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\nnpm install --save tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\nnpm install --save tslib@1.6.1\r\n```\r\n\r\n## bower\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\nbower install tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\nbower install tslib@1.6.1\r\n```\r\n\r\n## JSPM\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\njspm install tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\njspm install tslib@1.6.1\r\n```\r\n\r\n# Usage\r\n\r\nSet the `importHelpers` compiler option on the command line:\r\n\r\n```\r\ntsc --importHelpers file.ts\r\n```\r\n\r\nor in your tsconfig.json:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"importHelpers\": true\r\n }\r\n}\r\n```\r\n\r\n#### For bower and JSPM users\r\n\r\nYou will need to add a `paths` mapping for `tslib`, e.g. For Bower users:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"module\": \"amd\",\r\n \"importHelpers\": true,\r\n \"baseUrl\": \"./\",\r\n \"paths\": {\r\n \"tslib\" : [\"bower_components/tslib/tslib.d.ts\"]\r\n }\r\n }\r\n}\r\n```\r\n\r\nFor JSPM users:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"module\": \"system\",\r\n \"importHelpers\": true,\r\n \"baseUrl\": \"./\",\r\n \"paths\": {\r\n \"tslib\" : [\"jspm_packages/npm/tslib@1.9.3/tslib.d.ts\"]\r\n }\r\n }\r\n}\r\n```\r\n\r\n\r\n# Contribute\r\n\r\nThere are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.\r\n\r\n* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.\r\n* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).\r\n* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).\r\n* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.\r\n* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).\r\n* Read the language specification ([docx](http://go.microsoft.com/fwlink/?LinkId=267121), [pdf](http://go.microsoft.com/fwlink/?LinkId=267238)).\r\n\r\n# Documentation\r\n\r\n* [Quick tutorial](http://www.typescriptlang.org/Tutorial)\r\n* [Programming handbook](http://www.typescriptlang.org/Handbook)\r\n* [Language specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)\r\n* [Homepage](http://www.typescriptlang.org/)\r\n", - "readmeFilename": "README.md", - "_id": "tslib@1.9.3", - "_requested": { - "type": "version", - "registry": true, - "raw": "tslib@1.9.3", - "name": "tslib", - "escapedName": "tslib", - "rawSpec": "1.9.3", - "saveSpec": "[Circular]", - "fetchSpec": "1.9.3" - }, - "_spec": "1.9.3", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": "[Circular]", - "dependencies": {}, - "devDependencies": "[Circular]", - "optionalDependencies": "[Circular]", - "_dependencies": "[Circular]", - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/tslib", - "error": "[Circular]", - "extraneous": false, - "_deduped": "tslib" - } - }, - "description": "Angular Material Moment Adapter", - "es2015": "./esm2015/material-moment-adapter.js", - "homepage": "https://github.com/angular/material2#readme", - "license": "MIT", - "main": "./bundles/material-moment-adapter.umd.js", - "module": "./esm5/material-moment-adapter.es5.js", - "name": "@angular/material-moment-adapter", - "ng-update": { - "packageGroup": [ - "@angular/material", - "@angular/cdk", - "@angular/material-moment-adapter" - ] - }, - "peerDependencies": { - "@angular/material": "7.0.3", - "@angular/core": ">=7.0.0", - "moment": "^2.18.1" - }, - "releaseGitBranch": "7.0.x", - "releaseGitCommitSha": "44db8860f62bc075e56ec65d784bfe8983a18690", - "releaseGitUser": "Jeremy Elbourn ", - "repository": { - "type": "git", - "url": "git+https://github.com/angular/material2.git" - }, - "typings": "./material-moment-adapter.d.ts", - "version": "7.0.3", - "readme": "Angular Material\n=======\n\nThe sources for this package are in the main [Angular Material](https://github.com/angular/material2) repo. Please file issues and pull requests against that repo.\n\nLicense: MIT", - "readmeFilename": "README.md", - "devDependencies": {}, - "optionalDependencies": {}, - "_dependencies": { - "tslib": "^1.7.1" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/@angular/material-moment-adapter", - "error": "[Circular]", - "extraneous": false, - "peerMissing": [ - { - "requiredBy": "@mat-datetimepicker/moment@2.0.1", - "requires": "@angular/material-moment-adapter@^6.3.3" - } - ] - }, - "peerMissing": true - }, - "@angular/platform-browser": { - "version": "7.0.3", - "from": "@angular/platform-browser@7.0.3", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-7.0.3.tgz" - }, - "@angular/platform-browser-dynamic": { - "version": "7.0.3", - "from": "@angular/platform-browser-dynamic@7.0.3", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-7.0.3.tgz" - }, - "@angular/router": { - "required": { - "_args": [ - [ - "@angular/router@7.0.3", - "/Users/dvuika/github/alfresco-content-app" - ], - [ - "@angular/router@7.0.3", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "_from": "@angular/router@7.0.3", - "_id": "@angular/router@7.0.3", - "_integrity": "sha512-885svORDpD9DkaMKjvGwn4g5bf0n3JR8os+gCNhzk0p4TPfpc+vmNo8SyY2jwdLMh2rQzrUQTDkn9SzzgiOfDQ==", - "_location": "/@angular/router", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@angular/router@7.0.3", - "name": "@angular/router", - "escapedName": "@angular%2frouter", - "scope": "@angular", - "rawSpec": "7.0.3", - "saveSpec": "[Circular]", - "fetchSpec": "7.0.3" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/@angular/router/-/router-7.0.3.tgz", - "_spec": "7.0.3", - "_where": "/Users/dvuika/github/alfresco-content-app", - "author": { - "name": "angular" - }, - "bugs": { - "url": "https://github.com/angular/angular/issues" - }, - "dependencies": { - "tslib": { - "name": "tslib", - "author": "[Circular]", - "homepage": "http://typescriptlang.org/", - "version": "1.9.3", - "license": "Apache-2.0", - "description": "Runtime library for TypeScript helper functions", - "keywords": "[Circular]", - "bugs": "[Circular]", - "repository": "[Circular]", - "main": "tslib.js", - "module": "tslib.es6.js", - "jsnext:main": "tslib.es6.js", - "typings": "tslib.d.ts", - "_resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "_integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "_from": "tslib@1.9.3", - "readme": "# tslib\r\n\r\nThis is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.\r\n\r\nThis library is primarily used by the `--importHelpers` flag in TypeScript.\r\nWhen using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:\r\n\r\n```ts\r\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n};\r\nexports.x = {};\r\nexports.y = __assign({}, exports.x);\r\n\r\n```\r\n\r\nwill instead be emitted as something like the following:\r\n\r\n```ts\r\nvar tslib_1 = require(\"tslib\");\r\nexports.x = {};\r\nexports.y = tslib_1.__assign({}, exports.x);\r\n```\r\n\r\nBecause this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.\r\nFor optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.\r\n\r\n# Installing\r\n\r\nFor the latest stable version, run:\r\n\r\n## npm\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\nnpm install --save tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\nnpm install --save tslib@1.6.1\r\n```\r\n\r\n## bower\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\nbower install tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\nbower install tslib@1.6.1\r\n```\r\n\r\n## JSPM\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\njspm install tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\njspm install tslib@1.6.1\r\n```\r\n\r\n# Usage\r\n\r\nSet the `importHelpers` compiler option on the command line:\r\n\r\n```\r\ntsc --importHelpers file.ts\r\n```\r\n\r\nor in your tsconfig.json:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"importHelpers\": true\r\n }\r\n}\r\n```\r\n\r\n#### For bower and JSPM users\r\n\r\nYou will need to add a `paths` mapping for `tslib`, e.g. For Bower users:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"module\": \"amd\",\r\n \"importHelpers\": true,\r\n \"baseUrl\": \"./\",\r\n \"paths\": {\r\n \"tslib\" : [\"bower_components/tslib/tslib.d.ts\"]\r\n }\r\n }\r\n}\r\n```\r\n\r\nFor JSPM users:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"module\": \"system\",\r\n \"importHelpers\": true,\r\n \"baseUrl\": \"./\",\r\n \"paths\": {\r\n \"tslib\" : [\"jspm_packages/npm/tslib@1.9.3/tslib.d.ts\"]\r\n }\r\n }\r\n}\r\n```\r\n\r\n\r\n# Contribute\r\n\r\nThere are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.\r\n\r\n* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.\r\n* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).\r\n* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).\r\n* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.\r\n* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).\r\n* Read the language specification ([docx](http://go.microsoft.com/fwlink/?LinkId=267121), [pdf](http://go.microsoft.com/fwlink/?LinkId=267238)).\r\n\r\n# Documentation\r\n\r\n* [Quick tutorial](http://www.typescriptlang.org/Tutorial)\r\n* [Programming handbook](http://www.typescriptlang.org/Handbook)\r\n* [Language specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)\r\n* [Homepage](http://www.typescriptlang.org/)\r\n", - "readmeFilename": "README.md", - "_id": "tslib@1.9.3", - "_requested": { - "type": "version", - "registry": true, - "raw": "tslib@1.9.3", - "name": "tslib", - "escapedName": "tslib", - "rawSpec": "1.9.3", - "saveSpec": "[Circular]", - "fetchSpec": "1.9.3" - }, - "_spec": "1.9.3", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": "[Circular]", - "dependencies": {}, - "devDependencies": "[Circular]", - "optionalDependencies": "[Circular]", - "_dependencies": "[Circular]", - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/tslib", - "error": "[Circular]", - "extraneous": false, - "_deduped": "tslib" - } - }, - "description": "Angular - the routing library", - "es2015": "./fesm2015/router.js", - "esm2015": "./esm2015/router.js", - "esm5": "./esm5/router.js", - "fesm2015": "./fesm2015/router.js", - "fesm5": "./fesm5/router.js", - "homepage": "https://github.com/angular/angular/tree/master/packages/router", - "keywords": [ - "angular", - "router" - ], - "license": "MIT", - "main": "./bundles/router.umd.js", - "module": "./fesm5/router.js", - "name": "@angular/router", - "ng-update": { - "packageGroup": [ - "@angular/core", - "@angular/bazel", - "@angular/common", - "@angular/compiler", - "@angular/compiler-cli", - "@angular/animations", - "@angular/elements", - "@angular/platform-browser", - "@angular/platform-browser-dynamic", - "@angular/forms", - "@angular/http", - "@angular/platform-server", - "@angular/platform-webworker", - "@angular/platform-webworker-dynamic", - "@angular/upgrade", - "@angular/router", - "@angular/language-service", - "@angular/service-worker" - ] - }, - "peerDependencies": { - "@angular/core": "7.0.3", - "@angular/common": "7.0.3", - "@angular/platform-browser": "7.0.3", - "rxjs": "^6.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/angular/angular.git" - }, - "sideEffects": false, - "typings": "./router.d.ts", - "version": "7.0.3", - "readme": "Angular\n=======\n\nThe sources for this package are in the main [Angular](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo.\n\nLicense: MIT\n", - "readmeFilename": "README.md", - "devDependencies": {}, - "optionalDependencies": {}, - "_dependencies": { - "tslib": "^1.9.0" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/@angular/router", - "error": "[Circular]", - "extraneous": false, - "peerMissing": [ - { - "requiredBy": "@ngrx/router-store@6.1.2", - "requires": "@angular/router@^6.0.0" - } - ] - }, - "peerMissing": true - }, - "@mat-datetimepicker/core": { - "required": { - "name": "@mat-datetimepicker/core", - "version": "2.0.1", - "repository": { - "type": "git", - "url": "git+https://github.com/kuhnroyal/mat-datetimepicker.git" - }, - "author": { - "name": "PL", - "email": "kuhnroyal@gmail.com" - }, - "license": "MIT", - "peerDependencies": { - "@angular/core": "^6.0.7", - "@angular/material": "^6.3.3", - "@angular/cdk": "^6.3.3" - }, - "main": "bundles/mat-datetimepicker-core.umd.js", - "module": "fesm5/mat-datetimepicker-core.js", - "es2015": "fesm2015/mat-datetimepicker-core.js", - "esm5": "esm5/mat-datetimepicker-core.js", - "esm2015": "esm2015/mat-datetimepicker-core.js", - "fesm5": "fesm5/mat-datetimepicker-core.js", - "fesm2015": "fesm2015/mat-datetimepicker-core.js", - "typings": "mat-datetimepicker-core.d.ts", - "metadata": "mat-datetimepicker-core.metadata.json", - "sideEffects": false, - "dependencies": { - "tslib": { - "name": "tslib", - "author": "[Circular]", - "homepage": "http://typescriptlang.org/", - "version": "1.9.3", - "license": "Apache-2.0", - "description": "Runtime library for TypeScript helper functions", - "keywords": "[Circular]", - "bugs": "[Circular]", - "repository": "[Circular]", - "main": "tslib.js", - "module": "tslib.es6.js", - "jsnext:main": "tslib.es6.js", - "typings": "tslib.d.ts", - "_resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "_integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "_from": "tslib@1.9.3", - "readme": "# tslib\r\n\r\nThis is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.\r\n\r\nThis library is primarily used by the `--importHelpers` flag in TypeScript.\r\nWhen using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:\r\n\r\n```ts\r\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n};\r\nexports.x = {};\r\nexports.y = __assign({}, exports.x);\r\n\r\n```\r\n\r\nwill instead be emitted as something like the following:\r\n\r\n```ts\r\nvar tslib_1 = require(\"tslib\");\r\nexports.x = {};\r\nexports.y = tslib_1.__assign({}, exports.x);\r\n```\r\n\r\nBecause this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.\r\nFor optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.\r\n\r\n# Installing\r\n\r\nFor the latest stable version, run:\r\n\r\n## npm\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\nnpm install --save tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\nnpm install --save tslib@1.6.1\r\n```\r\n\r\n## bower\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\nbower install tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\nbower install tslib@1.6.1\r\n```\r\n\r\n## JSPM\r\n\r\n```sh\r\n# TypeScript 2.3.3 or later\r\njspm install tslib\r\n\r\n# TypeScript 2.3.2 or earlier\r\njspm install tslib@1.6.1\r\n```\r\n\r\n# Usage\r\n\r\nSet the `importHelpers` compiler option on the command line:\r\n\r\n```\r\ntsc --importHelpers file.ts\r\n```\r\n\r\nor in your tsconfig.json:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"importHelpers\": true\r\n }\r\n}\r\n```\r\n\r\n#### For bower and JSPM users\r\n\r\nYou will need to add a `paths` mapping for `tslib`, e.g. For Bower users:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"module\": \"amd\",\r\n \"importHelpers\": true,\r\n \"baseUrl\": \"./\",\r\n \"paths\": {\r\n \"tslib\" : [\"bower_components/tslib/tslib.d.ts\"]\r\n }\r\n }\r\n}\r\n```\r\n\r\nFor JSPM users:\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"module\": \"system\",\r\n \"importHelpers\": true,\r\n \"baseUrl\": \"./\",\r\n \"paths\": {\r\n \"tslib\" : [\"jspm_packages/npm/tslib@1.9.3/tslib.d.ts\"]\r\n }\r\n }\r\n}\r\n```\r\n\r\n\r\n# Contribute\r\n\r\nThere are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.\r\n\r\n* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.\r\n* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).\r\n* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).\r\n* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.\r\n* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).\r\n* Read the language specification ([docx](http://go.microsoft.com/fwlink/?LinkId=267121), [pdf](http://go.microsoft.com/fwlink/?LinkId=267238)).\r\n\r\n# Documentation\r\n\r\n* [Quick tutorial](http://www.typescriptlang.org/Tutorial)\r\n* [Programming handbook](http://www.typescriptlang.org/Handbook)\r\n* [Language specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)\r\n* [Homepage](http://www.typescriptlang.org/)\r\n", - "readmeFilename": "README.md", - "_id": "tslib@1.9.3", - "_requested": { - "type": "version", - "registry": true, - "raw": "tslib@1.9.3", - "name": "tslib", - "escapedName": "tslib", - "rawSpec": "1.9.3", - "saveSpec": "[Circular]", - "fetchSpec": "1.9.3" - }, - "_spec": "1.9.3", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": "[Circular]", - "dependencies": {}, - "devDependencies": "[Circular]", - "optionalDependencies": "[Circular]", - "_dependencies": "[Circular]", - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/tslib", - "error": "[Circular]", - "extraneous": false, - "_deduped": "tslib" - } - }, - "_resolved": "https://registry.npmjs.org/@mat-datetimepicker/core/-/core-2.0.1.tgz", - "_integrity": "sha1-4NsdtdTPe6Vrck7AQIF8totXdfI=", - "_from": "@mat-datetimepicker/core@2.0.1", - "readme": "# Material Datetimepicker for @angular/material 6.x\n\nThis is the main branch for @angular/material 6.x.\n\nYou can find the Angular 5 version on the `1.x` branch.\n\n### Description\n\nThe datetimepicker is taken from [Promact/md2](https://github.com/Promact/md2) and modified to use @angular/material as base and added theming support.\n\nLike the @angular/material datepicker it contains a native-datetime-adapter as well as a moment-datetime-adapter.\n\n[![Latest Stable Version](https://img.shields.io/npm/v/@mat-datetimepicker/core.svg)](https://www.npmjs.com/package/@mat-datetimepicker/core)\n[![License](https://img.shields.io/npm/l/@mat-datetimepicker/core.svg)](https://www.npmjs.com/package/@mat-datetimepicker/core)\n[![NPM Downloads](https://img.shields.io/npm/dm/@mat-datetimepicker/core.svg)](https://www.npmjs.com/package/@mat-datetimepicker/core)\n\n### Installation\nInstall:\n```\nyarn install @mat-datetimepicker/core\n```\nAnd for the moment adapter:\n```\nyarn install @angular/material-moment-adapter\nyarn install @mat-datetimepicker/moment\n``` \n\n### Performing a local build\n```\nyarn install\nyarn build\n``` \n\n### Using the local build in some project\n```\ncd my-project\n``` \nAdd the dependencies to your `package.json`:\n```\n\"dependencies\": {\n \"@mat-datetimepicker/core\": \"2.0.0\",\n \"@mat-datetimepicker/moment\": \"2.0.0\",\n}\n```\nLink the local built modules:\n```\nyarn link \"@mat-datetimepicker/core\"\nyarn link \"@mat-datetimepicker/moment\"\n``` \n\n### Import & configuration\nBasically the same way the @angular/material datepicker is configured and imported.\n\n```\nimports: [\n ...\n MatDatepickerModule,\n // use this if you want to use native javascript dates and INTL API if available\n // MatNativeDatetimeModule,\n MatMomentDatetimeModule,\n MatDatetimepickerModule\n]\n```\n\n@see [src/app/app.module.ts](src/app/app.module.ts)\n\n### Usage\n```\n
\n \n Start DateTime\n \n \n \n \n
\n```\n### Theming\n```\n@import '~@mat-datetimepicker/core/datetimepicker/datetimepicker-theme.scss';\n\n// Using the $theme variable from the pre-built theme you can call the theming function\n@include mat-datetimepicker-theme($theme);\n```\n@see [src/styles.scss](src/styles.scss)\n\n", - "readmeFilename": "README.md", - "description": "This is the main branch for @angular/material 6.x.", - "bugs": { - "url": "https://github.com/kuhnroyal/mat-datetimepicker/issues" - }, - "homepage": "https://github.com/kuhnroyal/mat-datetimepicker#readme", - "_id": "@mat-datetimepicker/core@2.0.1", - "_requested": { - "type": "version", - "registry": true, - "raw": "@mat-datetimepicker/core@2.0.1", - "name": "@mat-datetimepicker/core", - "escapedName": "@mat-datetimepicker%2fcore", - "scope": "@mat-datetimepicker", - "rawSpec": "2.0.1", - "saveSpec": "[Circular]", - "fetchSpec": "2.0.1" - }, - "_spec": "2.0.1", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "@mat-datetimepicker/core@2.0.1", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "devDependencies": {}, - "optionalDependencies": {}, - "_dependencies": { - "tslib": "^1.9.0" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/@mat-datetimepicker/core", - "error": "[Circular]", - "extraneous": false, - "peerMissing": [ - { - "requiredBy": "@mat-datetimepicker/moment@2.0.1", - "requires": "@mat-datetimepicker/core@2.0.0" - } - ] - }, - "peerMissing": true - }, - "@mat-datetimepicker/moment": { - "version": "2.0.1", - "from": "@mat-datetimepicker/moment@2.0.1", - "resolved": "https://registry.npmjs.org/@mat-datetimepicker/moment/-/moment-2.0.1.tgz" - }, - "@ngrx/effects": { - "version": "6.1.2", - "from": "@ngrx/effects@6.1.2", - "resolved": "https://registry.npmjs.org/@ngrx/effects/-/effects-6.1.2.tgz" - }, - "@ngrx/router-store": { - "version": "6.1.2", - "from": "@ngrx/router-store@6.1.2", - "resolved": "https://registry.npmjs.org/@ngrx/router-store/-/router-store-6.1.2.tgz" - }, - "@ngrx/store": { - "version": "6.1.2", - "from": "@ngrx/store@6.1.2", - "resolved": "https://registry.npmjs.org/@ngrx/store/-/store-6.1.2.tgz" - }, - "@ngrx/store-devtools": { - "version": "6.1.2", - "from": "@ngrx/store-devtools@6.1.2", - "resolved": "https://registry.npmjs.org/@ngrx/store-devtools/-/store-devtools-6.1.2.tgz" - }, - "@ngx-translate/core": { - "version": "10.0.2", - "from": "@ngx-translate/core@10.0.2", - "resolved": "https://registry.npmjs.org/@ngx-translate/core/-/core-10.0.2.tgz" - }, - "alfresco-js-api": { - "required": { - "_args": [ - [ - "alfresco-js-api@2.6.1", - "/Users/dvuika/github/alfresco-content-app" - ], - [ - "alfresco-js-api@2.6.1", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "_from": "alfresco-js-api@2.6.1", - "_id": "alfresco-js-api@2.6.1", - "_integrity": "sha512-E1maHlxlFS3DAmYWG9ueerMWgrcbJSVFO52Bfk2XGx3atEnH3iBFuG0ZczfCJCGIbtv22VliR5qQ90Cufuzhkw==", - "_location": "/alfresco-js-api", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "alfresco-js-api@2.6.1", - "name": "alfresco-js-api", - "escapedName": "alfresco-js-api", - "rawSpec": "2.6.1", - "saveSpec": "[Circular]", - "fetchSpec": "2.6.1" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/alfresco-js-api/-/alfresco-js-api-2.6.1.tgz", - "_spec": "2.6.1", - "_where": "/Users/dvuika/github/alfresco-content-app", - "author": { - "name": "Alfresco Software, Ltd." - }, - "bugs": { - "url": "https://github.com/Alfresco/alfresco-js-api/issues" - }, - "contributors": [ - { - "name": "Will Abson", - "email": "will.abson@alfresco.com" - }, - { - "name": "Eugenio Romano", - "email": "eugenio.romano@alfresco.com" - }, - { - "name": "Denys Vuika", - "email": "denys.vuika@gmail.com" - }, - { - "name": "Mario Romano", - "email": "mario.romano83@gmail.com" - } - ], - "dependencies": { - "event-emitter": { - "name": "event-emitter", - "version": "0.3.4", - "description": "Environment agnostic event emitter", - "author": { - "name": "Mariusz Nowak", - "email": "medyk@medikoo.com", - "url": "http://www.medikoo.com/" - }, - "keywords": [ - "event", - "events", - "trigger", - "observer", - "listener", - "emitter", - "pubsub" - ], - "repository": { - "type": "git", - "url": "git://github.com/medikoo/event-emitter.git" - }, - "dependencies": { - "d": { - "name": "d", - "version": "0.1.1", - "description": "Property descriptor factory", - "author": { - "name": "Mariusz Nowak", - "email": "medyk@medikoo.com", - "url": "http://www.medikoo.com/" - }, - "scripts": { - "test": "node node_modules/tad/bin/tad" - }, - "repository": { - "type": "git", - "url": "git://github.com/medikoo/d.git" - }, - "keywords": [ - "descriptor", - "es", - "ecmascript", - "ecma", - "property", - "descriptors", - "meta", - "properties" - ], - "dependencies": { - "es5-ext": { - "name": "es5-ext", - "version": "0.10.45", - "description": "ECMAScript extensions and shims", - "author": { - "name": "Mariusz Nowak", - "email": "medyk@medikoo.com", - "url": "http://www.medikoo.com/" - }, - "keywords": [ - "ecmascript", - "ecmascript5", - "ecmascript6", - "es5", - "es6", - "extensions", - "ext", - "addons", - "extras", - "harmony", - "javascript", - "polyfill", - "shim", - "util", - "utils", - "utilities" - ], - "repository": { - "type": "git", - "url": "git://github.com/medikoo/es5-ext.git" - }, - "dependencies": {}, - "devDependencies": { - "eslint": "^4.15", - "eslint-config-medikoo-es5": "^1.4.8", - "tad": "~0.2.7" - }, - "eslintConfig": { - "extends": "medikoo-es5", - "root": true, - "rules": { - "no-extend-native": "off" - } - }, - "scripts": { - "lint": "eslint --ignore-path=.gitignore .", - "test": "node ./node_modules/tad/bin/tad" - }, - "license": "ISC", - "_resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", - "_integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", - "_from": "es5-ext@0.10.45", - "readme": "[![Build status][nix-build-image]][nix-build-url]\n[![Windows status][win-build-image]][win-build-url]\n![Transpilation status][transpilation-image]\n[![npm version][npm-image]][npm-url]\n\n# es5-ext\n\n## ECMAScript 5 extensions\n\n### (with respect to ECMAScript 6 standard)\n\nShims for upcoming ES6 standard and other goodies implemented strictly with ECMAScript conventions in mind.\n\nIt's designed to be used in compliant ECMAScript 5 or ECMAScript 6 environments. Older environments are not supported, although most of the features should work with correct ECMAScript 5 shim on board.\n\nWhen used in ECMAScript 6 environment, native implementation (if valid) takes precedence over shims.\n\n### Installation\n\n $ npm install es5-ext\n\nTo port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)\n\n### Usage\n\n#### ECMAScript 6 features\n\nYou can force ES6 features to be implemented in your environment, e.g. following will assign `from` function to `Array` (only if it's not implemented already).\n\n```javascript\nrequire(\"es5-ext/array/from/implement\");\nArray.from(\"foo\"); // ['f', 'o', 'o']\n```\n\nYou can also access shims directly, without fixing native objects. Following will return native `Array.from` if it's available and fallback to shim if it's not.\n\n```javascript\nvar aFrom = require(\"es5-ext/array/from\");\naFrom(\"foo\"); // ['f', 'o', 'o']\n```\n\nIf you want to use shim unconditionally (even if native implementation exists) do:\n\n```javascript\nvar aFrom = require(\"es5-ext/array/from/shim\");\naFrom(\"foo\"); // ['f', 'o', 'o']\n```\n\n##### List of ES6 shims\n\nIt's about properties introduced with ES6 and those that have been updated in new spec.\n\n* `Array.from` -> `require('es5-ext/array/from')`\n* `Array.of` -> `require('es5-ext/array/of')`\n* `Array.prototype.concat` -> `require('es5-ext/array/#/concat')`\n* `Array.prototype.copyWithin` -> `require('es5-ext/array/#/copy-within')`\n* `Array.prototype.entries` -> `require('es5-ext/array/#/entries')`\n* `Array.prototype.fill` -> `require('es5-ext/array/#/fill')`\n* `Array.prototype.filter` -> `require('es5-ext/array/#/filter')`\n* `Array.prototype.find` -> `require('es5-ext/array/#/find')`\n* `Array.prototype.findIndex` -> `require('es5-ext/array/#/find-index')`\n* `Array.prototype.keys` -> `require('es5-ext/array/#/keys')`\n* `Array.prototype.map` -> `require('es5-ext/array/#/map')`\n* `Array.prototype.slice` -> `require('es5-ext/array/#/slice')`\n* `Array.prototype.splice` -> `require('es5-ext/array/#/splice')`\n* `Array.prototype.values` -> `require('es5-ext/array/#/values')`\n* `Array.prototype[@@iterator]` -> `require('es5-ext/array/#/@@iterator')`\n* `Math.acosh` -> `require('es5-ext/math/acosh')`\n* `Math.asinh` -> `require('es5-ext/math/asinh')`\n* `Math.atanh` -> `require('es5-ext/math/atanh')`\n* `Math.cbrt` -> `require('es5-ext/math/cbrt')`\n* `Math.clz32` -> `require('es5-ext/math/clz32')`\n* `Math.cosh` -> `require('es5-ext/math/cosh')`\n* `Math.exmp1` -> `require('es5-ext/math/expm1')`\n* `Math.fround` -> `require('es5-ext/math/fround')`\n* `Math.hypot` -> `require('es5-ext/math/hypot')`\n* `Math.imul` -> `require('es5-ext/math/imul')`\n* `Math.log1p` -> `require('es5-ext/math/log1p')`\n* `Math.log2` -> `require('es5-ext/math/log2')`\n* `Math.log10` -> `require('es5-ext/math/log10')`\n* `Math.sign` -> `require('es5-ext/math/sign')`\n* `Math.signh` -> `require('es5-ext/math/signh')`\n* `Math.tanh` -> `require('es5-ext/math/tanh')`\n* `Math.trunc` -> `require('es5-ext/math/trunc')`\n* `Number.EPSILON` -> `require('es5-ext/number/epsilon')`\n* `Number.MAX_SAFE_INTEGER` -> `require('es5-ext/number/max-safe-integer')`\n* `Number.MIN_SAFE_INTEGER` -> `require('es5-ext/number/min-safe-integer')`\n* `Number.isFinite` -> `require('es5-ext/number/is-finite')`\n* `Number.isInteger` -> `require('es5-ext/number/is-integer')`\n* `Number.isNaN` -> `require('es5-ext/number/is-nan')`\n* `Number.isSafeInteger` -> `require('es5-ext/number/is-safe-integer')`\n* `Object.assign` -> `require('es5-ext/object/assign')`\n* `Object.keys` -> `require('es5-ext/object/keys')`\n* `Object.setPrototypeOf` -> `require('es5-ext/object/set-prototype-of')`\n* `RegExp.prototype.match` -> `require('es5-ext/reg-exp/#/match')`\n* `RegExp.prototype.replace` -> `require('es5-ext/reg-exp/#/replace')`\n* `RegExp.prototype.search` -> `require('es5-ext/reg-exp/#/search')`\n* `RegExp.prototype.split` -> `require('es5-ext/reg-exp/#/split')`\n* `RegExp.prototype.sticky` -> Implement with `require('es5-ext/reg-exp/#/sticky/implement')`, use as function with `require('es5-ext/reg-exp/#/is-sticky')`\n* `RegExp.prototype.unicode` -> Implement with `require('es5-ext/reg-exp/#/unicode/implement')`, use as function with `require('es5-ext/reg-exp/#/is-unicode')`\n* `String.fromCodePoint` -> `require('es5-ext/string/from-code-point')`\n* `String.raw` -> `require('es5-ext/string/raw')`\n* `String.prototype.codePointAt` -> `require('es5-ext/string/#/code-point-at')`\n* `String.prototype.contains` -> `require('es5-ext/string/#/contains')`\n* `String.prototype.endsWith` -> `require('es5-ext/string/#/ends-with')`\n* `String.prototype.normalize` -> `require('es5-ext/string/#/normalize')`\n* `String.prototype.repeat` -> `require('es5-ext/string/#/repeat')`\n* `String.prototype.startsWith` -> `require('es5-ext/string/#/starts-with')`\n* `String.prototype[@@iterator]` -> `require('es5-ext/string/#/@@iterator')`\n\n#### Non ECMAScript standard features\n\n**es5-ext** provides also other utils, and implements them as if they were proposed for a standard. It mostly offers methods (not functions) which can directly be assigned to native prototypes:\n\n```javascript\nObject.defineProperty(Function.prototype, \"partial\", {\n\tvalue: require(\"es5-ext/function/#/partial\"),\n\tconfigurable: true,\n\tenumerable: false,\n\twritable: true\n});\nObject.defineProperty(Array.prototype, \"flatten\", {\n\tvalue: require(\"es5-ext/array/#/flatten\"),\n\tconfigurable: true,\n\tenumerable: false,\n\twritable: true\n});\nObject.defineProperty(String.prototype, \"capitalize\", {\n\tvalue: require(\"es5-ext/string/#/capitalize\"),\n\tconfigurable: true,\n\tenumerable: false,\n\twritable: true\n});\n```\n\nSee [es5-extend](https://github.com/wookieb/es5-extend#es5-extend), a great utility that automatically will extend natives for you.\n\n**Important:** Remember to **not** extend natives in scope of generic reusable packages (e.g. ones you intend to publish to npm). Extending natives is fine **only** if you're the _owner_ of the global scope, so e.g. in final project you lead development of.\n\nWhen you're in situation when native extensions are not good idea, then you should use methods indirectly:\n\n```javascript\nvar flatten = require(\"es5-ext/array/#/flatten\");\n\nflatten.call([1, [2, [3, 4]]]); // [1, 2, 3, 4]\n```\n\nfor better convenience you can turn methods into functions:\n\n```javascript\nvar call = Function.prototype.call;\nvar flatten = call.bind(require(\"es5-ext/array/#/flatten\"));\n\nflatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]\n```\n\nYou can configure custom toolkit (like [underscorejs](http://underscorejs.org/)), and use it throughout your application\n\n```javascript\nvar util = {};\nutil.partial = call.bind(require(\"es5-ext/function/#/partial\"));\nutil.flatten = call.bind(require(\"es5-ext/array/#/flatten\"));\nutil.startsWith = call.bind(require(\"es5-ext/string/#/starts-with\"));\n\nutil.flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]\n```\n\nAs with native ones most methods are generic and can be run on any type of object.\n\n## API\n\n### Global extensions\n\n#### global _(es5-ext/global)_\n\nObject that represents global scope\n\n### Array Constructor extensions\n\n#### from(arrayLike[, mapFn[, thisArg]]) _(es5-ext/array/from)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from). \nReturns array representation of _iterable_ or _arrayLike_. If _arrayLike_ is an instance of array, its copy is returned.\n\n#### generate([length[, …fill]]) _(es5-ext/array/generate)_\n\nGenerate an array of pre-given _length_ built of repeated arguments.\n\n#### isPlainArray(x) _(es5-ext/array/is-plain-array)_\n\nReturns true if object is plain array (not instance of one of the Array's extensions).\n\n#### of([…items]) _(es5-ext/array/of)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.of). \nCreate an array from given arguments.\n\n#### toArray(obj) _(es5-ext/array/to-array)_\n\nReturns array representation of `obj`. If `obj` is already an array, `obj` is returned back.\n\n#### validArray(obj) _(es5-ext/array/valid-array)_\n\nReturns `obj` if it's an array, otherwise throws `TypeError`\n\n### Array Prototype extensions\n\n#### arr.binarySearch(compareFn) _(es5-ext/array/#/binary-search)_\n\nIn **sorted** list search for index of item for which _compareFn_ returns value closest to _0_. \nIt's variant of binary search algorithm\n\n#### arr.clear() _(es5-ext/array/#/clear)_\n\nClears the array\n\n#### arr.compact() _(es5-ext/array/#/compact)_\n\nReturns a copy of the context with all non-values (`null` or `undefined`) removed.\n\n#### arr.concat() _(es5-ext/array/#/concat)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.concat). \nES6's version of `concat`. Supports `isConcatSpreadable` symbol, and returns array of same type as the context.\n\n#### arr.contains(searchElement[, position]) _(es5-ext/array/#/contains)_\n\nWhether list contains the given value.\n\n#### arr.copyWithin(target, start[, end]) _(es5-ext/array/#/copy-within)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.copywithin).\n\n#### arr.diff(other) _(es5-ext/array/#/diff)_\n\nReturns the array of elements that are present in context list but not present in other list.\n\n#### arr.eIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-index-of)_\n\n_egal_ version of `indexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision\n\n#### arr.eLastIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-last-index-of)_\n\n_egal_ version of `lastIndexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision\n\n#### arr.entries() _(es5-ext/array/#/entries)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.entries). \nReturns iterator object, which traverses the array. Each value is represented with an array, where first value is an index and second is corresponding to index value.\n\n#### arr.exclusion([…lists]]) _(es5-ext/array/#/exclusion)_\n\nReturns the array of elements that are found only in one of the lists (either context list or list provided in arguments).\n\n#### arr.fill(value[, start, end]) _(es5-ext/array/#/fill)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.fill).\n\n#### arr.filter(callback[, thisArg]) _(es5-ext/array/#/filter)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.filter). \nES6's version of `filter`, returns array of same type as the context.\n\n#### arr.find(predicate[, thisArg]) _(es5-ext/array/#/find)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.find). \nReturn first element for which given function returns true\n\n#### arr.findIndex(predicate[, thisArg]) _(es5-ext/array/#/find-index)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.findindex). \nReturn first index for which given function returns true\n\n#### arr.first() _(es5-ext/array/#/first)_\n\nReturns value for first defined index\n\n#### arr.firstIndex() _(es5-ext/array/#/first-index)_\n\nReturns first declared index of the array\n\n#### arr.flatten() _(es5-ext/array/#/flatten)_\n\nReturns flattened version of the array\n\n#### arr.forEachRight(cb[, thisArg]) _(es5-ext/array/#/for-each-right)_\n\n`forEach` starting from last element\n\n#### arr.group(cb[, thisArg]) _(es5-ext/array/#/group)_\n\nGroup list elements by value returned by _cb_ function\n\n#### arr.indexesOf(searchElement[, fromIndex]) _(es5-ext/array/#/indexes-of)_\n\nReturns array of all indexes of given value\n\n#### arr.intersection([…lists]) _(es5-ext/array/#/intersection)_\n\nComputes the array of values that are the intersection of all lists (context list and lists given in arguments)\n\n#### arr.isCopy(other) _(es5-ext/array/#/is-copy)_\n\nReturns true if both context and _other_ lists have same content\n\n#### arr.isUniq() _(es5-ext/array/#/is-uniq)_\n\nReturns true if all values in array are unique\n\n#### arr.keys() _(es5-ext/array/#/keys)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.keys). \nReturns iterator object, which traverses all array indexes.\n\n#### arr.last() _(es5-ext/array/#/last)_\n\nReturns value of last defined index\n\n#### arr.lastIndex() _(es5-ext/array/#/last)_\n\nReturns last defined index of the array\n\n#### arr.map(callback[, thisArg]) _(es5-ext/array/#/map)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.map). \nES6's version of `map`, returns array of same type as the context.\n\n#### arr.remove(value[, …valuen]) _(es5-ext/array/#/remove)_\n\nRemove values from the array\n\n#### arr.separate(sep) _(es5-ext/array/#/separate)_\n\nReturns array with items separated with `sep` value\n\n#### arr.slice(callback[, thisArg]) _(es5-ext/array/#/slice)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.slice). \nES6's version of `slice`, returns array of same type as the context.\n\n#### arr.someRight(cb[, thisArg]) _(es5-ext/array/#/someRight)_\n\n`some` starting from last element\n\n#### arr.splice(callback[, thisArg]) _(es5-ext/array/#/splice)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.splice). \nES6's version of `splice`, returns array of same type as the context.\n\n#### arr.uniq() _(es5-ext/array/#/uniq)_\n\nReturns duplicate-free version of the array\n\n#### arr.values() _(es5-ext/array/#/values)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.values). \nReturns iterator object which traverses all array values.\n\n#### arr[@@iterator] _(es5-ext/array/#/@@iterator)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype-@@iterator). \nReturns iterator object which traverses all array values.\n\n### Boolean Constructor extensions\n\n#### isBoolean(x) _(es5-ext/boolean/is-boolean)_\n\nWhether value is boolean\n\n### Date Constructor extensions\n\n#### isDate(x) _(es5-ext/date/is-date)_\n\nWhether value is date instance\n\n#### validDate(x) _(es5-ext/date/valid-date)_\n\nIf given object is not date throw TypeError in other case return it.\n\n### Date Prototype extensions\n\n#### date.copy(date) _(es5-ext/date/#/copy)_\n\nReturns a copy of the date object\n\n#### date.daysInMonth() _(es5-ext/date/#/days-in-month)_\n\nReturns number of days of date's month\n\n#### date.floorDay() _(es5-ext/date/#/floor-day)_\n\nSets the date time to 00:00:00.000\n\n#### date.floorMonth() _(es5-ext/date/#/floor-month)_\n\nSets date day to 1 and date time to 00:00:00.000\n\n#### date.floorYear() _(es5-ext/date/#/floor-year)_\n\nSets date month to 0, day to 1 and date time to 00:00:00.000\n\n#### date.format(pattern) _(es5-ext/date/#/format)_\n\nFormats date up to given string. Supported patterns:\n\n* `%Y` - Year with century, 1999, 2003\n* `%y` - Year without century, 99, 03\n* `%m` - Month, 01..12\n* `%d` - Day of the month 01..31\n* `%H` - Hour (24-hour clock), 00..23\n* `%M` - Minute, 00..59\n* `%S` - Second, 00..59\n* `%L` - Milliseconds, 000..999\n\n### Error Constructor extensions\n\n#### custom(message/_, code, ext_/) _(es5-ext/error/custom)_\n\nCreates custom error object, optinally extended with `code` and other extension properties (provided with `ext` object)\n\n#### isError(x) _(es5-ext/error/is-error)_\n\nWhether value is an error (instance of `Error`).\n\n#### validError(x) _(es5-ext/error/valid-error)_\n\nIf given object is not error throw TypeError in other case return it.\n\n### Error Prototype extensions\n\n#### err.throw() _(es5-ext/error/#/throw)_\n\nThrows error\n\n### Function Constructor extensions\n\nSome of the functions were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele\n\n#### constant(x) _(es5-ext/function/constant)_\n\nReturns a constant function that returns pregiven argument\n\n_k(x)(y) =def x_\n\n#### identity(x) _(es5-ext/function/identity)_\n\nIdentity function. Returns first argument\n\n_i(x) =def x_\n\n#### invoke(name[, …args]) _(es5-ext/function/invoke)_\n\nReturns a function that takes an object as an argument, and applies object's\n_name_ method to arguments. \n_name_ can be name of the method or method itself.\n\n_invoke(name, …args)(object, …args2) =def object\\[name\\]\\(…args, …args2\\)_\n\n#### isArguments(x) _(es5-ext/function/is-arguments)_\n\nWhether value is arguments object\n\n#### isFunction(arg) _(es5-ext/function/is-function)_\n\nWhether value is instance of function\n\n#### noop() _(es5-ext/function/noop)_\n\nNo operation function\n\n#### pluck(name) _(es5-ext/function/pluck)_\n\nReturns a function that takes an object, and returns the value of its _name_\nproperty\n\n_pluck(name)(obj) =def obj[name]_\n\n#### validFunction(arg) _(es5-ext/function/valid-function)_\n\nIf given object is not function throw TypeError in other case return it.\n\n### Function Prototype extensions\n\nSome of the methods were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele\n\n#### fn.compose([…fns]) _(es5-ext/function/#/compose)_\n\nApplies the functions in reverse argument-list order.\n\n_f1.compose(f2, f3, f4)(…args) =def f1(f2(f3(f4(…arg))))_\n\n#### fn.copy() _(es5-ext/function/#/copy)_\n\nProduces copy of given function\n\n#### fn.curry([n]) _(es5-ext/function/#/curry)_\n\nInvoking the function returned by this function only _n_ arguments are passed to the underlying function. If the underlying function is not saturated, the result is a function that passes all its arguments to the underlying function. \nIf _n_ is not provided then it defaults to context function length\n\n_f.curry(4)(arg1, arg2)(arg3)(arg4) =def f(arg1, args2, arg3, arg4)_\n\n#### fn.lock([…args]) _(es5-ext/function/#/lock)_\n\nReturns a function that applies the underlying function to _args_, and ignores its own arguments.\n\n_f.lock(…args)(…args2) =def f(…args)_\n\n_Named after it's counterpart in Google Closure_\n\n#### fn.not() _(es5-ext/function/#/not)_\n\nReturns a function that returns boolean negation of value returned by underlying function.\n\n_f.not()(…args) =def !f(…args)_\n\n#### fn.partial([…args]) _(es5-ext/function/#/partial)_\n\nReturns a function that when called will behave like context function called with initially passed arguments. If more arguments are suplilied, they are appended to initial args.\n\n_f.partial(…args1)(…args2) =def f(…args1, …args2)_\n\n#### fn.spread() _(es5-ext/function/#/spread)_\n\nReturns a function that applies underlying function with first list argument\n\n_f.match()(args) =def f.apply(null, args)_\n\n#### fn.toStringTokens() _(es5-ext/function/#/to-string-tokens)_\n\nSerializes function into two (arguments and body) string tokens. Result is plain object with `args` and `body` properties.\n\n### Math extensions\n\n#### acosh(x) _(es5-ext/math/acosh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.acosh).\n\n#### asinh(x) _(es5-ext/math/asinh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.asinh).\n\n#### atanh(x) _(es5-ext/math/atanh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.atanh).\n\n#### cbrt(x) _(es5-ext/math/cbrt)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cbrt).\n\n#### clz32(x) _(es5-ext/math/clz32)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.clz32).\n\n#### cosh(x) _(es5-ext/math/cosh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cosh).\n\n#### expm1(x) _(es5-ext/math/expm1)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.expm1).\n\n#### fround(x) _(es5-ext/math/fround)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround).\n\n#### hypot([…values]) _(es5-ext/math/hypot)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot).\n\n#### imul(x, y) _(es5-ext/math/imul)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.imul).\n\n#### log1p(x) _(es5-ext/math/log1p)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log1p).\n\n#### log2(x) _(es5-ext/math/log2)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log2).\n\n#### log10(x) _(es5-ext/math/log10)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log10).\n\n#### sign(x) _(es5-ext/math/sign)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sign).\n\n#### sinh(x) _(es5-ext/math/sinh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sinh).\n\n#### tanh(x) _(es5-ext/math/tanh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.tanh).\n\n#### trunc(x) _(es5-ext/math/trunc)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc).\n\n### Number Constructor extensions\n\n#### EPSILON _(es5-ext/number/epsilon)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.epsilon).\n\nThe difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately 2.2204460492503130808472633361816 x 10-16.\n\n#### isFinite(x) _(es5-ext/number/is-finite)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite). \nWhether value is finite. Differs from global isNaN that it doesn't do type coercion.\n\n#### isInteger(x) _(es5-ext/number/is-integer)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger). \nWhether value is integer.\n\n#### isNaN(x) _(es5-ext/number/is-nan)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan). \nWhether value is NaN. Differs from global isNaN that it doesn't do type coercion.\n\n#### isNumber(x) _(es5-ext/number/is-number)_\n\nWhether given value is number\n\n#### isSafeInteger(x) _(es5-ext/number/is-safe-integer)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.issafeinteger).\n\n#### MAX*SAFE_INTEGER *(es5-ext/number/max-safe-integer)\\_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.maxsafeinteger). \nThe value of Number.MAX_SAFE_INTEGER is 9007199254740991.\n\n#### MIN*SAFE_INTEGER *(es5-ext/number/min-safe-integer)\\_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.minsafeinteger). \nThe value of Number.MIN_SAFE_INTEGER is -9007199254740991 (253-1).\n\n#### toInteger(x) _(es5-ext/number/to-integer)_\n\nConverts value to integer\n\n#### toPosInteger(x) _(es5-ext/number/to-pos-integer)_\n\nConverts value to positive integer. If provided value is less than 0, then 0 is returned\n\n#### toUint32(x) _(es5-ext/number/to-uint32)_\n\nConverts value to unsigned 32 bit integer. This type is used for array lengths.\nSee: http://www.2ality.com/2012/02/js-integers.html\n\n### Number Prototype extensions\n\n#### num.pad(length[, precision]) _(es5-ext/number/#/pad)_\n\nPad given number with zeros. Returns string\n\n### Object Constructor extensions\n\n#### assign(target, source[, …sourcen]) _(es5-ext/object/assign)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign). \nExtend _target_ by enumerable own properties of other objects. If properties are already set on target object, they will be overwritten.\n\n#### clear(obj) _(es5-ext/object/clear)_\n\nRemove all enumerable own properties of the object\n\n#### compact(obj) _(es5-ext/object/compact)_\n\nReturns copy of the object with all enumerable properties that have no falsy values\n\n#### compare(obj1, obj2) _(es5-ext/object/compare)_\n\nUniversal cross-type compare function. To be used for e.g. array sort.\n\n#### copy(obj) _(es5-ext/object/copy)_\n\nReturns copy of the object with all enumerable properties.\n\n#### copyDeep(obj) _(es5-ext/object/copy-deep)_\n\nReturns deep copy of the object with all enumerable properties.\n\n#### count(obj) _(es5-ext/object/count)_\n\nCounts number of enumerable own properties on object\n\n#### create(obj[, properties]) _(es5-ext/object/create)_\n\n`Object.create` alternative that provides workaround for [V8 issue](http://code.google.com/p/v8/issues/detail?id=2804).\n\nWhen `null` is provided as a prototype, it's substituted with specially prepared object that derives from Object.prototype but has all Object.prototype properties shadowed with undefined.\n\nIt's quirky solution that allows us to have plain objects with no truthy properties but with turnable prototype.\n\nUse only for objects that you plan to switch prototypes of and be aware of limitations of this workaround.\n\n#### eq(x, y) _(es5-ext/object/eq)_\n\nWhether two values are equal, using [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.\n\n#### every(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/every)_\n\nAnalogous to Array.prototype.every. Returns true if every key-value pair in this object satisfies the provided testing function. \nOptionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### filter(obj, cb[, thisArg]) _(es5-ext/object/filter)_\n\nAnalogous to Array.prototype.filter. Returns new object with properites for which _cb_ function returned truthy value.\n\n#### firstKey(obj) _(es5-ext/object/first-key)_\n\nReturns first enumerable key of the object, as keys are unordered by specification, it can be any key of an object.\n\n#### flatten(obj) _(es5-ext/object/flatten)_\n\nReturns new object, with flatten properties of input object\n\n_flatten({ a: { b: 1 }, c: { d: 1 } }) =def { b: 1, d: 1 }_\n\n#### forEach(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/for-each)_\n\nAnalogous to Array.prototype.forEach. Calls a function for each key-value pair found in object\nOptionally _compareFn_ can be provided which assures that properties are iterated in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### getPropertyNames() _(es5-ext/object/get-property-names)_\n\nGet all (not just own) property names of the object\n\n#### is(x, y) _(es5-ext/object/is)_\n\nWhether two values are equal, using [_SameValue_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.\n\n#### isArrayLike(x) _(es5-ext/object/is-array-like)_\n\nWhether object is array-like object\n\n#### isCopy(x, y) _(es5-ext/object/is-copy)_\n\nTwo values are considered a copy of same value when all of their own enumerable properties have same values.\n\n#### isCopyDeep(x, y) _(es5-ext/object/is-copy-deep)_\n\nDeep comparision of objects\n\n#### isEmpty(obj) _(es5-ext/object/is-empty)_\n\nTrue if object doesn't have any own enumerable property\n\n#### isObject(arg) _(es5-ext/object/is-object)_\n\nWhether value is not primitive\n\n#### isPlainObject(arg) _(es5-ext/object/is-plain-object)_\n\nWhether object is plain object, its protototype should be Object.prototype and it cannot be host object.\n\n#### keyOf(obj, searchValue) _(es5-ext/object/key-of)_\n\nSearch object for value\n\n#### keys(obj) _(es5-ext/object/keys)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys). \nES6's version of `keys`, doesn't throw on primitive input\n\n#### map(obj, cb[, thisArg]) _(es5-ext/object/map)_\n\nAnalogous to Array.prototype.map. Creates a new object with properties which values are results of calling a provided function on every key-value pair in this object.\n\n#### mapKeys(obj, cb[, thisArg]) _(es5-ext/object/map-keys)_\n\nCreate new object with same values, but remapped keys\n\n#### mixin(target, source) _(es5-ext/object/mixin)_\n\nExtend _target_ by all own properties of other objects. Properties found in both objects will be overwritten (unless they're not configurable and cannot be overwritten).\n_It was for a moment part of ECMAScript 6 draft._\n\n#### mixinPrototypes(target, …source]) _(es5-ext/object/mixin-prototypes)_\n\nExtends _target_, with all source and source's prototype properties.\nUseful as an alternative for `setPrototypeOf` in environments in which it cannot be shimmed (no `__proto__` support).\n\n#### normalizeOptions(options) _(es5-ext/object/normalize-options)_\n\nNormalizes options object into flat plain object.\n\nUseful for functions in which we either need to keep options object for future reference or need to modify it for internal use.\n\n* It never returns input `options` object back (always a copy is created)\n* `options` can be undefined in such case empty plain object is returned.\n* Copies all enumerable properties found down prototype chain.\n\n#### primitiveSet([…names]) _(es5-ext/object/primitive-set)_\n\nCreates `null` prototype based plain object, and sets on it all property names provided in arguments to true.\n\n#### safeTraverse(obj[, …names]) _(es5-ext/object/safe-traverse)_\n\nSafe navigation of object properties. See http://wiki.ecmascript.org/doku.php?id=strawman:existential_operator\n\n#### serialize(value) _(es5-ext/object/serialize)_\n\nSerialize value into string. Differs from [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that it serializes also dates, functions and regular expresssions.\n\n#### setPrototypeOf(object, proto) _(es5-ext/object/set-prototype-of)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.setprototypeof). \nIf native version is not provided, it depends on existence of `__proto__` functionality, if it's missing, `null` instead of function is exposed.\n\n#### some(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/some)_\n\nAnalogous to Array.prototype.some Returns true if any key-value pair satisfies the provided\ntesting function. \nOptionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### toArray(obj[, cb[, thisArg[, compareFn]]]) _(es5-ext/object/to-array)_\n\nCreates an array of results of calling a provided function on every key-value pair in this object. \nOptionally _compareFn_ can be provided which assures that results are added in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### unserialize(str) _(es5-ext/object/unserialize)_\n\nUserializes value previously serialized with [serialize](#serializevalue-es5-extobjectserialize)\n\n#### validCallable(x) _(es5-ext/object/valid-callable)_\n\nIf given object is not callable throw TypeError in other case return it.\n\n#### validObject(x) _(es5-ext/object/valid-object)_\n\nThrows error if given value is not an object, otherwise it is returned.\n\n#### validValue(x) _(es5-ext/object/valid-value)_\n\nThrows error if given value is `null` or `undefined`, otherwise returns value.\n\n### RegExp Constructor extensions\n\n#### escape(str) _(es5-ext/reg-exp/escape)_\n\nEscapes string to be used in regular expression\n\n#### isRegExp(x) _(es5-ext/reg-exp/is-reg-exp)_\n\nWhether object is regular expression\n\n#### validRegExp(x) _(es5-ext/reg-exp/valid-reg-exp)_\n\nIf object is regular expression it is returned, otherwise TypeError is thrown.\n\n### RegExp Prototype extensions\n\n#### re.isSticky(x) _(es5-ext/reg-exp/#/is-sticky)_\n\nWhether regular expression has `sticky` flag.\n\nIt's to be used as counterpart to [regExp.sticky](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.sticky) if it's not implemented.\n\n#### re.isUnicode(x) _(es5-ext/reg-exp/#/is-unicode)_\n\nWhether regular expression has `unicode` flag.\n\nIt's to be used as counterpart to [regExp.unicode](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.unicode) if it's not implemented.\n\n#### re.match(string) _(es5-ext/reg-exp/#/match)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.match).\n\n#### re.replace(string, replaceValue) _(es5-ext/reg-exp/#/replace)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.replace).\n\n#### re.search(string) _(es5-ext/reg-exp/#/search)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.search).\n\n#### re.split(string) _(es5-ext/reg-exp/#/search)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.split).\n\n#### re.sticky _(es5-ext/reg-exp/#/sticky/implement)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.sticky). \nIt's a getter, so only `implement` and `is-implemented` modules are provided.\n\n#### re.unicode _(es5-ext/reg-exp/#/unicode/implement)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.unicode). \nIt's a getter, so only `implement` and `is-implemented` modules are provided.\n\n### String Constructor extensions\n\n#### formatMethod(fMap) _(es5-ext/string/format-method)_\n\nCreates format method. It's used e.g. to create `Date.prototype.format` method\n\n#### fromCodePoint([…codePoints]) _(es5-ext/string/from-code-point)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint)\n\n#### isString(x) _(es5-ext/string/is-string)_\n\nWhether object is string\n\n#### randomUniq() _(es5-ext/string/random-uniq)_\n\nReturns randomly generated id, with guarantee of local uniqueness (no same id will be returned twice)\n\n#### raw(callSite[, …substitutions]) _(es5-ext/string/raw)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.raw)\n\n### String Prototype extensions\n\n#### str.at(pos) _(es5-ext/string/#/at)_\n\n_Proposed for ECMAScript 6/7 standard, but not (yet) in a draft_\n\nReturns a string at given position in Unicode-safe manner.\nBased on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.at).\n\n#### str.camelToHyphen() _(es5-ext/string/#/camel-to-hyphen)_\n\nConvert camelCase string to hyphen separated, e.g. one-two-three -> oneTwoThree.\nUseful when converting names from js property convention into filename convention.\n\n#### str.capitalize() _(es5-ext/string/#/capitalize)_\n\nCapitalize first character of a string\n\n#### str.caseInsensitiveCompare(str) _(es5-ext/string/#/case-insensitive-compare)_\n\nCase insensitive compare\n\n#### str.codePointAt(pos) _(es5-ext/string/#/code-point-at)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.codepointat)\n\nBased on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.codePointAt).\n\n#### str.contains(searchString[, position]) _(es5-ext/string/#/contains)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains)\n\nWhether string contains given string.\n\n#### str.endsWith(searchString[, endPosition]) _(es5-ext/string/#/ends-with)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith). \nWhether strings ends with given string\n\n#### str.hyphenToCamel() _(es5-ext/string/#/hyphen-to-camel)_\n\nConvert hyphen separated string to camelCase, e.g. one-two-three -> oneTwoThree.\nUseful when converting names from filename convention to js property name convention.\n\n#### str.indent(str[, count]) _(es5-ext/string/#/indent)_\n\nIndents each line with provided _str_ (if _count_ given then _str_ is repeated _count_ times).\n\n#### str.last() _(es5-ext/string/#/last)_\n\nReturn last character\n\n#### str.normalize([form]) _(es5-ext/string/#/normalize)_\n\n[_Introduced with ECMAScript 6_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize). \nReturns the Unicode Normalization Form of a given string. \nBased on Matsuza's version. Code used for integrated shim can be found at [github.com/walling/unorm](https://github.com/walling/unorm/blob/master/lib/unorm.js)\n\n#### str.pad(fill[, length]) _(es5-ext/string/#/pad)_\n\nPad string with _fill_.\nIf _length_ si given than _fill_ is reapated _length_ times.\nIf _length_ is negative then pad is applied from right.\n\n#### str.repeat(n) _(es5-ext/string/#/repeat)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.repeat). \nRepeat given string _n_ times\n\n#### str.plainReplace(search, replace) _(es5-ext/string/#/plain-replace)_\n\nSimple `replace` version. Doesn't support regular expressions. Replaces just first occurrence of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).\n\n#### str.plainReplaceAll(search, replace) _(es5-ext/string/#/plain-replace-all)_\n\nSimple `replace` version. Doesn't support regular expressions. Replaces all occurrences of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).\n\n#### str.startsWith(searchString[, position]) _(es5-ext/string/#/starts-with)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.startswith). \nWhether strings starts with given string\n\n#### str[@@iterator] _(es5-ext/string/#/@@iterator)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype-@@iterator). \nReturns iterator object which traverses all string characters (with respect to unicode symbols)\n\n### Tests\n\n $ npm test\n\n[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/es5-ext/branches/master/shields_badge.svg\n[nix-build-url]: https://semaphoreci.com/medikoo-org/es5-ext\n[win-build-image]: https://ci.appveyor.com/api/projects/status/3jox67ksw3p8hkwh?svg=true\n[win-build-url]: https://ci.appveyor.com/project/medikoo/es5-ext\n[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg\n[npm-image]: https://img.shields.io/npm/v/es5-ext.svg\n[npm-url]: https://www.npmjs.com/package/es5-ext\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/medikoo/es5-ext/issues" - }, - "homepage": "https://github.com/medikoo/es5-ext#readme", - "_id": "es5-ext@0.10.45", - "_requested": { - "type": "version", - "registry": true, - "raw": "es5-ext@0.10.45", - "name": "es5-ext", - "escapedName": "es5-ext", - "rawSpec": "0.10.45", - "saveSpec": "[Circular]", - "fetchSpec": "0.10.45" - }, - "_spec": "0.10.45", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "es5-ext@0.10.45", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.1", - "next-tick": "1" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/es5-ext", - "error": "[Circular]", - "extraneous": false, - "_deduped": "es5-ext" - } - }, - "devDependencies": { - "tad": "~0.1.21" - }, - "license": "MIT", - "_resolved": "https://registry.npmjs.org/d/-/d-0.1.1.tgz", - "_integrity": "sha1-2hhMU10Y2O57oqoim5FACfrhEwk=", - "_from": "d@0.1.1", - "readme": "# D - Property descriptor factory\n\n_Originally derived from [es5-ext](https://github.com/medikoo/es5-ext) package._\n\nDefining properties with descriptors is very verbose:\n\n```javascript\nvar Account = function () {};\nObject.defineProperties(Account.prototype, {\n deposit: { value: function () {\n /* ... */\n }, configurable: true, enumerable: false, writable: true },\n whithdraw: { value: function () {\n /* ... */\n }, configurable: true, enumerable: false, writable: true },\n balance: { get: function () {\n /* ... */\n }, configurable: true, enumerable: false }\n});\n```\n\nD cuts that to:\n\n```javascript\nvar d = require('d');\n\nvar Account = function () {};\nObject.defineProperties(Account.prototype, {\n deposit: d(function () {\n /* ... */\n }),\n whithdraw: d(function () {\n /* ... */\n }),\n balance: d.gs(function () {\n /* ... */\n })\n});\n```\n\nBy default, created descriptor follow characteristics of native ES5 properties, and defines values as:\n\n```javascript\n{ configurable: true, enumerable: false, writable: true }\n```\n\nYou can overwrite it by preceding _value_ argument with instruction:\n```javascript\nd('c', value); // { configurable: true, enumerable: false, writable: false }\nd('ce', value); // { configurable: true, enumerable: true, writable: false }\nd('e', value); // { configurable: false, enumerable: true, writable: false }\n\n// Same way for get/set:\nd.gs('e', value); // { configurable: false, enumerable: true }\n```\n\n### Other utilities\n\n#### autoBind(obj, props) _(d/auto-bind)_\n\nDefine methods which will be automatically bound to its instances\n\n```javascript\nvar d = require('d');\nvar autoBind = require('d/auto-bind');\n\nvar Foo = function () { this._count = 0; };\nautoBind(Foo.prototype, {\n increment: d(function () { ++this._count; });\n});\n\nvar foo = new Foo();\n\n// Increment foo counter on each domEl click\ndomEl.addEventListener('click', foo.increment, false);\n```\n\n#### lazy(obj, props) _(d/lazy)_\n\nDefine lazy properties, which will be resolved on first access\n\n```javascript\nvar d = require('d');\nvar lazy = require('d/lazy');\n\nvar Foo = function () {};\nlazy(Foo.prototype, {\n items: d(function () { return []; })\n});\n\nvar foo = new Foo();\nfoo.items.push(1, 2); // foo.items array created\n```\n\n## Installation\n### NPM\n\nIn your project path:\n\n\t$ npm install d\n\n### Browser\n\nYou can easily bundle _D_ for browser with [modules-webmake](https://github.com/medikoo/modules-webmake)\n\n## Tests [![Build Status](https://travis-ci.org/medikoo/d.png)](https://travis-ci.org/medikoo/d)\n\n\t$ npm test\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/medikoo/d/issues" - }, - "homepage": "https://github.com/medikoo/d#readme", - "_id": "d@0.1.1", - "_requested": { - "type": "version", - "registry": true, - "raw": "d@0.1.1", - "name": "d", - "escapedName": "d", - "rawSpec": "0.1.1", - "saveSpec": "[Circular]", - "fetchSpec": "0.1.1" - }, - "_spec": "0.1.1", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "d@0.1.1", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": { - "es5-ext": "~0.10.2" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/d", - "error": "[Circular]", - "extraneous": false - }, - "es5-ext": { - "name": "es5-ext", - "version": "0.10.45", - "description": "ECMAScript extensions and shims", - "author": "[Circular]", - "keywords": "[Circular]", - "repository": "[Circular]", - "dependencies": { - "es6-iterator": { - "name": "es6-iterator", - "version": "2.0.3", - "description": "Iterator abstraction based on ES6 specification", - "author": { - "name": "Mariusz Nowak", - "email": "medyk@medikoo.com", - "url": "http://www.medikoo.com/" - }, - "keywords": [ - "iterator", - "array", - "list", - "set", - "map", - "generator" - ], - "repository": { - "type": "git", - "url": "git://github.com/medikoo/es6-iterator.git" - }, - "dependencies": { - "es5-ext": { - "name": "es5-ext", - "version": "0.10.45", - "description": "ECMAScript extensions and shims", - "author": "[Circular]", - "keywords": "[Circular]", - "repository": "[Circular]", - "dependencies": {}, - "devDependencies": "[Circular]", - "eslintConfig": "[Circular]", - "scripts": "[Circular]", - "license": "ISC", - "_resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", - "_integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", - "_from": "es5-ext@0.10.45", - "readme": "[![Build status][nix-build-image]][nix-build-url]\n[![Windows status][win-build-image]][win-build-url]\n![Transpilation status][transpilation-image]\n[![npm version][npm-image]][npm-url]\n\n# es5-ext\n\n## ECMAScript 5 extensions\n\n### (with respect to ECMAScript 6 standard)\n\nShims for upcoming ES6 standard and other goodies implemented strictly with ECMAScript conventions in mind.\n\nIt's designed to be used in compliant ECMAScript 5 or ECMAScript 6 environments. Older environments are not supported, although most of the features should work with correct ECMAScript 5 shim on board.\n\nWhen used in ECMAScript 6 environment, native implementation (if valid) takes precedence over shims.\n\n### Installation\n\n $ npm install es5-ext\n\nTo port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)\n\n### Usage\n\n#### ECMAScript 6 features\n\nYou can force ES6 features to be implemented in your environment, e.g. following will assign `from` function to `Array` (only if it's not implemented already).\n\n```javascript\nrequire(\"es5-ext/array/from/implement\");\nArray.from(\"foo\"); // ['f', 'o', 'o']\n```\n\nYou can also access shims directly, without fixing native objects. Following will return native `Array.from` if it's available and fallback to shim if it's not.\n\n```javascript\nvar aFrom = require(\"es5-ext/array/from\");\naFrom(\"foo\"); // ['f', 'o', 'o']\n```\n\nIf you want to use shim unconditionally (even if native implementation exists) do:\n\n```javascript\nvar aFrom = require(\"es5-ext/array/from/shim\");\naFrom(\"foo\"); // ['f', 'o', 'o']\n```\n\n##### List of ES6 shims\n\nIt's about properties introduced with ES6 and those that have been updated in new spec.\n\n* `Array.from` -> `require('es5-ext/array/from')`\n* `Array.of` -> `require('es5-ext/array/of')`\n* `Array.prototype.concat` -> `require('es5-ext/array/#/concat')`\n* `Array.prototype.copyWithin` -> `require('es5-ext/array/#/copy-within')`\n* `Array.prototype.entries` -> `require('es5-ext/array/#/entries')`\n* `Array.prototype.fill` -> `require('es5-ext/array/#/fill')`\n* `Array.prototype.filter` -> `require('es5-ext/array/#/filter')`\n* `Array.prototype.find` -> `require('es5-ext/array/#/find')`\n* `Array.prototype.findIndex` -> `require('es5-ext/array/#/find-index')`\n* `Array.prototype.keys` -> `require('es5-ext/array/#/keys')`\n* `Array.prototype.map` -> `require('es5-ext/array/#/map')`\n* `Array.prototype.slice` -> `require('es5-ext/array/#/slice')`\n* `Array.prototype.splice` -> `require('es5-ext/array/#/splice')`\n* `Array.prototype.values` -> `require('es5-ext/array/#/values')`\n* `Array.prototype[@@iterator]` -> `require('es5-ext/array/#/@@iterator')`\n* `Math.acosh` -> `require('es5-ext/math/acosh')`\n* `Math.asinh` -> `require('es5-ext/math/asinh')`\n* `Math.atanh` -> `require('es5-ext/math/atanh')`\n* `Math.cbrt` -> `require('es5-ext/math/cbrt')`\n* `Math.clz32` -> `require('es5-ext/math/clz32')`\n* `Math.cosh` -> `require('es5-ext/math/cosh')`\n* `Math.exmp1` -> `require('es5-ext/math/expm1')`\n* `Math.fround` -> `require('es5-ext/math/fround')`\n* `Math.hypot` -> `require('es5-ext/math/hypot')`\n* `Math.imul` -> `require('es5-ext/math/imul')`\n* `Math.log1p` -> `require('es5-ext/math/log1p')`\n* `Math.log2` -> `require('es5-ext/math/log2')`\n* `Math.log10` -> `require('es5-ext/math/log10')`\n* `Math.sign` -> `require('es5-ext/math/sign')`\n* `Math.signh` -> `require('es5-ext/math/signh')`\n* `Math.tanh` -> `require('es5-ext/math/tanh')`\n* `Math.trunc` -> `require('es5-ext/math/trunc')`\n* `Number.EPSILON` -> `require('es5-ext/number/epsilon')`\n* `Number.MAX_SAFE_INTEGER` -> `require('es5-ext/number/max-safe-integer')`\n* `Number.MIN_SAFE_INTEGER` -> `require('es5-ext/number/min-safe-integer')`\n* `Number.isFinite` -> `require('es5-ext/number/is-finite')`\n* `Number.isInteger` -> `require('es5-ext/number/is-integer')`\n* `Number.isNaN` -> `require('es5-ext/number/is-nan')`\n* `Number.isSafeInteger` -> `require('es5-ext/number/is-safe-integer')`\n* `Object.assign` -> `require('es5-ext/object/assign')`\n* `Object.keys` -> `require('es5-ext/object/keys')`\n* `Object.setPrototypeOf` -> `require('es5-ext/object/set-prototype-of')`\n* `RegExp.prototype.match` -> `require('es5-ext/reg-exp/#/match')`\n* `RegExp.prototype.replace` -> `require('es5-ext/reg-exp/#/replace')`\n* `RegExp.prototype.search` -> `require('es5-ext/reg-exp/#/search')`\n* `RegExp.prototype.split` -> `require('es5-ext/reg-exp/#/split')`\n* `RegExp.prototype.sticky` -> Implement with `require('es5-ext/reg-exp/#/sticky/implement')`, use as function with `require('es5-ext/reg-exp/#/is-sticky')`\n* `RegExp.prototype.unicode` -> Implement with `require('es5-ext/reg-exp/#/unicode/implement')`, use as function with `require('es5-ext/reg-exp/#/is-unicode')`\n* `String.fromCodePoint` -> `require('es5-ext/string/from-code-point')`\n* `String.raw` -> `require('es5-ext/string/raw')`\n* `String.prototype.codePointAt` -> `require('es5-ext/string/#/code-point-at')`\n* `String.prototype.contains` -> `require('es5-ext/string/#/contains')`\n* `String.prototype.endsWith` -> `require('es5-ext/string/#/ends-with')`\n* `String.prototype.normalize` -> `require('es5-ext/string/#/normalize')`\n* `String.prototype.repeat` -> `require('es5-ext/string/#/repeat')`\n* `String.prototype.startsWith` -> `require('es5-ext/string/#/starts-with')`\n* `String.prototype[@@iterator]` -> `require('es5-ext/string/#/@@iterator')`\n\n#### Non ECMAScript standard features\n\n**es5-ext** provides also other utils, and implements them as if they were proposed for a standard. It mostly offers methods (not functions) which can directly be assigned to native prototypes:\n\n```javascript\nObject.defineProperty(Function.prototype, \"partial\", {\n\tvalue: require(\"es5-ext/function/#/partial\"),\n\tconfigurable: true,\n\tenumerable: false,\n\twritable: true\n});\nObject.defineProperty(Array.prototype, \"flatten\", {\n\tvalue: require(\"es5-ext/array/#/flatten\"),\n\tconfigurable: true,\n\tenumerable: false,\n\twritable: true\n});\nObject.defineProperty(String.prototype, \"capitalize\", {\n\tvalue: require(\"es5-ext/string/#/capitalize\"),\n\tconfigurable: true,\n\tenumerable: false,\n\twritable: true\n});\n```\n\nSee [es5-extend](https://github.com/wookieb/es5-extend#es5-extend), a great utility that automatically will extend natives for you.\n\n**Important:** Remember to **not** extend natives in scope of generic reusable packages (e.g. ones you intend to publish to npm). Extending natives is fine **only** if you're the _owner_ of the global scope, so e.g. in final project you lead development of.\n\nWhen you're in situation when native extensions are not good idea, then you should use methods indirectly:\n\n```javascript\nvar flatten = require(\"es5-ext/array/#/flatten\");\n\nflatten.call([1, [2, [3, 4]]]); // [1, 2, 3, 4]\n```\n\nfor better convenience you can turn methods into functions:\n\n```javascript\nvar call = Function.prototype.call;\nvar flatten = call.bind(require(\"es5-ext/array/#/flatten\"));\n\nflatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]\n```\n\nYou can configure custom toolkit (like [underscorejs](http://underscorejs.org/)), and use it throughout your application\n\n```javascript\nvar util = {};\nutil.partial = call.bind(require(\"es5-ext/function/#/partial\"));\nutil.flatten = call.bind(require(\"es5-ext/array/#/flatten\"));\nutil.startsWith = call.bind(require(\"es5-ext/string/#/starts-with\"));\n\nutil.flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]\n```\n\nAs with native ones most methods are generic and can be run on any type of object.\n\n## API\n\n### Global extensions\n\n#### global _(es5-ext/global)_\n\nObject that represents global scope\n\n### Array Constructor extensions\n\n#### from(arrayLike[, mapFn[, thisArg]]) _(es5-ext/array/from)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from). \nReturns array representation of _iterable_ or _arrayLike_. If _arrayLike_ is an instance of array, its copy is returned.\n\n#### generate([length[, …fill]]) _(es5-ext/array/generate)_\n\nGenerate an array of pre-given _length_ built of repeated arguments.\n\n#### isPlainArray(x) _(es5-ext/array/is-plain-array)_\n\nReturns true if object is plain array (not instance of one of the Array's extensions).\n\n#### of([…items]) _(es5-ext/array/of)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.of). \nCreate an array from given arguments.\n\n#### toArray(obj) _(es5-ext/array/to-array)_\n\nReturns array representation of `obj`. If `obj` is already an array, `obj` is returned back.\n\n#### validArray(obj) _(es5-ext/array/valid-array)_\n\nReturns `obj` if it's an array, otherwise throws `TypeError`\n\n### Array Prototype extensions\n\n#### arr.binarySearch(compareFn) _(es5-ext/array/#/binary-search)_\n\nIn **sorted** list search for index of item for which _compareFn_ returns value closest to _0_. \nIt's variant of binary search algorithm\n\n#### arr.clear() _(es5-ext/array/#/clear)_\n\nClears the array\n\n#### arr.compact() _(es5-ext/array/#/compact)_\n\nReturns a copy of the context with all non-values (`null` or `undefined`) removed.\n\n#### arr.concat() _(es5-ext/array/#/concat)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.concat). \nES6's version of `concat`. Supports `isConcatSpreadable` symbol, and returns array of same type as the context.\n\n#### arr.contains(searchElement[, position]) _(es5-ext/array/#/contains)_\n\nWhether list contains the given value.\n\n#### arr.copyWithin(target, start[, end]) _(es5-ext/array/#/copy-within)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.copywithin).\n\n#### arr.diff(other) _(es5-ext/array/#/diff)_\n\nReturns the array of elements that are present in context list but not present in other list.\n\n#### arr.eIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-index-of)_\n\n_egal_ version of `indexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision\n\n#### arr.eLastIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-last-index-of)_\n\n_egal_ version of `lastIndexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision\n\n#### arr.entries() _(es5-ext/array/#/entries)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.entries). \nReturns iterator object, which traverses the array. Each value is represented with an array, where first value is an index and second is corresponding to index value.\n\n#### arr.exclusion([…lists]]) _(es5-ext/array/#/exclusion)_\n\nReturns the array of elements that are found only in one of the lists (either context list or list provided in arguments).\n\n#### arr.fill(value[, start, end]) _(es5-ext/array/#/fill)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.fill).\n\n#### arr.filter(callback[, thisArg]) _(es5-ext/array/#/filter)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.filter). \nES6's version of `filter`, returns array of same type as the context.\n\n#### arr.find(predicate[, thisArg]) _(es5-ext/array/#/find)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.find). \nReturn first element for which given function returns true\n\n#### arr.findIndex(predicate[, thisArg]) _(es5-ext/array/#/find-index)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.findindex). \nReturn first index for which given function returns true\n\n#### arr.first() _(es5-ext/array/#/first)_\n\nReturns value for first defined index\n\n#### arr.firstIndex() _(es5-ext/array/#/first-index)_\n\nReturns first declared index of the array\n\n#### arr.flatten() _(es5-ext/array/#/flatten)_\n\nReturns flattened version of the array\n\n#### arr.forEachRight(cb[, thisArg]) _(es5-ext/array/#/for-each-right)_\n\n`forEach` starting from last element\n\n#### arr.group(cb[, thisArg]) _(es5-ext/array/#/group)_\n\nGroup list elements by value returned by _cb_ function\n\n#### arr.indexesOf(searchElement[, fromIndex]) _(es5-ext/array/#/indexes-of)_\n\nReturns array of all indexes of given value\n\n#### arr.intersection([…lists]) _(es5-ext/array/#/intersection)_\n\nComputes the array of values that are the intersection of all lists (context list and lists given in arguments)\n\n#### arr.isCopy(other) _(es5-ext/array/#/is-copy)_\n\nReturns true if both context and _other_ lists have same content\n\n#### arr.isUniq() _(es5-ext/array/#/is-uniq)_\n\nReturns true if all values in array are unique\n\n#### arr.keys() _(es5-ext/array/#/keys)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.keys). \nReturns iterator object, which traverses all array indexes.\n\n#### arr.last() _(es5-ext/array/#/last)_\n\nReturns value of last defined index\n\n#### arr.lastIndex() _(es5-ext/array/#/last)_\n\nReturns last defined index of the array\n\n#### arr.map(callback[, thisArg]) _(es5-ext/array/#/map)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.map). \nES6's version of `map`, returns array of same type as the context.\n\n#### arr.remove(value[, …valuen]) _(es5-ext/array/#/remove)_\n\nRemove values from the array\n\n#### arr.separate(sep) _(es5-ext/array/#/separate)_\n\nReturns array with items separated with `sep` value\n\n#### arr.slice(callback[, thisArg]) _(es5-ext/array/#/slice)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.slice). \nES6's version of `slice`, returns array of same type as the context.\n\n#### arr.someRight(cb[, thisArg]) _(es5-ext/array/#/someRight)_\n\n`some` starting from last element\n\n#### arr.splice(callback[, thisArg]) _(es5-ext/array/#/splice)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.splice). \nES6's version of `splice`, returns array of same type as the context.\n\n#### arr.uniq() _(es5-ext/array/#/uniq)_\n\nReturns duplicate-free version of the array\n\n#### arr.values() _(es5-ext/array/#/values)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.values). \nReturns iterator object which traverses all array values.\n\n#### arr[@@iterator] _(es5-ext/array/#/@@iterator)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype-@@iterator). \nReturns iterator object which traverses all array values.\n\n### Boolean Constructor extensions\n\n#### isBoolean(x) _(es5-ext/boolean/is-boolean)_\n\nWhether value is boolean\n\n### Date Constructor extensions\n\n#### isDate(x) _(es5-ext/date/is-date)_\n\nWhether value is date instance\n\n#### validDate(x) _(es5-ext/date/valid-date)_\n\nIf given object is not date throw TypeError in other case return it.\n\n### Date Prototype extensions\n\n#### date.copy(date) _(es5-ext/date/#/copy)_\n\nReturns a copy of the date object\n\n#### date.daysInMonth() _(es5-ext/date/#/days-in-month)_\n\nReturns number of days of date's month\n\n#### date.floorDay() _(es5-ext/date/#/floor-day)_\n\nSets the date time to 00:00:00.000\n\n#### date.floorMonth() _(es5-ext/date/#/floor-month)_\n\nSets date day to 1 and date time to 00:00:00.000\n\n#### date.floorYear() _(es5-ext/date/#/floor-year)_\n\nSets date month to 0, day to 1 and date time to 00:00:00.000\n\n#### date.format(pattern) _(es5-ext/date/#/format)_\n\nFormats date up to given string. Supported patterns:\n\n* `%Y` - Year with century, 1999, 2003\n* `%y` - Year without century, 99, 03\n* `%m` - Month, 01..12\n* `%d` - Day of the month 01..31\n* `%H` - Hour (24-hour clock), 00..23\n* `%M` - Minute, 00..59\n* `%S` - Second, 00..59\n* `%L` - Milliseconds, 000..999\n\n### Error Constructor extensions\n\n#### custom(message/_, code, ext_/) _(es5-ext/error/custom)_\n\nCreates custom error object, optinally extended with `code` and other extension properties (provided with `ext` object)\n\n#### isError(x) _(es5-ext/error/is-error)_\n\nWhether value is an error (instance of `Error`).\n\n#### validError(x) _(es5-ext/error/valid-error)_\n\nIf given object is not error throw TypeError in other case return it.\n\n### Error Prototype extensions\n\n#### err.throw() _(es5-ext/error/#/throw)_\n\nThrows error\n\n### Function Constructor extensions\n\nSome of the functions were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele\n\n#### constant(x) _(es5-ext/function/constant)_\n\nReturns a constant function that returns pregiven argument\n\n_k(x)(y) =def x_\n\n#### identity(x) _(es5-ext/function/identity)_\n\nIdentity function. Returns first argument\n\n_i(x) =def x_\n\n#### invoke(name[, …args]) _(es5-ext/function/invoke)_\n\nReturns a function that takes an object as an argument, and applies object's\n_name_ method to arguments. \n_name_ can be name of the method or method itself.\n\n_invoke(name, …args)(object, …args2) =def object\\[name\\]\\(…args, …args2\\)_\n\n#### isArguments(x) _(es5-ext/function/is-arguments)_\n\nWhether value is arguments object\n\n#### isFunction(arg) _(es5-ext/function/is-function)_\n\nWhether value is instance of function\n\n#### noop() _(es5-ext/function/noop)_\n\nNo operation function\n\n#### pluck(name) _(es5-ext/function/pluck)_\n\nReturns a function that takes an object, and returns the value of its _name_\nproperty\n\n_pluck(name)(obj) =def obj[name]_\n\n#### validFunction(arg) _(es5-ext/function/valid-function)_\n\nIf given object is not function throw TypeError in other case return it.\n\n### Function Prototype extensions\n\nSome of the methods were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele\n\n#### fn.compose([…fns]) _(es5-ext/function/#/compose)_\n\nApplies the functions in reverse argument-list order.\n\n_f1.compose(f2, f3, f4)(…args) =def f1(f2(f3(f4(…arg))))_\n\n#### fn.copy() _(es5-ext/function/#/copy)_\n\nProduces copy of given function\n\n#### fn.curry([n]) _(es5-ext/function/#/curry)_\n\nInvoking the function returned by this function only _n_ arguments are passed to the underlying function. If the underlying function is not saturated, the result is a function that passes all its arguments to the underlying function. \nIf _n_ is not provided then it defaults to context function length\n\n_f.curry(4)(arg1, arg2)(arg3)(arg4) =def f(arg1, args2, arg3, arg4)_\n\n#### fn.lock([…args]) _(es5-ext/function/#/lock)_\n\nReturns a function that applies the underlying function to _args_, and ignores its own arguments.\n\n_f.lock(…args)(…args2) =def f(…args)_\n\n_Named after it's counterpart in Google Closure_\n\n#### fn.not() _(es5-ext/function/#/not)_\n\nReturns a function that returns boolean negation of value returned by underlying function.\n\n_f.not()(…args) =def !f(…args)_\n\n#### fn.partial([…args]) _(es5-ext/function/#/partial)_\n\nReturns a function that when called will behave like context function called with initially passed arguments. If more arguments are suplilied, they are appended to initial args.\n\n_f.partial(…args1)(…args2) =def f(…args1, …args2)_\n\n#### fn.spread() _(es5-ext/function/#/spread)_\n\nReturns a function that applies underlying function with first list argument\n\n_f.match()(args) =def f.apply(null, args)_\n\n#### fn.toStringTokens() _(es5-ext/function/#/to-string-tokens)_\n\nSerializes function into two (arguments and body) string tokens. Result is plain object with `args` and `body` properties.\n\n### Math extensions\n\n#### acosh(x) _(es5-ext/math/acosh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.acosh).\n\n#### asinh(x) _(es5-ext/math/asinh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.asinh).\n\n#### atanh(x) _(es5-ext/math/atanh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.atanh).\n\n#### cbrt(x) _(es5-ext/math/cbrt)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cbrt).\n\n#### clz32(x) _(es5-ext/math/clz32)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.clz32).\n\n#### cosh(x) _(es5-ext/math/cosh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cosh).\n\n#### expm1(x) _(es5-ext/math/expm1)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.expm1).\n\n#### fround(x) _(es5-ext/math/fround)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround).\n\n#### hypot([…values]) _(es5-ext/math/hypot)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot).\n\n#### imul(x, y) _(es5-ext/math/imul)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.imul).\n\n#### log1p(x) _(es5-ext/math/log1p)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log1p).\n\n#### log2(x) _(es5-ext/math/log2)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log2).\n\n#### log10(x) _(es5-ext/math/log10)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log10).\n\n#### sign(x) _(es5-ext/math/sign)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sign).\n\n#### sinh(x) _(es5-ext/math/sinh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sinh).\n\n#### tanh(x) _(es5-ext/math/tanh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.tanh).\n\n#### trunc(x) _(es5-ext/math/trunc)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc).\n\n### Number Constructor extensions\n\n#### EPSILON _(es5-ext/number/epsilon)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.epsilon).\n\nThe difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately 2.2204460492503130808472633361816 x 10-16.\n\n#### isFinite(x) _(es5-ext/number/is-finite)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite). \nWhether value is finite. Differs from global isNaN that it doesn't do type coercion.\n\n#### isInteger(x) _(es5-ext/number/is-integer)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger). \nWhether value is integer.\n\n#### isNaN(x) _(es5-ext/number/is-nan)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan). \nWhether value is NaN. Differs from global isNaN that it doesn't do type coercion.\n\n#### isNumber(x) _(es5-ext/number/is-number)_\n\nWhether given value is number\n\n#### isSafeInteger(x) _(es5-ext/number/is-safe-integer)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.issafeinteger).\n\n#### MAX*SAFE_INTEGER *(es5-ext/number/max-safe-integer)\\_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.maxsafeinteger). \nThe value of Number.MAX_SAFE_INTEGER is 9007199254740991.\n\n#### MIN*SAFE_INTEGER *(es5-ext/number/min-safe-integer)\\_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.minsafeinteger). \nThe value of Number.MIN_SAFE_INTEGER is -9007199254740991 (253-1).\n\n#### toInteger(x) _(es5-ext/number/to-integer)_\n\nConverts value to integer\n\n#### toPosInteger(x) _(es5-ext/number/to-pos-integer)_\n\nConverts value to positive integer. If provided value is less than 0, then 0 is returned\n\n#### toUint32(x) _(es5-ext/number/to-uint32)_\n\nConverts value to unsigned 32 bit integer. This type is used for array lengths.\nSee: http://www.2ality.com/2012/02/js-integers.html\n\n### Number Prototype extensions\n\n#### num.pad(length[, precision]) _(es5-ext/number/#/pad)_\n\nPad given number with zeros. Returns string\n\n### Object Constructor extensions\n\n#### assign(target, source[, …sourcen]) _(es5-ext/object/assign)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign). \nExtend _target_ by enumerable own properties of other objects. If properties are already set on target object, they will be overwritten.\n\n#### clear(obj) _(es5-ext/object/clear)_\n\nRemove all enumerable own properties of the object\n\n#### compact(obj) _(es5-ext/object/compact)_\n\nReturns copy of the object with all enumerable properties that have no falsy values\n\n#### compare(obj1, obj2) _(es5-ext/object/compare)_\n\nUniversal cross-type compare function. To be used for e.g. array sort.\n\n#### copy(obj) _(es5-ext/object/copy)_\n\nReturns copy of the object with all enumerable properties.\n\n#### copyDeep(obj) _(es5-ext/object/copy-deep)_\n\nReturns deep copy of the object with all enumerable properties.\n\n#### count(obj) _(es5-ext/object/count)_\n\nCounts number of enumerable own properties on object\n\n#### create(obj[, properties]) _(es5-ext/object/create)_\n\n`Object.create` alternative that provides workaround for [V8 issue](http://code.google.com/p/v8/issues/detail?id=2804).\n\nWhen `null` is provided as a prototype, it's substituted with specially prepared object that derives from Object.prototype but has all Object.prototype properties shadowed with undefined.\n\nIt's quirky solution that allows us to have plain objects with no truthy properties but with turnable prototype.\n\nUse only for objects that you plan to switch prototypes of and be aware of limitations of this workaround.\n\n#### eq(x, y) _(es5-ext/object/eq)_\n\nWhether two values are equal, using [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.\n\n#### every(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/every)_\n\nAnalogous to Array.prototype.every. Returns true if every key-value pair in this object satisfies the provided testing function. \nOptionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### filter(obj, cb[, thisArg]) _(es5-ext/object/filter)_\n\nAnalogous to Array.prototype.filter. Returns new object with properites for which _cb_ function returned truthy value.\n\n#### firstKey(obj) _(es5-ext/object/first-key)_\n\nReturns first enumerable key of the object, as keys are unordered by specification, it can be any key of an object.\n\n#### flatten(obj) _(es5-ext/object/flatten)_\n\nReturns new object, with flatten properties of input object\n\n_flatten({ a: { b: 1 }, c: { d: 1 } }) =def { b: 1, d: 1 }_\n\n#### forEach(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/for-each)_\n\nAnalogous to Array.prototype.forEach. Calls a function for each key-value pair found in object\nOptionally _compareFn_ can be provided which assures that properties are iterated in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### getPropertyNames() _(es5-ext/object/get-property-names)_\n\nGet all (not just own) property names of the object\n\n#### is(x, y) _(es5-ext/object/is)_\n\nWhether two values are equal, using [_SameValue_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.\n\n#### isArrayLike(x) _(es5-ext/object/is-array-like)_\n\nWhether object is array-like object\n\n#### isCopy(x, y) _(es5-ext/object/is-copy)_\n\nTwo values are considered a copy of same value when all of their own enumerable properties have same values.\n\n#### isCopyDeep(x, y) _(es5-ext/object/is-copy-deep)_\n\nDeep comparision of objects\n\n#### isEmpty(obj) _(es5-ext/object/is-empty)_\n\nTrue if object doesn't have any own enumerable property\n\n#### isObject(arg) _(es5-ext/object/is-object)_\n\nWhether value is not primitive\n\n#### isPlainObject(arg) _(es5-ext/object/is-plain-object)_\n\nWhether object is plain object, its protototype should be Object.prototype and it cannot be host object.\n\n#### keyOf(obj, searchValue) _(es5-ext/object/key-of)_\n\nSearch object for value\n\n#### keys(obj) _(es5-ext/object/keys)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys). \nES6's version of `keys`, doesn't throw on primitive input\n\n#### map(obj, cb[, thisArg]) _(es5-ext/object/map)_\n\nAnalogous to Array.prototype.map. Creates a new object with properties which values are results of calling a provided function on every key-value pair in this object.\n\n#### mapKeys(obj, cb[, thisArg]) _(es5-ext/object/map-keys)_\n\nCreate new object with same values, but remapped keys\n\n#### mixin(target, source) _(es5-ext/object/mixin)_\n\nExtend _target_ by all own properties of other objects. Properties found in both objects will be overwritten (unless they're not configurable and cannot be overwritten).\n_It was for a moment part of ECMAScript 6 draft._\n\n#### mixinPrototypes(target, …source]) _(es5-ext/object/mixin-prototypes)_\n\nExtends _target_, with all source and source's prototype properties.\nUseful as an alternative for `setPrototypeOf` in environments in which it cannot be shimmed (no `__proto__` support).\n\n#### normalizeOptions(options) _(es5-ext/object/normalize-options)_\n\nNormalizes options object into flat plain object.\n\nUseful for functions in which we either need to keep options object for future reference or need to modify it for internal use.\n\n* It never returns input `options` object back (always a copy is created)\n* `options` can be undefined in such case empty plain object is returned.\n* Copies all enumerable properties found down prototype chain.\n\n#### primitiveSet([…names]) _(es5-ext/object/primitive-set)_\n\nCreates `null` prototype based plain object, and sets on it all property names provided in arguments to true.\n\n#### safeTraverse(obj[, …names]) _(es5-ext/object/safe-traverse)_\n\nSafe navigation of object properties. See http://wiki.ecmascript.org/doku.php?id=strawman:existential_operator\n\n#### serialize(value) _(es5-ext/object/serialize)_\n\nSerialize value into string. Differs from [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that it serializes also dates, functions and regular expresssions.\n\n#### setPrototypeOf(object, proto) _(es5-ext/object/set-prototype-of)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.setprototypeof). \nIf native version is not provided, it depends on existence of `__proto__` functionality, if it's missing, `null` instead of function is exposed.\n\n#### some(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/some)_\n\nAnalogous to Array.prototype.some Returns true if any key-value pair satisfies the provided\ntesting function. \nOptionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### toArray(obj[, cb[, thisArg[, compareFn]]]) _(es5-ext/object/to-array)_\n\nCreates an array of results of calling a provided function on every key-value pair in this object. \nOptionally _compareFn_ can be provided which assures that results are added in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### unserialize(str) _(es5-ext/object/unserialize)_\n\nUserializes value previously serialized with [serialize](#serializevalue-es5-extobjectserialize)\n\n#### validCallable(x) _(es5-ext/object/valid-callable)_\n\nIf given object is not callable throw TypeError in other case return it.\n\n#### validObject(x) _(es5-ext/object/valid-object)_\n\nThrows error if given value is not an object, otherwise it is returned.\n\n#### validValue(x) _(es5-ext/object/valid-value)_\n\nThrows error if given value is `null` or `undefined`, otherwise returns value.\n\n### RegExp Constructor extensions\n\n#### escape(str) _(es5-ext/reg-exp/escape)_\n\nEscapes string to be used in regular expression\n\n#### isRegExp(x) _(es5-ext/reg-exp/is-reg-exp)_\n\nWhether object is regular expression\n\n#### validRegExp(x) _(es5-ext/reg-exp/valid-reg-exp)_\n\nIf object is regular expression it is returned, otherwise TypeError is thrown.\n\n### RegExp Prototype extensions\n\n#### re.isSticky(x) _(es5-ext/reg-exp/#/is-sticky)_\n\nWhether regular expression has `sticky` flag.\n\nIt's to be used as counterpart to [regExp.sticky](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.sticky) if it's not implemented.\n\n#### re.isUnicode(x) _(es5-ext/reg-exp/#/is-unicode)_\n\nWhether regular expression has `unicode` flag.\n\nIt's to be used as counterpart to [regExp.unicode](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.unicode) if it's not implemented.\n\n#### re.match(string) _(es5-ext/reg-exp/#/match)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.match).\n\n#### re.replace(string, replaceValue) _(es5-ext/reg-exp/#/replace)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.replace).\n\n#### re.search(string) _(es5-ext/reg-exp/#/search)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.search).\n\n#### re.split(string) _(es5-ext/reg-exp/#/search)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.split).\n\n#### re.sticky _(es5-ext/reg-exp/#/sticky/implement)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.sticky). \nIt's a getter, so only `implement` and `is-implemented` modules are provided.\n\n#### re.unicode _(es5-ext/reg-exp/#/unicode/implement)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.unicode). \nIt's a getter, so only `implement` and `is-implemented` modules are provided.\n\n### String Constructor extensions\n\n#### formatMethod(fMap) _(es5-ext/string/format-method)_\n\nCreates format method. It's used e.g. to create `Date.prototype.format` method\n\n#### fromCodePoint([…codePoints]) _(es5-ext/string/from-code-point)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint)\n\n#### isString(x) _(es5-ext/string/is-string)_\n\nWhether object is string\n\n#### randomUniq() _(es5-ext/string/random-uniq)_\n\nReturns randomly generated id, with guarantee of local uniqueness (no same id will be returned twice)\n\n#### raw(callSite[, …substitutions]) _(es5-ext/string/raw)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.raw)\n\n### String Prototype extensions\n\n#### str.at(pos) _(es5-ext/string/#/at)_\n\n_Proposed for ECMAScript 6/7 standard, but not (yet) in a draft_\n\nReturns a string at given position in Unicode-safe manner.\nBased on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.at).\n\n#### str.camelToHyphen() _(es5-ext/string/#/camel-to-hyphen)_\n\nConvert camelCase string to hyphen separated, e.g. one-two-three -> oneTwoThree.\nUseful when converting names from js property convention into filename convention.\n\n#### str.capitalize() _(es5-ext/string/#/capitalize)_\n\nCapitalize first character of a string\n\n#### str.caseInsensitiveCompare(str) _(es5-ext/string/#/case-insensitive-compare)_\n\nCase insensitive compare\n\n#### str.codePointAt(pos) _(es5-ext/string/#/code-point-at)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.codepointat)\n\nBased on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.codePointAt).\n\n#### str.contains(searchString[, position]) _(es5-ext/string/#/contains)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains)\n\nWhether string contains given string.\n\n#### str.endsWith(searchString[, endPosition]) _(es5-ext/string/#/ends-with)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith). \nWhether strings ends with given string\n\n#### str.hyphenToCamel() _(es5-ext/string/#/hyphen-to-camel)_\n\nConvert hyphen separated string to camelCase, e.g. one-two-three -> oneTwoThree.\nUseful when converting names from filename convention to js property name convention.\n\n#### str.indent(str[, count]) _(es5-ext/string/#/indent)_\n\nIndents each line with provided _str_ (if _count_ given then _str_ is repeated _count_ times).\n\n#### str.last() _(es5-ext/string/#/last)_\n\nReturn last character\n\n#### str.normalize([form]) _(es5-ext/string/#/normalize)_\n\n[_Introduced with ECMAScript 6_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize). \nReturns the Unicode Normalization Form of a given string. \nBased on Matsuza's version. Code used for integrated shim can be found at [github.com/walling/unorm](https://github.com/walling/unorm/blob/master/lib/unorm.js)\n\n#### str.pad(fill[, length]) _(es5-ext/string/#/pad)_\n\nPad string with _fill_.\nIf _length_ si given than _fill_ is reapated _length_ times.\nIf _length_ is negative then pad is applied from right.\n\n#### str.repeat(n) _(es5-ext/string/#/repeat)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.repeat). \nRepeat given string _n_ times\n\n#### str.plainReplace(search, replace) _(es5-ext/string/#/plain-replace)_\n\nSimple `replace` version. Doesn't support regular expressions. Replaces just first occurrence of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).\n\n#### str.plainReplaceAll(search, replace) _(es5-ext/string/#/plain-replace-all)_\n\nSimple `replace` version. Doesn't support regular expressions. Replaces all occurrences of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).\n\n#### str.startsWith(searchString[, position]) _(es5-ext/string/#/starts-with)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.startswith). \nWhether strings starts with given string\n\n#### str[@@iterator] _(es5-ext/string/#/@@iterator)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype-@@iterator). \nReturns iterator object which traverses all string characters (with respect to unicode symbols)\n\n### Tests\n\n $ npm test\n\n[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/es5-ext/branches/master/shields_badge.svg\n[nix-build-url]: https://semaphoreci.com/medikoo-org/es5-ext\n[win-build-image]: https://ci.appveyor.com/api/projects/status/3jox67ksw3p8hkwh?svg=true\n[win-build-url]: https://ci.appveyor.com/project/medikoo/es5-ext\n[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg\n[npm-image]: https://img.shields.io/npm/v/es5-ext.svg\n[npm-url]: https://www.npmjs.com/package/es5-ext\n", - "readmeFilename": "README.md", - "bugs": "[Circular]", - "homepage": "https://github.com/medikoo/es5-ext#readme", - "_id": "es5-ext@0.10.45", - "_requested": { - "type": "version", - "registry": true, - "raw": "es5-ext@0.10.45", - "name": "es5-ext", - "escapedName": "es5-ext", - "rawSpec": "0.10.45", - "saveSpec": "[Circular]", - "fetchSpec": "0.10.45" - }, - "_spec": "0.10.45", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": "[Circular]", - "optionalDependencies": "[Circular]", - "_dependencies": "[Circular]", - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/es5-ext", - "error": "[Circular]", - "extraneous": false, - "_deduped": "es5-ext" - }, - "d": { - "name": "d", - "version": "1.0.0", - "description": "Property descriptor factory", - "author": { - "name": "Mariusz Nowak", - "email": "medyk@medikoo.com", - "url": "http://www.medikoo.com/" - }, - "keywords": [ - "descriptor", - "es", - "ecmascript", - "ecma", - "property", - "descriptors", - "meta", - "properties" - ], - "repository": { - "type": "git", - "url": "git://github.com/medikoo/d.git" - }, - "dependencies": { - "es5-ext": { - "name": "es5-ext", - "version": "0.10.45", - "description": "ECMAScript extensions and shims", - "author": "[Circular]", - "keywords": "[Circular]", - "repository": "[Circular]", - "dependencies": {}, - "devDependencies": "[Circular]", - "eslintConfig": "[Circular]", - "scripts": "[Circular]", - "license": "ISC", - "_resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", - "_integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", - "_from": "es5-ext@0.10.45", - "readme": "[![Build status][nix-build-image]][nix-build-url]\n[![Windows status][win-build-image]][win-build-url]\n![Transpilation status][transpilation-image]\n[![npm version][npm-image]][npm-url]\n\n# es5-ext\n\n## ECMAScript 5 extensions\n\n### (with respect to ECMAScript 6 standard)\n\nShims for upcoming ES6 standard and other goodies implemented strictly with ECMAScript conventions in mind.\n\nIt's designed to be used in compliant ECMAScript 5 or ECMAScript 6 environments. Older environments are not supported, although most of the features should work with correct ECMAScript 5 shim on board.\n\nWhen used in ECMAScript 6 environment, native implementation (if valid) takes precedence over shims.\n\n### Installation\n\n $ npm install es5-ext\n\nTo port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)\n\n### Usage\n\n#### ECMAScript 6 features\n\nYou can force ES6 features to be implemented in your environment, e.g. following will assign `from` function to `Array` (only if it's not implemented already).\n\n```javascript\nrequire(\"es5-ext/array/from/implement\");\nArray.from(\"foo\"); // ['f', 'o', 'o']\n```\n\nYou can also access shims directly, without fixing native objects. Following will return native `Array.from` if it's available and fallback to shim if it's not.\n\n```javascript\nvar aFrom = require(\"es5-ext/array/from\");\naFrom(\"foo\"); // ['f', 'o', 'o']\n```\n\nIf you want to use shim unconditionally (even if native implementation exists) do:\n\n```javascript\nvar aFrom = require(\"es5-ext/array/from/shim\");\naFrom(\"foo\"); // ['f', 'o', 'o']\n```\n\n##### List of ES6 shims\n\nIt's about properties introduced with ES6 and those that have been updated in new spec.\n\n* `Array.from` -> `require('es5-ext/array/from')`\n* `Array.of` -> `require('es5-ext/array/of')`\n* `Array.prototype.concat` -> `require('es5-ext/array/#/concat')`\n* `Array.prototype.copyWithin` -> `require('es5-ext/array/#/copy-within')`\n* `Array.prototype.entries` -> `require('es5-ext/array/#/entries')`\n* `Array.prototype.fill` -> `require('es5-ext/array/#/fill')`\n* `Array.prototype.filter` -> `require('es5-ext/array/#/filter')`\n* `Array.prototype.find` -> `require('es5-ext/array/#/find')`\n* `Array.prototype.findIndex` -> `require('es5-ext/array/#/find-index')`\n* `Array.prototype.keys` -> `require('es5-ext/array/#/keys')`\n* `Array.prototype.map` -> `require('es5-ext/array/#/map')`\n* `Array.prototype.slice` -> `require('es5-ext/array/#/slice')`\n* `Array.prototype.splice` -> `require('es5-ext/array/#/splice')`\n* `Array.prototype.values` -> `require('es5-ext/array/#/values')`\n* `Array.prototype[@@iterator]` -> `require('es5-ext/array/#/@@iterator')`\n* `Math.acosh` -> `require('es5-ext/math/acosh')`\n* `Math.asinh` -> `require('es5-ext/math/asinh')`\n* `Math.atanh` -> `require('es5-ext/math/atanh')`\n* `Math.cbrt` -> `require('es5-ext/math/cbrt')`\n* `Math.clz32` -> `require('es5-ext/math/clz32')`\n* `Math.cosh` -> `require('es5-ext/math/cosh')`\n* `Math.exmp1` -> `require('es5-ext/math/expm1')`\n* `Math.fround` -> `require('es5-ext/math/fround')`\n* `Math.hypot` -> `require('es5-ext/math/hypot')`\n* `Math.imul` -> `require('es5-ext/math/imul')`\n* `Math.log1p` -> `require('es5-ext/math/log1p')`\n* `Math.log2` -> `require('es5-ext/math/log2')`\n* `Math.log10` -> `require('es5-ext/math/log10')`\n* `Math.sign` -> `require('es5-ext/math/sign')`\n* `Math.signh` -> `require('es5-ext/math/signh')`\n* `Math.tanh` -> `require('es5-ext/math/tanh')`\n* `Math.trunc` -> `require('es5-ext/math/trunc')`\n* `Number.EPSILON` -> `require('es5-ext/number/epsilon')`\n* `Number.MAX_SAFE_INTEGER` -> `require('es5-ext/number/max-safe-integer')`\n* `Number.MIN_SAFE_INTEGER` -> `require('es5-ext/number/min-safe-integer')`\n* `Number.isFinite` -> `require('es5-ext/number/is-finite')`\n* `Number.isInteger` -> `require('es5-ext/number/is-integer')`\n* `Number.isNaN` -> `require('es5-ext/number/is-nan')`\n* `Number.isSafeInteger` -> `require('es5-ext/number/is-safe-integer')`\n* `Object.assign` -> `require('es5-ext/object/assign')`\n* `Object.keys` -> `require('es5-ext/object/keys')`\n* `Object.setPrototypeOf` -> `require('es5-ext/object/set-prototype-of')`\n* `RegExp.prototype.match` -> `require('es5-ext/reg-exp/#/match')`\n* `RegExp.prototype.replace` -> `require('es5-ext/reg-exp/#/replace')`\n* `RegExp.prototype.search` -> `require('es5-ext/reg-exp/#/search')`\n* `RegExp.prototype.split` -> `require('es5-ext/reg-exp/#/split')`\n* `RegExp.prototype.sticky` -> Implement with `require('es5-ext/reg-exp/#/sticky/implement')`, use as function with `require('es5-ext/reg-exp/#/is-sticky')`\n* `RegExp.prototype.unicode` -> Implement with `require('es5-ext/reg-exp/#/unicode/implement')`, use as function with `require('es5-ext/reg-exp/#/is-unicode')`\n* `String.fromCodePoint` -> `require('es5-ext/string/from-code-point')`\n* `String.raw` -> `require('es5-ext/string/raw')`\n* `String.prototype.codePointAt` -> `require('es5-ext/string/#/code-point-at')`\n* `String.prototype.contains` -> `require('es5-ext/string/#/contains')`\n* `String.prototype.endsWith` -> `require('es5-ext/string/#/ends-with')`\n* `String.prototype.normalize` -> `require('es5-ext/string/#/normalize')`\n* `String.prototype.repeat` -> `require('es5-ext/string/#/repeat')`\n* `String.prototype.startsWith` -> `require('es5-ext/string/#/starts-with')`\n* `String.prototype[@@iterator]` -> `require('es5-ext/string/#/@@iterator')`\n\n#### Non ECMAScript standard features\n\n**es5-ext** provides also other utils, and implements them as if they were proposed for a standard. It mostly offers methods (not functions) which can directly be assigned to native prototypes:\n\n```javascript\nObject.defineProperty(Function.prototype, \"partial\", {\n\tvalue: require(\"es5-ext/function/#/partial\"),\n\tconfigurable: true,\n\tenumerable: false,\n\twritable: true\n});\nObject.defineProperty(Array.prototype, \"flatten\", {\n\tvalue: require(\"es5-ext/array/#/flatten\"),\n\tconfigurable: true,\n\tenumerable: false,\n\twritable: true\n});\nObject.defineProperty(String.prototype, \"capitalize\", {\n\tvalue: require(\"es5-ext/string/#/capitalize\"),\n\tconfigurable: true,\n\tenumerable: false,\n\twritable: true\n});\n```\n\nSee [es5-extend](https://github.com/wookieb/es5-extend#es5-extend), a great utility that automatically will extend natives for you.\n\n**Important:** Remember to **not** extend natives in scope of generic reusable packages (e.g. ones you intend to publish to npm). Extending natives is fine **only** if you're the _owner_ of the global scope, so e.g. in final project you lead development of.\n\nWhen you're in situation when native extensions are not good idea, then you should use methods indirectly:\n\n```javascript\nvar flatten = require(\"es5-ext/array/#/flatten\");\n\nflatten.call([1, [2, [3, 4]]]); // [1, 2, 3, 4]\n```\n\nfor better convenience you can turn methods into functions:\n\n```javascript\nvar call = Function.prototype.call;\nvar flatten = call.bind(require(\"es5-ext/array/#/flatten\"));\n\nflatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]\n```\n\nYou can configure custom toolkit (like [underscorejs](http://underscorejs.org/)), and use it throughout your application\n\n```javascript\nvar util = {};\nutil.partial = call.bind(require(\"es5-ext/function/#/partial\"));\nutil.flatten = call.bind(require(\"es5-ext/array/#/flatten\"));\nutil.startsWith = call.bind(require(\"es5-ext/string/#/starts-with\"));\n\nutil.flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]\n```\n\nAs with native ones most methods are generic and can be run on any type of object.\n\n## API\n\n### Global extensions\n\n#### global _(es5-ext/global)_\n\nObject that represents global scope\n\n### Array Constructor extensions\n\n#### from(arrayLike[, mapFn[, thisArg]]) _(es5-ext/array/from)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from). \nReturns array representation of _iterable_ or _arrayLike_. If _arrayLike_ is an instance of array, its copy is returned.\n\n#### generate([length[, …fill]]) _(es5-ext/array/generate)_\n\nGenerate an array of pre-given _length_ built of repeated arguments.\n\n#### isPlainArray(x) _(es5-ext/array/is-plain-array)_\n\nReturns true if object is plain array (not instance of one of the Array's extensions).\n\n#### of([…items]) _(es5-ext/array/of)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.of). \nCreate an array from given arguments.\n\n#### toArray(obj) _(es5-ext/array/to-array)_\n\nReturns array representation of `obj`. If `obj` is already an array, `obj` is returned back.\n\n#### validArray(obj) _(es5-ext/array/valid-array)_\n\nReturns `obj` if it's an array, otherwise throws `TypeError`\n\n### Array Prototype extensions\n\n#### arr.binarySearch(compareFn) _(es5-ext/array/#/binary-search)_\n\nIn **sorted** list search for index of item for which _compareFn_ returns value closest to _0_. \nIt's variant of binary search algorithm\n\n#### arr.clear() _(es5-ext/array/#/clear)_\n\nClears the array\n\n#### arr.compact() _(es5-ext/array/#/compact)_\n\nReturns a copy of the context with all non-values (`null` or `undefined`) removed.\n\n#### arr.concat() _(es5-ext/array/#/concat)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.concat). \nES6's version of `concat`. Supports `isConcatSpreadable` symbol, and returns array of same type as the context.\n\n#### arr.contains(searchElement[, position]) _(es5-ext/array/#/contains)_\n\nWhether list contains the given value.\n\n#### arr.copyWithin(target, start[, end]) _(es5-ext/array/#/copy-within)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.copywithin).\n\n#### arr.diff(other) _(es5-ext/array/#/diff)_\n\nReturns the array of elements that are present in context list but not present in other list.\n\n#### arr.eIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-index-of)_\n\n_egal_ version of `indexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision\n\n#### arr.eLastIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-last-index-of)_\n\n_egal_ version of `lastIndexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision\n\n#### arr.entries() _(es5-ext/array/#/entries)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.entries). \nReturns iterator object, which traverses the array. Each value is represented with an array, where first value is an index and second is corresponding to index value.\n\n#### arr.exclusion([…lists]]) _(es5-ext/array/#/exclusion)_\n\nReturns the array of elements that are found only in one of the lists (either context list or list provided in arguments).\n\n#### arr.fill(value[, start, end]) _(es5-ext/array/#/fill)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.fill).\n\n#### arr.filter(callback[, thisArg]) _(es5-ext/array/#/filter)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.filter). \nES6's version of `filter`, returns array of same type as the context.\n\n#### arr.find(predicate[, thisArg]) _(es5-ext/array/#/find)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.find). \nReturn first element for which given function returns true\n\n#### arr.findIndex(predicate[, thisArg]) _(es5-ext/array/#/find-index)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.findindex). \nReturn first index for which given function returns true\n\n#### arr.first() _(es5-ext/array/#/first)_\n\nReturns value for first defined index\n\n#### arr.firstIndex() _(es5-ext/array/#/first-index)_\n\nReturns first declared index of the array\n\n#### arr.flatten() _(es5-ext/array/#/flatten)_\n\nReturns flattened version of the array\n\n#### arr.forEachRight(cb[, thisArg]) _(es5-ext/array/#/for-each-right)_\n\n`forEach` starting from last element\n\n#### arr.group(cb[, thisArg]) _(es5-ext/array/#/group)_\n\nGroup list elements by value returned by _cb_ function\n\n#### arr.indexesOf(searchElement[, fromIndex]) _(es5-ext/array/#/indexes-of)_\n\nReturns array of all indexes of given value\n\n#### arr.intersection([…lists]) _(es5-ext/array/#/intersection)_\n\nComputes the array of values that are the intersection of all lists (context list and lists given in arguments)\n\n#### arr.isCopy(other) _(es5-ext/array/#/is-copy)_\n\nReturns true if both context and _other_ lists have same content\n\n#### arr.isUniq() _(es5-ext/array/#/is-uniq)_\n\nReturns true if all values in array are unique\n\n#### arr.keys() _(es5-ext/array/#/keys)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.keys). \nReturns iterator object, which traverses all array indexes.\n\n#### arr.last() _(es5-ext/array/#/last)_\n\nReturns value of last defined index\n\n#### arr.lastIndex() _(es5-ext/array/#/last)_\n\nReturns last defined index of the array\n\n#### arr.map(callback[, thisArg]) _(es5-ext/array/#/map)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.map). \nES6's version of `map`, returns array of same type as the context.\n\n#### arr.remove(value[, …valuen]) _(es5-ext/array/#/remove)_\n\nRemove values from the array\n\n#### arr.separate(sep) _(es5-ext/array/#/separate)_\n\nReturns array with items separated with `sep` value\n\n#### arr.slice(callback[, thisArg]) _(es5-ext/array/#/slice)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.slice). \nES6's version of `slice`, returns array of same type as the context.\n\n#### arr.someRight(cb[, thisArg]) _(es5-ext/array/#/someRight)_\n\n`some` starting from last element\n\n#### arr.splice(callback[, thisArg]) _(es5-ext/array/#/splice)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.splice). \nES6's version of `splice`, returns array of same type as the context.\n\n#### arr.uniq() _(es5-ext/array/#/uniq)_\n\nReturns duplicate-free version of the array\n\n#### arr.values() _(es5-ext/array/#/values)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.values). \nReturns iterator object which traverses all array values.\n\n#### arr[@@iterator] _(es5-ext/array/#/@@iterator)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype-@@iterator). \nReturns iterator object which traverses all array values.\n\n### Boolean Constructor extensions\n\n#### isBoolean(x) _(es5-ext/boolean/is-boolean)_\n\nWhether value is boolean\n\n### Date Constructor extensions\n\n#### isDate(x) _(es5-ext/date/is-date)_\n\nWhether value is date instance\n\n#### validDate(x) _(es5-ext/date/valid-date)_\n\nIf given object is not date throw TypeError in other case return it.\n\n### Date Prototype extensions\n\n#### date.copy(date) _(es5-ext/date/#/copy)_\n\nReturns a copy of the date object\n\n#### date.daysInMonth() _(es5-ext/date/#/days-in-month)_\n\nReturns number of days of date's month\n\n#### date.floorDay() _(es5-ext/date/#/floor-day)_\n\nSets the date time to 00:00:00.000\n\n#### date.floorMonth() _(es5-ext/date/#/floor-month)_\n\nSets date day to 1 and date time to 00:00:00.000\n\n#### date.floorYear() _(es5-ext/date/#/floor-year)_\n\nSets date month to 0, day to 1 and date time to 00:00:00.000\n\n#### date.format(pattern) _(es5-ext/date/#/format)_\n\nFormats date up to given string. Supported patterns:\n\n* `%Y` - Year with century, 1999, 2003\n* `%y` - Year without century, 99, 03\n* `%m` - Month, 01..12\n* `%d` - Day of the month 01..31\n* `%H` - Hour (24-hour clock), 00..23\n* `%M` - Minute, 00..59\n* `%S` - Second, 00..59\n* `%L` - Milliseconds, 000..999\n\n### Error Constructor extensions\n\n#### custom(message/_, code, ext_/) _(es5-ext/error/custom)_\n\nCreates custom error object, optinally extended with `code` and other extension properties (provided with `ext` object)\n\n#### isError(x) _(es5-ext/error/is-error)_\n\nWhether value is an error (instance of `Error`).\n\n#### validError(x) _(es5-ext/error/valid-error)_\n\nIf given object is not error throw TypeError in other case return it.\n\n### Error Prototype extensions\n\n#### err.throw() _(es5-ext/error/#/throw)_\n\nThrows error\n\n### Function Constructor extensions\n\nSome of the functions were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele\n\n#### constant(x) _(es5-ext/function/constant)_\n\nReturns a constant function that returns pregiven argument\n\n_k(x)(y) =def x_\n\n#### identity(x) _(es5-ext/function/identity)_\n\nIdentity function. Returns first argument\n\n_i(x) =def x_\n\n#### invoke(name[, …args]) _(es5-ext/function/invoke)_\n\nReturns a function that takes an object as an argument, and applies object's\n_name_ method to arguments. \n_name_ can be name of the method or method itself.\n\n_invoke(name, …args)(object, …args2) =def object\\[name\\]\\(…args, …args2\\)_\n\n#### isArguments(x) _(es5-ext/function/is-arguments)_\n\nWhether value is arguments object\n\n#### isFunction(arg) _(es5-ext/function/is-function)_\n\nWhether value is instance of function\n\n#### noop() _(es5-ext/function/noop)_\n\nNo operation function\n\n#### pluck(name) _(es5-ext/function/pluck)_\n\nReturns a function that takes an object, and returns the value of its _name_\nproperty\n\n_pluck(name)(obj) =def obj[name]_\n\n#### validFunction(arg) _(es5-ext/function/valid-function)_\n\nIf given object is not function throw TypeError in other case return it.\n\n### Function Prototype extensions\n\nSome of the methods were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele\n\n#### fn.compose([…fns]) _(es5-ext/function/#/compose)_\n\nApplies the functions in reverse argument-list order.\n\n_f1.compose(f2, f3, f4)(…args) =def f1(f2(f3(f4(…arg))))_\n\n#### fn.copy() _(es5-ext/function/#/copy)_\n\nProduces copy of given function\n\n#### fn.curry([n]) _(es5-ext/function/#/curry)_\n\nInvoking the function returned by this function only _n_ arguments are passed to the underlying function. If the underlying function is not saturated, the result is a function that passes all its arguments to the underlying function. \nIf _n_ is not provided then it defaults to context function length\n\n_f.curry(4)(arg1, arg2)(arg3)(arg4) =def f(arg1, args2, arg3, arg4)_\n\n#### fn.lock([…args]) _(es5-ext/function/#/lock)_\n\nReturns a function that applies the underlying function to _args_, and ignores its own arguments.\n\n_f.lock(…args)(…args2) =def f(…args)_\n\n_Named after it's counterpart in Google Closure_\n\n#### fn.not() _(es5-ext/function/#/not)_\n\nReturns a function that returns boolean negation of value returned by underlying function.\n\n_f.not()(…args) =def !f(…args)_\n\n#### fn.partial([…args]) _(es5-ext/function/#/partial)_\n\nReturns a function that when called will behave like context function called with initially passed arguments. If more arguments are suplilied, they are appended to initial args.\n\n_f.partial(…args1)(…args2) =def f(…args1, …args2)_\n\n#### fn.spread() _(es5-ext/function/#/spread)_\n\nReturns a function that applies underlying function with first list argument\n\n_f.match()(args) =def f.apply(null, args)_\n\n#### fn.toStringTokens() _(es5-ext/function/#/to-string-tokens)_\n\nSerializes function into two (arguments and body) string tokens. Result is plain object with `args` and `body` properties.\n\n### Math extensions\n\n#### acosh(x) _(es5-ext/math/acosh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.acosh).\n\n#### asinh(x) _(es5-ext/math/asinh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.asinh).\n\n#### atanh(x) _(es5-ext/math/atanh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.atanh).\n\n#### cbrt(x) _(es5-ext/math/cbrt)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cbrt).\n\n#### clz32(x) _(es5-ext/math/clz32)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.clz32).\n\n#### cosh(x) _(es5-ext/math/cosh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cosh).\n\n#### expm1(x) _(es5-ext/math/expm1)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.expm1).\n\n#### fround(x) _(es5-ext/math/fround)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround).\n\n#### hypot([…values]) _(es5-ext/math/hypot)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot).\n\n#### imul(x, y) _(es5-ext/math/imul)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.imul).\n\n#### log1p(x) _(es5-ext/math/log1p)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log1p).\n\n#### log2(x) _(es5-ext/math/log2)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log2).\n\n#### log10(x) _(es5-ext/math/log10)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log10).\n\n#### sign(x) _(es5-ext/math/sign)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sign).\n\n#### sinh(x) _(es5-ext/math/sinh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sinh).\n\n#### tanh(x) _(es5-ext/math/tanh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.tanh).\n\n#### trunc(x) _(es5-ext/math/trunc)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc).\n\n### Number Constructor extensions\n\n#### EPSILON _(es5-ext/number/epsilon)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.epsilon).\n\nThe difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately 2.2204460492503130808472633361816 x 10-16.\n\n#### isFinite(x) _(es5-ext/number/is-finite)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite). \nWhether value is finite. Differs from global isNaN that it doesn't do type coercion.\n\n#### isInteger(x) _(es5-ext/number/is-integer)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger). \nWhether value is integer.\n\n#### isNaN(x) _(es5-ext/number/is-nan)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan). \nWhether value is NaN. Differs from global isNaN that it doesn't do type coercion.\n\n#### isNumber(x) _(es5-ext/number/is-number)_\n\nWhether given value is number\n\n#### isSafeInteger(x) _(es5-ext/number/is-safe-integer)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.issafeinteger).\n\n#### MAX*SAFE_INTEGER *(es5-ext/number/max-safe-integer)\\_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.maxsafeinteger). \nThe value of Number.MAX_SAFE_INTEGER is 9007199254740991.\n\n#### MIN*SAFE_INTEGER *(es5-ext/number/min-safe-integer)\\_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.minsafeinteger). \nThe value of Number.MIN_SAFE_INTEGER is -9007199254740991 (253-1).\n\n#### toInteger(x) _(es5-ext/number/to-integer)_\n\nConverts value to integer\n\n#### toPosInteger(x) _(es5-ext/number/to-pos-integer)_\n\nConverts value to positive integer. If provided value is less than 0, then 0 is returned\n\n#### toUint32(x) _(es5-ext/number/to-uint32)_\n\nConverts value to unsigned 32 bit integer. This type is used for array lengths.\nSee: http://www.2ality.com/2012/02/js-integers.html\n\n### Number Prototype extensions\n\n#### num.pad(length[, precision]) _(es5-ext/number/#/pad)_\n\nPad given number with zeros. Returns string\n\n### Object Constructor extensions\n\n#### assign(target, source[, …sourcen]) _(es5-ext/object/assign)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign). \nExtend _target_ by enumerable own properties of other objects. If properties are already set on target object, they will be overwritten.\n\n#### clear(obj) _(es5-ext/object/clear)_\n\nRemove all enumerable own properties of the object\n\n#### compact(obj) _(es5-ext/object/compact)_\n\nReturns copy of the object with all enumerable properties that have no falsy values\n\n#### compare(obj1, obj2) _(es5-ext/object/compare)_\n\nUniversal cross-type compare function. To be used for e.g. array sort.\n\n#### copy(obj) _(es5-ext/object/copy)_\n\nReturns copy of the object with all enumerable properties.\n\n#### copyDeep(obj) _(es5-ext/object/copy-deep)_\n\nReturns deep copy of the object with all enumerable properties.\n\n#### count(obj) _(es5-ext/object/count)_\n\nCounts number of enumerable own properties on object\n\n#### create(obj[, properties]) _(es5-ext/object/create)_\n\n`Object.create` alternative that provides workaround for [V8 issue](http://code.google.com/p/v8/issues/detail?id=2804).\n\nWhen `null` is provided as a prototype, it's substituted with specially prepared object that derives from Object.prototype but has all Object.prototype properties shadowed with undefined.\n\nIt's quirky solution that allows us to have plain objects with no truthy properties but with turnable prototype.\n\nUse only for objects that you plan to switch prototypes of and be aware of limitations of this workaround.\n\n#### eq(x, y) _(es5-ext/object/eq)_\n\nWhether two values are equal, using [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.\n\n#### every(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/every)_\n\nAnalogous to Array.prototype.every. Returns true if every key-value pair in this object satisfies the provided testing function. \nOptionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### filter(obj, cb[, thisArg]) _(es5-ext/object/filter)_\n\nAnalogous to Array.prototype.filter. Returns new object with properites for which _cb_ function returned truthy value.\n\n#### firstKey(obj) _(es5-ext/object/first-key)_\n\nReturns first enumerable key of the object, as keys are unordered by specification, it can be any key of an object.\n\n#### flatten(obj) _(es5-ext/object/flatten)_\n\nReturns new object, with flatten properties of input object\n\n_flatten({ a: { b: 1 }, c: { d: 1 } }) =def { b: 1, d: 1 }_\n\n#### forEach(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/for-each)_\n\nAnalogous to Array.prototype.forEach. Calls a function for each key-value pair found in object\nOptionally _compareFn_ can be provided which assures that properties are iterated in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### getPropertyNames() _(es5-ext/object/get-property-names)_\n\nGet all (not just own) property names of the object\n\n#### is(x, y) _(es5-ext/object/is)_\n\nWhether two values are equal, using [_SameValue_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.\n\n#### isArrayLike(x) _(es5-ext/object/is-array-like)_\n\nWhether object is array-like object\n\n#### isCopy(x, y) _(es5-ext/object/is-copy)_\n\nTwo values are considered a copy of same value when all of their own enumerable properties have same values.\n\n#### isCopyDeep(x, y) _(es5-ext/object/is-copy-deep)_\n\nDeep comparision of objects\n\n#### isEmpty(obj) _(es5-ext/object/is-empty)_\n\nTrue if object doesn't have any own enumerable property\n\n#### isObject(arg) _(es5-ext/object/is-object)_\n\nWhether value is not primitive\n\n#### isPlainObject(arg) _(es5-ext/object/is-plain-object)_\n\nWhether object is plain object, its protototype should be Object.prototype and it cannot be host object.\n\n#### keyOf(obj, searchValue) _(es5-ext/object/key-of)_\n\nSearch object for value\n\n#### keys(obj) _(es5-ext/object/keys)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys). \nES6's version of `keys`, doesn't throw on primitive input\n\n#### map(obj, cb[, thisArg]) _(es5-ext/object/map)_\n\nAnalogous to Array.prototype.map. Creates a new object with properties which values are results of calling a provided function on every key-value pair in this object.\n\n#### mapKeys(obj, cb[, thisArg]) _(es5-ext/object/map-keys)_\n\nCreate new object with same values, but remapped keys\n\n#### mixin(target, source) _(es5-ext/object/mixin)_\n\nExtend _target_ by all own properties of other objects. Properties found in both objects will be overwritten (unless they're not configurable and cannot be overwritten).\n_It was for a moment part of ECMAScript 6 draft._\n\n#### mixinPrototypes(target, …source]) _(es5-ext/object/mixin-prototypes)_\n\nExtends _target_, with all source and source's prototype properties.\nUseful as an alternative for `setPrototypeOf` in environments in which it cannot be shimmed (no `__proto__` support).\n\n#### normalizeOptions(options) _(es5-ext/object/normalize-options)_\n\nNormalizes options object into flat plain object.\n\nUseful for functions in which we either need to keep options object for future reference or need to modify it for internal use.\n\n* It never returns input `options` object back (always a copy is created)\n* `options` can be undefined in such case empty plain object is returned.\n* Copies all enumerable properties found down prototype chain.\n\n#### primitiveSet([…names]) _(es5-ext/object/primitive-set)_\n\nCreates `null` prototype based plain object, and sets on it all property names provided in arguments to true.\n\n#### safeTraverse(obj[, …names]) _(es5-ext/object/safe-traverse)_\n\nSafe navigation of object properties. See http://wiki.ecmascript.org/doku.php?id=strawman:existential_operator\n\n#### serialize(value) _(es5-ext/object/serialize)_\n\nSerialize value into string. Differs from [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that it serializes also dates, functions and regular expresssions.\n\n#### setPrototypeOf(object, proto) _(es5-ext/object/set-prototype-of)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.setprototypeof). \nIf native version is not provided, it depends on existence of `__proto__` functionality, if it's missing, `null` instead of function is exposed.\n\n#### some(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/some)_\n\nAnalogous to Array.prototype.some Returns true if any key-value pair satisfies the provided\ntesting function. \nOptionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### toArray(obj[, cb[, thisArg[, compareFn]]]) _(es5-ext/object/to-array)_\n\nCreates an array of results of calling a provided function on every key-value pair in this object. \nOptionally _compareFn_ can be provided which assures that results are added in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### unserialize(str) _(es5-ext/object/unserialize)_\n\nUserializes value previously serialized with [serialize](#serializevalue-es5-extobjectserialize)\n\n#### validCallable(x) _(es5-ext/object/valid-callable)_\n\nIf given object is not callable throw TypeError in other case return it.\n\n#### validObject(x) _(es5-ext/object/valid-object)_\n\nThrows error if given value is not an object, otherwise it is returned.\n\n#### validValue(x) _(es5-ext/object/valid-value)_\n\nThrows error if given value is `null` or `undefined`, otherwise returns value.\n\n### RegExp Constructor extensions\n\n#### escape(str) _(es5-ext/reg-exp/escape)_\n\nEscapes string to be used in regular expression\n\n#### isRegExp(x) _(es5-ext/reg-exp/is-reg-exp)_\n\nWhether object is regular expression\n\n#### validRegExp(x) _(es5-ext/reg-exp/valid-reg-exp)_\n\nIf object is regular expression it is returned, otherwise TypeError is thrown.\n\n### RegExp Prototype extensions\n\n#### re.isSticky(x) _(es5-ext/reg-exp/#/is-sticky)_\n\nWhether regular expression has `sticky` flag.\n\nIt's to be used as counterpart to [regExp.sticky](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.sticky) if it's not implemented.\n\n#### re.isUnicode(x) _(es5-ext/reg-exp/#/is-unicode)_\n\nWhether regular expression has `unicode` flag.\n\nIt's to be used as counterpart to [regExp.unicode](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.unicode) if it's not implemented.\n\n#### re.match(string) _(es5-ext/reg-exp/#/match)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.match).\n\n#### re.replace(string, replaceValue) _(es5-ext/reg-exp/#/replace)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.replace).\n\n#### re.search(string) _(es5-ext/reg-exp/#/search)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.search).\n\n#### re.split(string) _(es5-ext/reg-exp/#/search)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.split).\n\n#### re.sticky _(es5-ext/reg-exp/#/sticky/implement)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.sticky). \nIt's a getter, so only `implement` and `is-implemented` modules are provided.\n\n#### re.unicode _(es5-ext/reg-exp/#/unicode/implement)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.unicode). \nIt's a getter, so only `implement` and `is-implemented` modules are provided.\n\n### String Constructor extensions\n\n#### formatMethod(fMap) _(es5-ext/string/format-method)_\n\nCreates format method. It's used e.g. to create `Date.prototype.format` method\n\n#### fromCodePoint([…codePoints]) _(es5-ext/string/from-code-point)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint)\n\n#### isString(x) _(es5-ext/string/is-string)_\n\nWhether object is string\n\n#### randomUniq() _(es5-ext/string/random-uniq)_\n\nReturns randomly generated id, with guarantee of local uniqueness (no same id will be returned twice)\n\n#### raw(callSite[, …substitutions]) _(es5-ext/string/raw)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.raw)\n\n### String Prototype extensions\n\n#### str.at(pos) _(es5-ext/string/#/at)_\n\n_Proposed for ECMAScript 6/7 standard, but not (yet) in a draft_\n\nReturns a string at given position in Unicode-safe manner.\nBased on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.at).\n\n#### str.camelToHyphen() _(es5-ext/string/#/camel-to-hyphen)_\n\nConvert camelCase string to hyphen separated, e.g. one-two-three -> oneTwoThree.\nUseful when converting names from js property convention into filename convention.\n\n#### str.capitalize() _(es5-ext/string/#/capitalize)_\n\nCapitalize first character of a string\n\n#### str.caseInsensitiveCompare(str) _(es5-ext/string/#/case-insensitive-compare)_\n\nCase insensitive compare\n\n#### str.codePointAt(pos) _(es5-ext/string/#/code-point-at)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.codepointat)\n\nBased on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.codePointAt).\n\n#### str.contains(searchString[, position]) _(es5-ext/string/#/contains)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains)\n\nWhether string contains given string.\n\n#### str.endsWith(searchString[, endPosition]) _(es5-ext/string/#/ends-with)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith). \nWhether strings ends with given string\n\n#### str.hyphenToCamel() _(es5-ext/string/#/hyphen-to-camel)_\n\nConvert hyphen separated string to camelCase, e.g. one-two-three -> oneTwoThree.\nUseful when converting names from filename convention to js property name convention.\n\n#### str.indent(str[, count]) _(es5-ext/string/#/indent)_\n\nIndents each line with provided _str_ (if _count_ given then _str_ is repeated _count_ times).\n\n#### str.last() _(es5-ext/string/#/last)_\n\nReturn last character\n\n#### str.normalize([form]) _(es5-ext/string/#/normalize)_\n\n[_Introduced with ECMAScript 6_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize). \nReturns the Unicode Normalization Form of a given string. \nBased on Matsuza's version. Code used for integrated shim can be found at [github.com/walling/unorm](https://github.com/walling/unorm/blob/master/lib/unorm.js)\n\n#### str.pad(fill[, length]) _(es5-ext/string/#/pad)_\n\nPad string with _fill_.\nIf _length_ si given than _fill_ is reapated _length_ times.\nIf _length_ is negative then pad is applied from right.\n\n#### str.repeat(n) _(es5-ext/string/#/repeat)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.repeat). \nRepeat given string _n_ times\n\n#### str.plainReplace(search, replace) _(es5-ext/string/#/plain-replace)_\n\nSimple `replace` version. Doesn't support regular expressions. Replaces just first occurrence of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).\n\n#### str.plainReplaceAll(search, replace) _(es5-ext/string/#/plain-replace-all)_\n\nSimple `replace` version. Doesn't support regular expressions. Replaces all occurrences of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).\n\n#### str.startsWith(searchString[, position]) _(es5-ext/string/#/starts-with)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.startswith). \nWhether strings starts with given string\n\n#### str[@@iterator] _(es5-ext/string/#/@@iterator)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype-@@iterator). \nReturns iterator object which traverses all string characters (with respect to unicode symbols)\n\n### Tests\n\n $ npm test\n\n[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/es5-ext/branches/master/shields_badge.svg\n[nix-build-url]: https://semaphoreci.com/medikoo-org/es5-ext\n[win-build-image]: https://ci.appveyor.com/api/projects/status/3jox67ksw3p8hkwh?svg=true\n[win-build-url]: https://ci.appveyor.com/project/medikoo/es5-ext\n[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg\n[npm-image]: https://img.shields.io/npm/v/es5-ext.svg\n[npm-url]: https://www.npmjs.com/package/es5-ext\n", - "readmeFilename": "README.md", - "bugs": "[Circular]", - "homepage": "https://github.com/medikoo/es5-ext#readme", - "_id": "es5-ext@0.10.45", - "_requested": { - "type": "version", - "registry": true, - "raw": "es5-ext@0.10.45", - "name": "es5-ext", - "escapedName": "es5-ext", - "rawSpec": "0.10.45", - "saveSpec": "[Circular]", - "fetchSpec": "0.10.45" - }, - "_spec": "0.10.45", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": "[Circular]", - "optionalDependencies": "[Circular]", - "_dependencies": "[Circular]", - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/es5-ext", - "error": "[Circular]", - "extraneous": false, - "_deduped": "es5-ext" - } - }, - "devDependencies": { - "tad": "^0.2.4", - "xlint": "^0.2.2", - "xlint-jslint-medikoo": "^0.1.4" - }, - "scripts": { - "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", - "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", - "test": "node node_modules/tad/bin/tad" - }, - "license": "MIT", - "_resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "_integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", - "_from": "d@1.0.0", - "readme": "# D\n## Property descriptor factory\n\n_Originally derived from [es5-ext](https://github.com/medikoo/es5-ext) package._\n\nDefining properties with descriptors is very verbose:\n\n```javascript\nvar Account = function () {};\nObject.defineProperties(Account.prototype, {\n deposit: { value: function () {\n /* ... */\n }, configurable: true, enumerable: false, writable: true },\n withdraw: { value: function () {\n /* ... */\n }, configurable: true, enumerable: false, writable: true },\n balance: { get: function () {\n /* ... */\n }, configurable: true, enumerable: false }\n});\n```\n\nD cuts that to:\n\n```javascript\nvar d = require('d');\n\nvar Account = function () {};\nObject.defineProperties(Account.prototype, {\n deposit: d(function () {\n /* ... */\n }),\n withdraw: d(function () {\n /* ... */\n }),\n balance: d.gs(function () {\n /* ... */\n })\n});\n```\n\nBy default, created descriptor follow characteristics of native ES5 properties, and defines values as:\n\n```javascript\n{ configurable: true, enumerable: false, writable: true }\n```\n\nYou can overwrite it by preceding _value_ argument with instruction:\n```javascript\nd('c', value); // { configurable: true, enumerable: false, writable: false }\nd('ce', value); // { configurable: true, enumerable: true, writable: false }\nd('e', value); // { configurable: false, enumerable: true, writable: false }\n\n// Same way for get/set:\nd.gs('e', value); // { configurable: false, enumerable: true }\n```\n\n### Installation\n\n\t$ npm install d\n\t\nTo port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)\n\n### Other utilities\n\n#### autoBind(obj, props) _(d/auto-bind)_\n\nDefine methods which will be automatically bound to its instances\n\n```javascript\nvar d = require('d');\nvar autoBind = require('d/auto-bind');\n\nvar Foo = function () { this._count = 0; };\nObject.defineProperties(Foo.prototype, autoBind({\n increment: d(function () { ++this._count; });\n}));\n\nvar foo = new Foo();\n\n// Increment foo counter on each domEl click\ndomEl.addEventListener('click', foo.increment, false);\n```\n\n#### lazy(obj, props) _(d/lazy)_\n\nDefine lazy properties, which will be resolved on first access\n\n```javascript\nvar d = require('d');\nvar lazy = require('d/lazy');\n\nvar Foo = function () {};\nObject.defineProperties(Foo.prototype, lazy({\n items: d(function () { return []; })\n}));\n\nvar foo = new Foo();\nfoo.items.push(1, 2); // foo.items array created and defined directly on foo\n```\n\n## Tests [![Build Status](https://travis-ci.org/medikoo/d.png)](https://travis-ci.org/medikoo/d)\n\n\t$ npm test\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/medikoo/d/issues" - }, - "homepage": "https://github.com/medikoo/d#readme", - "_id": "d@1.0.0", - "_requested": { - "type": "version", - "registry": true, - "raw": "d@1.0.0", - "name": "d", - "escapedName": "d", - "rawSpec": "1.0.0", - "saveSpec": "[Circular]", - "fetchSpec": "1.0.0" - }, - "_spec": "1.0.0", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "d@1.0.0", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": { - "es5-ext": "^0.10.9" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/es6-iterator/node_modules/d", - "error": "[Circular]", - "extraneous": false - }, - "es6-symbol": { - "name": "es6-symbol", - "version": "3.1.1", - "description": "ECMAScript 6 Symbol polyfill", - "author": { - "name": "Mariusz Nowak", - "email": "medyk@medikoo.com", - "url": "http://www.medikoo.com/" - }, - "keywords": [ - "symbol", - "private", - "property", - "es6", - "ecmascript", - "harmony", - "ponyfill", - "polyfill" - ], - "repository": { - "type": "git", - "url": "git://github.com/medikoo/es6-symbol.git" - }, - "dependencies": {}, - "devDependencies": { - "tad": "~0.2.7", - "xlint": "~0.2.2", - "xlint-jslint-medikoo": "~0.1.4" - }, - "scripts": { - "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", - "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", - "test": "node ./node_modules/tad/bin/tad" - }, - "license": "MIT", - "_resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "_integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "_from": "es6-symbol@3.1.1", - "readme": "# es6-symbol\n## ECMAScript 6 Symbol polyfill\n\nFor more information about symbols see following links\n- [Symbols in ECMAScript 6 by Axel Rauschmayer](http://www.2ality.com/2014/12/es6-symbols.html)\n- [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol)\n- [Specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-constructor)\n\n### Limitations\n\nUnderneath it uses real string property names which can easily be retrieved, however accidental collision with other property names is unlikely.\n\n### Usage\n\nIf you'd like to use native version when it exists and fallback to [ponyfill](https://ponyfill.com) if it doesn't, use *es6-symbol* as following:\n\n```javascript\nvar Symbol = require('es6-symbol');\n```\n\nIf you want to make sure your environment implements `Symbol` globally, do:\n\n```javascript\nrequire('es6-symbol/implement');\n```\n\nIf you strictly want to use polyfill even if native `Symbol` exists (hard to find a good reason for that), do:\n\n```javascript\nvar Symbol = require('es6-symbol/polyfill');\n```\n\n#### API\n\nBest is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-objects). Still if you want quick look, follow examples:\n\n```javascript\nvar Symbol = require('es6-symbol');\n\nvar symbol = Symbol('My custom symbol');\nvar x = {};\n\nx[symbol] = 'foo';\nconsole.log(x[symbol]); 'foo'\n\n// Detect iterable:\nvar iterator, result;\nif (possiblyIterable[Symbol.iterator]) {\n iterator = possiblyIterable[Symbol.iterator]();\n result = iterator.next();\n while(!result.done) {\n console.log(result.value);\n result = iterator.next();\n }\n}\n```\n\n### Installation\n#### NPM\n\nIn your project path:\n\n\t$ npm install es6-symbol\n\n##### Browser\n\nTo port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)\n\n## Tests [![Build Status](https://travis-ci.org/medikoo/es6-symbol.png)](https://travis-ci.org/medikoo/es6-symbol)\n\n\t$ npm test\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/medikoo/es6-symbol/issues" - }, - "homepage": "https://github.com/medikoo/es6-symbol#readme", - "_id": "es6-symbol@3.1.1", - "_requested": { - "type": "version", - "registry": true, - "raw": "es6-symbol@3.1.1", - "name": "es6-symbol", - "escapedName": "es6-symbol", - "rawSpec": "3.1.1", - "saveSpec": "[Circular]", - "fetchSpec": "3.1.1" - }, - "_spec": "3.1.1", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "es6-symbol@3.1.1", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": { - "d": "1", - "es5-ext": "~0.10.14" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/es6-symbol", - "error": "[Circular]", - "extraneous": false, - "_deduped": "es6-symbol" - } - }, - "devDependencies": { - "eslint": "^4.9", - "eslint-config-medikoo-es5": "^1.4.4", - "event-emitter": "^0.3.5", - "tad": "^0.2.7" - }, - "eslintConfig": { - "extends": "medikoo-es5", - "root": true, - "rules": { - "no-extend-native": "off" - } - }, - "scripts": { - "lint": "eslint --ignore-path=.gitignore .", - "test": "node ./node_modules/tad/bin/tad" - }, - "license": "MIT", - "_resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "_integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "_from": "es6-iterator@2.0.3", - "readme": "# es6-iterator\n## ECMAScript 6 Iterator interface\n\n### Installation\n\n\t$ npm install es6-iterator\n\t\nTo port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)\n\n## API\n\n### Constructors\n\n#### Iterator(list) _(es6-iterator)_\n\nAbstract Iterator interface. Meant for extensions and not to be used on its own.\n\nAccepts any _list_ object (technically object with numeric _length_ property).\n\n_Mind it doesn't iterate strings properly, for that use dedicated [StringIterator](#string-iterator)_\n\n```javascript\nvar Iterator = require('es6-iterator')\nvar iterator = new Iterator([1, 2, 3]);\n\niterator.next(); // { value: 1, done: false }\niterator.next(); // { value: 2, done: false }\niterator.next(); // { value: 3, done: false }\niterator.next(); // { value: undefined, done: true }\n```\n\n\n#### ArrayIterator(arrayLike[, kind]) _(es6-iterator/array)_\n\nDedicated for arrays and array-likes. Supports three iteration kinds:\n* __value__ _(default)_ - Iterates values\n* __key__ - Iterates indexes\n* __key+value__ - Iterates keys and indexes, each iteration value is in _[key, value]_ form.\n\n\n```javascript\nvar ArrayIterator = require('es6-iterator/array')\nvar iterator = new ArrayIterator([1, 2, 3], 'key+value');\n\niterator.next(); // { value: [0, 1], done: false }\niterator.next(); // { value: [1, 2], done: false }\niterator.next(); // { value: [2, 3], done: false }\niterator.next(); // { value: undefined, done: true }\n```\n\nMay also be used for _arguments_ objects:\n\n```javascript\n(function () {\n var iterator = new ArrayIterator(arguments);\n\n iterator.next(); // { value: 1, done: false }\n iterator.next(); // { value: 2, done: false }\n iterator.next(); // { value: 3, done: false }\n iterator.next(); // { value: undefined, done: true }\n}(1, 2, 3));\n```\n\n#### StringIterator(str) _(es6-iterator/string)_\n\nAssures proper iteration over unicode symbols. \nSee: http://mathiasbynens.be/notes/javascript-unicode\n\n```javascript\nvar StringIterator = require('es6-iterator/string');\nvar iterator = new StringIterator('f🙈o🙉o🙊');\n\niterator.next(); // { value: 'f', done: false }\niterator.next(); // { value: '🙈', done: false }\niterator.next(); // { value: 'o', done: false }\niterator.next(); // { value: '🙉', done: false }\niterator.next(); // { value: 'o', done: false }\niterator.next(); // { value: '🙊', done: false }\niterator.next(); // { value: undefined, done: true }\n```\n\n### Function utilities\n\n#### forOf(iterable, callback[, thisArg]) _(es6-iterator/for-of)_\n\nPolyfill for ECMAScript 6 [`for...of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) statement.\n\n```\nvar forOf = require('es6-iterator/for-of');\nvar result = [];\n\nforOf('🙈🙉🙊', function (monkey) { result.push(monkey); });\nconsole.log(result); // ['🙈', '🙉', '🙊'];\n```\n\nOptionally you can break iteration at any point:\n\n```javascript\nvar result = [];\n\nforOf([1,2,3,4]', function (val, doBreak) {\n result.push(monkey);\n if (val >= 3) doBreak();\n});\nconsole.log(result); // [1, 2, 3];\n```\n\n#### get(obj) _(es6-iterator/get)_\n\nReturn iterator for any iterable object.\n\n```javascript\nvar getIterator = require('es6-iterator/get');\nvar iterator = get([1,2,3]);\n\niterator.next(); // { value: 1, done: false }\niterator.next(); // { value: 2, done: false }\niterator.next(); // { value: 3, done: false }\niterator.next(); // { value: undefined, done: true }\n```\n\n#### isIterable(obj) _(es6-iterator/is-iterable)_\n\nWhether _obj_ is iterable\n\n```javascript\nvar isIterable = require('es6-iterator/is-iterable');\n\nisIterable(null); // false\nisIterable(true); // false\nisIterable('str'); // true\nisIterable(['a', 'r', 'r']); // true\nisIterable(new ArrayIterator([])); // true\n```\n\n#### validIterable(obj) _(es6-iterator/valid-iterable)_\n\nIf _obj_ is an iterable it is returned. Otherwise _TypeError_ is thrown.\n\n### Method extensions\n\n#### iterator.chain(iterator1[, …iteratorn]) _(es6-iterator/#/chain)_\n\nChain multiple iterators into one.\n\n### Tests [![Build Status](https://travis-ci.org/medikoo/es6-iterator.png)](https://travis-ci.org/medikoo/es6-iterator)\n\n\t$ npm test\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/medikoo/es6-iterator/issues" - }, - "homepage": "https://github.com/medikoo/es6-iterator#readme", - "_id": "es6-iterator@2.0.3", - "_requested": { - "type": "version", - "registry": true, - "raw": "es6-iterator@2.0.3", - "name": "es6-iterator", - "escapedName": "es6-iterator", - "rawSpec": "2.0.3", - "saveSpec": "[Circular]", - "fetchSpec": "2.0.3" - }, - "_spec": "2.0.3", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "es6-iterator@2.0.3", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/es6-iterator", - "error": "[Circular]", - "extraneous": false - }, - "es6-symbol": { - "name": "es6-symbol", - "version": "3.1.1", - "description": "ECMAScript 6 Symbol polyfill", - "author": "[Circular]", - "keywords": "[Circular]", - "repository": "[Circular]", - "dependencies": { - "es5-ext": { - "name": "es5-ext", - "version": "0.10.45", - "description": "ECMAScript extensions and shims", - "author": "[Circular]", - "keywords": "[Circular]", - "repository": "[Circular]", - "dependencies": {}, - "devDependencies": "[Circular]", - "eslintConfig": "[Circular]", - "scripts": "[Circular]", - "license": "ISC", - "_resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", - "_integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", - "_from": "es5-ext@0.10.45", - "readme": "[![Build status][nix-build-image]][nix-build-url]\n[![Windows status][win-build-image]][win-build-url]\n![Transpilation status][transpilation-image]\n[![npm version][npm-image]][npm-url]\n\n# es5-ext\n\n## ECMAScript 5 extensions\n\n### (with respect to ECMAScript 6 standard)\n\nShims for upcoming ES6 standard and other goodies implemented strictly with ECMAScript conventions in mind.\n\nIt's designed to be used in compliant ECMAScript 5 or ECMAScript 6 environments. Older environments are not supported, although most of the features should work with correct ECMAScript 5 shim on board.\n\nWhen used in ECMAScript 6 environment, native implementation (if valid) takes precedence over shims.\n\n### Installation\n\n $ npm install es5-ext\n\nTo port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)\n\n### Usage\n\n#### ECMAScript 6 features\n\nYou can force ES6 features to be implemented in your environment, e.g. following will assign `from` function to `Array` (only if it's not implemented already).\n\n```javascript\nrequire(\"es5-ext/array/from/implement\");\nArray.from(\"foo\"); // ['f', 'o', 'o']\n```\n\nYou can also access shims directly, without fixing native objects. Following will return native `Array.from` if it's available and fallback to shim if it's not.\n\n```javascript\nvar aFrom = require(\"es5-ext/array/from\");\naFrom(\"foo\"); // ['f', 'o', 'o']\n```\n\nIf you want to use shim unconditionally (even if native implementation exists) do:\n\n```javascript\nvar aFrom = require(\"es5-ext/array/from/shim\");\naFrom(\"foo\"); // ['f', 'o', 'o']\n```\n\n##### List of ES6 shims\n\nIt's about properties introduced with ES6 and those that have been updated in new spec.\n\n* `Array.from` -> `require('es5-ext/array/from')`\n* `Array.of` -> `require('es5-ext/array/of')`\n* `Array.prototype.concat` -> `require('es5-ext/array/#/concat')`\n* `Array.prototype.copyWithin` -> `require('es5-ext/array/#/copy-within')`\n* `Array.prototype.entries` -> `require('es5-ext/array/#/entries')`\n* `Array.prototype.fill` -> `require('es5-ext/array/#/fill')`\n* `Array.prototype.filter` -> `require('es5-ext/array/#/filter')`\n* `Array.prototype.find` -> `require('es5-ext/array/#/find')`\n* `Array.prototype.findIndex` -> `require('es5-ext/array/#/find-index')`\n* `Array.prototype.keys` -> `require('es5-ext/array/#/keys')`\n* `Array.prototype.map` -> `require('es5-ext/array/#/map')`\n* `Array.prototype.slice` -> `require('es5-ext/array/#/slice')`\n* `Array.prototype.splice` -> `require('es5-ext/array/#/splice')`\n* `Array.prototype.values` -> `require('es5-ext/array/#/values')`\n* `Array.prototype[@@iterator]` -> `require('es5-ext/array/#/@@iterator')`\n* `Math.acosh` -> `require('es5-ext/math/acosh')`\n* `Math.asinh` -> `require('es5-ext/math/asinh')`\n* `Math.atanh` -> `require('es5-ext/math/atanh')`\n* `Math.cbrt` -> `require('es5-ext/math/cbrt')`\n* `Math.clz32` -> `require('es5-ext/math/clz32')`\n* `Math.cosh` -> `require('es5-ext/math/cosh')`\n* `Math.exmp1` -> `require('es5-ext/math/expm1')`\n* `Math.fround` -> `require('es5-ext/math/fround')`\n* `Math.hypot` -> `require('es5-ext/math/hypot')`\n* `Math.imul` -> `require('es5-ext/math/imul')`\n* `Math.log1p` -> `require('es5-ext/math/log1p')`\n* `Math.log2` -> `require('es5-ext/math/log2')`\n* `Math.log10` -> `require('es5-ext/math/log10')`\n* `Math.sign` -> `require('es5-ext/math/sign')`\n* `Math.signh` -> `require('es5-ext/math/signh')`\n* `Math.tanh` -> `require('es5-ext/math/tanh')`\n* `Math.trunc` -> `require('es5-ext/math/trunc')`\n* `Number.EPSILON` -> `require('es5-ext/number/epsilon')`\n* `Number.MAX_SAFE_INTEGER` -> `require('es5-ext/number/max-safe-integer')`\n* `Number.MIN_SAFE_INTEGER` -> `require('es5-ext/number/min-safe-integer')`\n* `Number.isFinite` -> `require('es5-ext/number/is-finite')`\n* `Number.isInteger` -> `require('es5-ext/number/is-integer')`\n* `Number.isNaN` -> `require('es5-ext/number/is-nan')`\n* `Number.isSafeInteger` -> `require('es5-ext/number/is-safe-integer')`\n* `Object.assign` -> `require('es5-ext/object/assign')`\n* `Object.keys` -> `require('es5-ext/object/keys')`\n* `Object.setPrototypeOf` -> `require('es5-ext/object/set-prototype-of')`\n* `RegExp.prototype.match` -> `require('es5-ext/reg-exp/#/match')`\n* `RegExp.prototype.replace` -> `require('es5-ext/reg-exp/#/replace')`\n* `RegExp.prototype.search` -> `require('es5-ext/reg-exp/#/search')`\n* `RegExp.prototype.split` -> `require('es5-ext/reg-exp/#/split')`\n* `RegExp.prototype.sticky` -> Implement with `require('es5-ext/reg-exp/#/sticky/implement')`, use as function with `require('es5-ext/reg-exp/#/is-sticky')`\n* `RegExp.prototype.unicode` -> Implement with `require('es5-ext/reg-exp/#/unicode/implement')`, use as function with `require('es5-ext/reg-exp/#/is-unicode')`\n* `String.fromCodePoint` -> `require('es5-ext/string/from-code-point')`\n* `String.raw` -> `require('es5-ext/string/raw')`\n* `String.prototype.codePointAt` -> `require('es5-ext/string/#/code-point-at')`\n* `String.prototype.contains` -> `require('es5-ext/string/#/contains')`\n* `String.prototype.endsWith` -> `require('es5-ext/string/#/ends-with')`\n* `String.prototype.normalize` -> `require('es5-ext/string/#/normalize')`\n* `String.prototype.repeat` -> `require('es5-ext/string/#/repeat')`\n* `String.prototype.startsWith` -> `require('es5-ext/string/#/starts-with')`\n* `String.prototype[@@iterator]` -> `require('es5-ext/string/#/@@iterator')`\n\n#### Non ECMAScript standard features\n\n**es5-ext** provides also other utils, and implements them as if they were proposed for a standard. It mostly offers methods (not functions) which can directly be assigned to native prototypes:\n\n```javascript\nObject.defineProperty(Function.prototype, \"partial\", {\n\tvalue: require(\"es5-ext/function/#/partial\"),\n\tconfigurable: true,\n\tenumerable: false,\n\twritable: true\n});\nObject.defineProperty(Array.prototype, \"flatten\", {\n\tvalue: require(\"es5-ext/array/#/flatten\"),\n\tconfigurable: true,\n\tenumerable: false,\n\twritable: true\n});\nObject.defineProperty(String.prototype, \"capitalize\", {\n\tvalue: require(\"es5-ext/string/#/capitalize\"),\n\tconfigurable: true,\n\tenumerable: false,\n\twritable: true\n});\n```\n\nSee [es5-extend](https://github.com/wookieb/es5-extend#es5-extend), a great utility that automatically will extend natives for you.\n\n**Important:** Remember to **not** extend natives in scope of generic reusable packages (e.g. ones you intend to publish to npm). Extending natives is fine **only** if you're the _owner_ of the global scope, so e.g. in final project you lead development of.\n\nWhen you're in situation when native extensions are not good idea, then you should use methods indirectly:\n\n```javascript\nvar flatten = require(\"es5-ext/array/#/flatten\");\n\nflatten.call([1, [2, [3, 4]]]); // [1, 2, 3, 4]\n```\n\nfor better convenience you can turn methods into functions:\n\n```javascript\nvar call = Function.prototype.call;\nvar flatten = call.bind(require(\"es5-ext/array/#/flatten\"));\n\nflatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]\n```\n\nYou can configure custom toolkit (like [underscorejs](http://underscorejs.org/)), and use it throughout your application\n\n```javascript\nvar util = {};\nutil.partial = call.bind(require(\"es5-ext/function/#/partial\"));\nutil.flatten = call.bind(require(\"es5-ext/array/#/flatten\"));\nutil.startsWith = call.bind(require(\"es5-ext/string/#/starts-with\"));\n\nutil.flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]\n```\n\nAs with native ones most methods are generic and can be run on any type of object.\n\n## API\n\n### Global extensions\n\n#### global _(es5-ext/global)_\n\nObject that represents global scope\n\n### Array Constructor extensions\n\n#### from(arrayLike[, mapFn[, thisArg]]) _(es5-ext/array/from)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from). \nReturns array representation of _iterable_ or _arrayLike_. If _arrayLike_ is an instance of array, its copy is returned.\n\n#### generate([length[, …fill]]) _(es5-ext/array/generate)_\n\nGenerate an array of pre-given _length_ built of repeated arguments.\n\n#### isPlainArray(x) _(es5-ext/array/is-plain-array)_\n\nReturns true if object is plain array (not instance of one of the Array's extensions).\n\n#### of([…items]) _(es5-ext/array/of)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.of). \nCreate an array from given arguments.\n\n#### toArray(obj) _(es5-ext/array/to-array)_\n\nReturns array representation of `obj`. If `obj` is already an array, `obj` is returned back.\n\n#### validArray(obj) _(es5-ext/array/valid-array)_\n\nReturns `obj` if it's an array, otherwise throws `TypeError`\n\n### Array Prototype extensions\n\n#### arr.binarySearch(compareFn) _(es5-ext/array/#/binary-search)_\n\nIn **sorted** list search for index of item for which _compareFn_ returns value closest to _0_. \nIt's variant of binary search algorithm\n\n#### arr.clear() _(es5-ext/array/#/clear)_\n\nClears the array\n\n#### arr.compact() _(es5-ext/array/#/compact)_\n\nReturns a copy of the context with all non-values (`null` or `undefined`) removed.\n\n#### arr.concat() _(es5-ext/array/#/concat)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.concat). \nES6's version of `concat`. Supports `isConcatSpreadable` symbol, and returns array of same type as the context.\n\n#### arr.contains(searchElement[, position]) _(es5-ext/array/#/contains)_\n\nWhether list contains the given value.\n\n#### arr.copyWithin(target, start[, end]) _(es5-ext/array/#/copy-within)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.copywithin).\n\n#### arr.diff(other) _(es5-ext/array/#/diff)_\n\nReturns the array of elements that are present in context list but not present in other list.\n\n#### arr.eIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-index-of)_\n\n_egal_ version of `indexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision\n\n#### arr.eLastIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-last-index-of)_\n\n_egal_ version of `lastIndexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision\n\n#### arr.entries() _(es5-ext/array/#/entries)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.entries). \nReturns iterator object, which traverses the array. Each value is represented with an array, where first value is an index and second is corresponding to index value.\n\n#### arr.exclusion([…lists]]) _(es5-ext/array/#/exclusion)_\n\nReturns the array of elements that are found only in one of the lists (either context list or list provided in arguments).\n\n#### arr.fill(value[, start, end]) _(es5-ext/array/#/fill)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.fill).\n\n#### arr.filter(callback[, thisArg]) _(es5-ext/array/#/filter)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.filter). \nES6's version of `filter`, returns array of same type as the context.\n\n#### arr.find(predicate[, thisArg]) _(es5-ext/array/#/find)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.find). \nReturn first element for which given function returns true\n\n#### arr.findIndex(predicate[, thisArg]) _(es5-ext/array/#/find-index)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.findindex). \nReturn first index for which given function returns true\n\n#### arr.first() _(es5-ext/array/#/first)_\n\nReturns value for first defined index\n\n#### arr.firstIndex() _(es5-ext/array/#/first-index)_\n\nReturns first declared index of the array\n\n#### arr.flatten() _(es5-ext/array/#/flatten)_\n\nReturns flattened version of the array\n\n#### arr.forEachRight(cb[, thisArg]) _(es5-ext/array/#/for-each-right)_\n\n`forEach` starting from last element\n\n#### arr.group(cb[, thisArg]) _(es5-ext/array/#/group)_\n\nGroup list elements by value returned by _cb_ function\n\n#### arr.indexesOf(searchElement[, fromIndex]) _(es5-ext/array/#/indexes-of)_\n\nReturns array of all indexes of given value\n\n#### arr.intersection([…lists]) _(es5-ext/array/#/intersection)_\n\nComputes the array of values that are the intersection of all lists (context list and lists given in arguments)\n\n#### arr.isCopy(other) _(es5-ext/array/#/is-copy)_\n\nReturns true if both context and _other_ lists have same content\n\n#### arr.isUniq() _(es5-ext/array/#/is-uniq)_\n\nReturns true if all values in array are unique\n\n#### arr.keys() _(es5-ext/array/#/keys)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.keys). \nReturns iterator object, which traverses all array indexes.\n\n#### arr.last() _(es5-ext/array/#/last)_\n\nReturns value of last defined index\n\n#### arr.lastIndex() _(es5-ext/array/#/last)_\n\nReturns last defined index of the array\n\n#### arr.map(callback[, thisArg]) _(es5-ext/array/#/map)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.map). \nES6's version of `map`, returns array of same type as the context.\n\n#### arr.remove(value[, …valuen]) _(es5-ext/array/#/remove)_\n\nRemove values from the array\n\n#### arr.separate(sep) _(es5-ext/array/#/separate)_\n\nReturns array with items separated with `sep` value\n\n#### arr.slice(callback[, thisArg]) _(es5-ext/array/#/slice)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.slice). \nES6's version of `slice`, returns array of same type as the context.\n\n#### arr.someRight(cb[, thisArg]) _(es5-ext/array/#/someRight)_\n\n`some` starting from last element\n\n#### arr.splice(callback[, thisArg]) _(es5-ext/array/#/splice)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.splice). \nES6's version of `splice`, returns array of same type as the context.\n\n#### arr.uniq() _(es5-ext/array/#/uniq)_\n\nReturns duplicate-free version of the array\n\n#### arr.values() _(es5-ext/array/#/values)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.values). \nReturns iterator object which traverses all array values.\n\n#### arr[@@iterator] _(es5-ext/array/#/@@iterator)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype-@@iterator). \nReturns iterator object which traverses all array values.\n\n### Boolean Constructor extensions\n\n#### isBoolean(x) _(es5-ext/boolean/is-boolean)_\n\nWhether value is boolean\n\n### Date Constructor extensions\n\n#### isDate(x) _(es5-ext/date/is-date)_\n\nWhether value is date instance\n\n#### validDate(x) _(es5-ext/date/valid-date)_\n\nIf given object is not date throw TypeError in other case return it.\n\n### Date Prototype extensions\n\n#### date.copy(date) _(es5-ext/date/#/copy)_\n\nReturns a copy of the date object\n\n#### date.daysInMonth() _(es5-ext/date/#/days-in-month)_\n\nReturns number of days of date's month\n\n#### date.floorDay() _(es5-ext/date/#/floor-day)_\n\nSets the date time to 00:00:00.000\n\n#### date.floorMonth() _(es5-ext/date/#/floor-month)_\n\nSets date day to 1 and date time to 00:00:00.000\n\n#### date.floorYear() _(es5-ext/date/#/floor-year)_\n\nSets date month to 0, day to 1 and date time to 00:00:00.000\n\n#### date.format(pattern) _(es5-ext/date/#/format)_\n\nFormats date up to given string. Supported patterns:\n\n* `%Y` - Year with century, 1999, 2003\n* `%y` - Year without century, 99, 03\n* `%m` - Month, 01..12\n* `%d` - Day of the month 01..31\n* `%H` - Hour (24-hour clock), 00..23\n* `%M` - Minute, 00..59\n* `%S` - Second, 00..59\n* `%L` - Milliseconds, 000..999\n\n### Error Constructor extensions\n\n#### custom(message/_, code, ext_/) _(es5-ext/error/custom)_\n\nCreates custom error object, optinally extended with `code` and other extension properties (provided with `ext` object)\n\n#### isError(x) _(es5-ext/error/is-error)_\n\nWhether value is an error (instance of `Error`).\n\n#### validError(x) _(es5-ext/error/valid-error)_\n\nIf given object is not error throw TypeError in other case return it.\n\n### Error Prototype extensions\n\n#### err.throw() _(es5-ext/error/#/throw)_\n\nThrows error\n\n### Function Constructor extensions\n\nSome of the functions were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele\n\n#### constant(x) _(es5-ext/function/constant)_\n\nReturns a constant function that returns pregiven argument\n\n_k(x)(y) =def x_\n\n#### identity(x) _(es5-ext/function/identity)_\n\nIdentity function. Returns first argument\n\n_i(x) =def x_\n\n#### invoke(name[, …args]) _(es5-ext/function/invoke)_\n\nReturns a function that takes an object as an argument, and applies object's\n_name_ method to arguments. \n_name_ can be name of the method or method itself.\n\n_invoke(name, …args)(object, …args2) =def object\\[name\\]\\(…args, …args2\\)_\n\n#### isArguments(x) _(es5-ext/function/is-arguments)_\n\nWhether value is arguments object\n\n#### isFunction(arg) _(es5-ext/function/is-function)_\n\nWhether value is instance of function\n\n#### noop() _(es5-ext/function/noop)_\n\nNo operation function\n\n#### pluck(name) _(es5-ext/function/pluck)_\n\nReturns a function that takes an object, and returns the value of its _name_\nproperty\n\n_pluck(name)(obj) =def obj[name]_\n\n#### validFunction(arg) _(es5-ext/function/valid-function)_\n\nIf given object is not function throw TypeError in other case return it.\n\n### Function Prototype extensions\n\nSome of the methods were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele\n\n#### fn.compose([…fns]) _(es5-ext/function/#/compose)_\n\nApplies the functions in reverse argument-list order.\n\n_f1.compose(f2, f3, f4)(…args) =def f1(f2(f3(f4(…arg))))_\n\n#### fn.copy() _(es5-ext/function/#/copy)_\n\nProduces copy of given function\n\n#### fn.curry([n]) _(es5-ext/function/#/curry)_\n\nInvoking the function returned by this function only _n_ arguments are passed to the underlying function. If the underlying function is not saturated, the result is a function that passes all its arguments to the underlying function. \nIf _n_ is not provided then it defaults to context function length\n\n_f.curry(4)(arg1, arg2)(arg3)(arg4) =def f(arg1, args2, arg3, arg4)_\n\n#### fn.lock([…args]) _(es5-ext/function/#/lock)_\n\nReturns a function that applies the underlying function to _args_, and ignores its own arguments.\n\n_f.lock(…args)(…args2) =def f(…args)_\n\n_Named after it's counterpart in Google Closure_\n\n#### fn.not() _(es5-ext/function/#/not)_\n\nReturns a function that returns boolean negation of value returned by underlying function.\n\n_f.not()(…args) =def !f(…args)_\n\n#### fn.partial([…args]) _(es5-ext/function/#/partial)_\n\nReturns a function that when called will behave like context function called with initially passed arguments. If more arguments are suplilied, they are appended to initial args.\n\n_f.partial(…args1)(…args2) =def f(…args1, …args2)_\n\n#### fn.spread() _(es5-ext/function/#/spread)_\n\nReturns a function that applies underlying function with first list argument\n\n_f.match()(args) =def f.apply(null, args)_\n\n#### fn.toStringTokens() _(es5-ext/function/#/to-string-tokens)_\n\nSerializes function into two (arguments and body) string tokens. Result is plain object with `args` and `body` properties.\n\n### Math extensions\n\n#### acosh(x) _(es5-ext/math/acosh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.acosh).\n\n#### asinh(x) _(es5-ext/math/asinh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.asinh).\n\n#### atanh(x) _(es5-ext/math/atanh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.atanh).\n\n#### cbrt(x) _(es5-ext/math/cbrt)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cbrt).\n\n#### clz32(x) _(es5-ext/math/clz32)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.clz32).\n\n#### cosh(x) _(es5-ext/math/cosh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cosh).\n\n#### expm1(x) _(es5-ext/math/expm1)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.expm1).\n\n#### fround(x) _(es5-ext/math/fround)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround).\n\n#### hypot([…values]) _(es5-ext/math/hypot)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot).\n\n#### imul(x, y) _(es5-ext/math/imul)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.imul).\n\n#### log1p(x) _(es5-ext/math/log1p)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log1p).\n\n#### log2(x) _(es5-ext/math/log2)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log2).\n\n#### log10(x) _(es5-ext/math/log10)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log10).\n\n#### sign(x) _(es5-ext/math/sign)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sign).\n\n#### sinh(x) _(es5-ext/math/sinh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sinh).\n\n#### tanh(x) _(es5-ext/math/tanh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.tanh).\n\n#### trunc(x) _(es5-ext/math/trunc)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc).\n\n### Number Constructor extensions\n\n#### EPSILON _(es5-ext/number/epsilon)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.epsilon).\n\nThe difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately 2.2204460492503130808472633361816 x 10-16.\n\n#### isFinite(x) _(es5-ext/number/is-finite)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite). \nWhether value is finite. Differs from global isNaN that it doesn't do type coercion.\n\n#### isInteger(x) _(es5-ext/number/is-integer)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger). \nWhether value is integer.\n\n#### isNaN(x) _(es5-ext/number/is-nan)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan). \nWhether value is NaN. Differs from global isNaN that it doesn't do type coercion.\n\n#### isNumber(x) _(es5-ext/number/is-number)_\n\nWhether given value is number\n\n#### isSafeInteger(x) _(es5-ext/number/is-safe-integer)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.issafeinteger).\n\n#### MAX*SAFE_INTEGER *(es5-ext/number/max-safe-integer)\\_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.maxsafeinteger). \nThe value of Number.MAX_SAFE_INTEGER is 9007199254740991.\n\n#### MIN*SAFE_INTEGER *(es5-ext/number/min-safe-integer)\\_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.minsafeinteger). \nThe value of Number.MIN_SAFE_INTEGER is -9007199254740991 (253-1).\n\n#### toInteger(x) _(es5-ext/number/to-integer)_\n\nConverts value to integer\n\n#### toPosInteger(x) _(es5-ext/number/to-pos-integer)_\n\nConverts value to positive integer. If provided value is less than 0, then 0 is returned\n\n#### toUint32(x) _(es5-ext/number/to-uint32)_\n\nConverts value to unsigned 32 bit integer. This type is used for array lengths.\nSee: http://www.2ality.com/2012/02/js-integers.html\n\n### Number Prototype extensions\n\n#### num.pad(length[, precision]) _(es5-ext/number/#/pad)_\n\nPad given number with zeros. Returns string\n\n### Object Constructor extensions\n\n#### assign(target, source[, …sourcen]) _(es5-ext/object/assign)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign). \nExtend _target_ by enumerable own properties of other objects. If properties are already set on target object, they will be overwritten.\n\n#### clear(obj) _(es5-ext/object/clear)_\n\nRemove all enumerable own properties of the object\n\n#### compact(obj) _(es5-ext/object/compact)_\n\nReturns copy of the object with all enumerable properties that have no falsy values\n\n#### compare(obj1, obj2) _(es5-ext/object/compare)_\n\nUniversal cross-type compare function. To be used for e.g. array sort.\n\n#### copy(obj) _(es5-ext/object/copy)_\n\nReturns copy of the object with all enumerable properties.\n\n#### copyDeep(obj) _(es5-ext/object/copy-deep)_\n\nReturns deep copy of the object with all enumerable properties.\n\n#### count(obj) _(es5-ext/object/count)_\n\nCounts number of enumerable own properties on object\n\n#### create(obj[, properties]) _(es5-ext/object/create)_\n\n`Object.create` alternative that provides workaround for [V8 issue](http://code.google.com/p/v8/issues/detail?id=2804).\n\nWhen `null` is provided as a prototype, it's substituted with specially prepared object that derives from Object.prototype but has all Object.prototype properties shadowed with undefined.\n\nIt's quirky solution that allows us to have plain objects with no truthy properties but with turnable prototype.\n\nUse only for objects that you plan to switch prototypes of and be aware of limitations of this workaround.\n\n#### eq(x, y) _(es5-ext/object/eq)_\n\nWhether two values are equal, using [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.\n\n#### every(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/every)_\n\nAnalogous to Array.prototype.every. Returns true if every key-value pair in this object satisfies the provided testing function. \nOptionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### filter(obj, cb[, thisArg]) _(es5-ext/object/filter)_\n\nAnalogous to Array.prototype.filter. Returns new object with properites for which _cb_ function returned truthy value.\n\n#### firstKey(obj) _(es5-ext/object/first-key)_\n\nReturns first enumerable key of the object, as keys are unordered by specification, it can be any key of an object.\n\n#### flatten(obj) _(es5-ext/object/flatten)_\n\nReturns new object, with flatten properties of input object\n\n_flatten({ a: { b: 1 }, c: { d: 1 } }) =def { b: 1, d: 1 }_\n\n#### forEach(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/for-each)_\n\nAnalogous to Array.prototype.forEach. Calls a function for each key-value pair found in object\nOptionally _compareFn_ can be provided which assures that properties are iterated in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### getPropertyNames() _(es5-ext/object/get-property-names)_\n\nGet all (not just own) property names of the object\n\n#### is(x, y) _(es5-ext/object/is)_\n\nWhether two values are equal, using [_SameValue_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.\n\n#### isArrayLike(x) _(es5-ext/object/is-array-like)_\n\nWhether object is array-like object\n\n#### isCopy(x, y) _(es5-ext/object/is-copy)_\n\nTwo values are considered a copy of same value when all of their own enumerable properties have same values.\n\n#### isCopyDeep(x, y) _(es5-ext/object/is-copy-deep)_\n\nDeep comparision of objects\n\n#### isEmpty(obj) _(es5-ext/object/is-empty)_\n\nTrue if object doesn't have any own enumerable property\n\n#### isObject(arg) _(es5-ext/object/is-object)_\n\nWhether value is not primitive\n\n#### isPlainObject(arg) _(es5-ext/object/is-plain-object)_\n\nWhether object is plain object, its protototype should be Object.prototype and it cannot be host object.\n\n#### keyOf(obj, searchValue) _(es5-ext/object/key-of)_\n\nSearch object for value\n\n#### keys(obj) _(es5-ext/object/keys)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys). \nES6's version of `keys`, doesn't throw on primitive input\n\n#### map(obj, cb[, thisArg]) _(es5-ext/object/map)_\n\nAnalogous to Array.prototype.map. Creates a new object with properties which values are results of calling a provided function on every key-value pair in this object.\n\n#### mapKeys(obj, cb[, thisArg]) _(es5-ext/object/map-keys)_\n\nCreate new object with same values, but remapped keys\n\n#### mixin(target, source) _(es5-ext/object/mixin)_\n\nExtend _target_ by all own properties of other objects. Properties found in both objects will be overwritten (unless they're not configurable and cannot be overwritten).\n_It was for a moment part of ECMAScript 6 draft._\n\n#### mixinPrototypes(target, …source]) _(es5-ext/object/mixin-prototypes)_\n\nExtends _target_, with all source and source's prototype properties.\nUseful as an alternative for `setPrototypeOf` in environments in which it cannot be shimmed (no `__proto__` support).\n\n#### normalizeOptions(options) _(es5-ext/object/normalize-options)_\n\nNormalizes options object into flat plain object.\n\nUseful for functions in which we either need to keep options object for future reference or need to modify it for internal use.\n\n* It never returns input `options` object back (always a copy is created)\n* `options` can be undefined in such case empty plain object is returned.\n* Copies all enumerable properties found down prototype chain.\n\n#### primitiveSet([…names]) _(es5-ext/object/primitive-set)_\n\nCreates `null` prototype based plain object, and sets on it all property names provided in arguments to true.\n\n#### safeTraverse(obj[, …names]) _(es5-ext/object/safe-traverse)_\n\nSafe navigation of object properties. See http://wiki.ecmascript.org/doku.php?id=strawman:existential_operator\n\n#### serialize(value) _(es5-ext/object/serialize)_\n\nSerialize value into string. Differs from [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that it serializes also dates, functions and regular expresssions.\n\n#### setPrototypeOf(object, proto) _(es5-ext/object/set-prototype-of)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.setprototypeof). \nIf native version is not provided, it depends on existence of `__proto__` functionality, if it's missing, `null` instead of function is exposed.\n\n#### some(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/some)_\n\nAnalogous to Array.prototype.some Returns true if any key-value pair satisfies the provided\ntesting function. \nOptionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### toArray(obj[, cb[, thisArg[, compareFn]]]) _(es5-ext/object/to-array)_\n\nCreates an array of results of calling a provided function on every key-value pair in this object. \nOptionally _compareFn_ can be provided which assures that results are added in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### unserialize(str) _(es5-ext/object/unserialize)_\n\nUserializes value previously serialized with [serialize](#serializevalue-es5-extobjectserialize)\n\n#### validCallable(x) _(es5-ext/object/valid-callable)_\n\nIf given object is not callable throw TypeError in other case return it.\n\n#### validObject(x) _(es5-ext/object/valid-object)_\n\nThrows error if given value is not an object, otherwise it is returned.\n\n#### validValue(x) _(es5-ext/object/valid-value)_\n\nThrows error if given value is `null` or `undefined`, otherwise returns value.\n\n### RegExp Constructor extensions\n\n#### escape(str) _(es5-ext/reg-exp/escape)_\n\nEscapes string to be used in regular expression\n\n#### isRegExp(x) _(es5-ext/reg-exp/is-reg-exp)_\n\nWhether object is regular expression\n\n#### validRegExp(x) _(es5-ext/reg-exp/valid-reg-exp)_\n\nIf object is regular expression it is returned, otherwise TypeError is thrown.\n\n### RegExp Prototype extensions\n\n#### re.isSticky(x) _(es5-ext/reg-exp/#/is-sticky)_\n\nWhether regular expression has `sticky` flag.\n\nIt's to be used as counterpart to [regExp.sticky](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.sticky) if it's not implemented.\n\n#### re.isUnicode(x) _(es5-ext/reg-exp/#/is-unicode)_\n\nWhether regular expression has `unicode` flag.\n\nIt's to be used as counterpart to [regExp.unicode](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.unicode) if it's not implemented.\n\n#### re.match(string) _(es5-ext/reg-exp/#/match)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.match).\n\n#### re.replace(string, replaceValue) _(es5-ext/reg-exp/#/replace)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.replace).\n\n#### re.search(string) _(es5-ext/reg-exp/#/search)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.search).\n\n#### re.split(string) _(es5-ext/reg-exp/#/search)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.split).\n\n#### re.sticky _(es5-ext/reg-exp/#/sticky/implement)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.sticky). \nIt's a getter, so only `implement` and `is-implemented` modules are provided.\n\n#### re.unicode _(es5-ext/reg-exp/#/unicode/implement)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.unicode). \nIt's a getter, so only `implement` and `is-implemented` modules are provided.\n\n### String Constructor extensions\n\n#### formatMethod(fMap) _(es5-ext/string/format-method)_\n\nCreates format method. It's used e.g. to create `Date.prototype.format` method\n\n#### fromCodePoint([…codePoints]) _(es5-ext/string/from-code-point)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint)\n\n#### isString(x) _(es5-ext/string/is-string)_\n\nWhether object is string\n\n#### randomUniq() _(es5-ext/string/random-uniq)_\n\nReturns randomly generated id, with guarantee of local uniqueness (no same id will be returned twice)\n\n#### raw(callSite[, …substitutions]) _(es5-ext/string/raw)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.raw)\n\n### String Prototype extensions\n\n#### str.at(pos) _(es5-ext/string/#/at)_\n\n_Proposed for ECMAScript 6/7 standard, but not (yet) in a draft_\n\nReturns a string at given position in Unicode-safe manner.\nBased on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.at).\n\n#### str.camelToHyphen() _(es5-ext/string/#/camel-to-hyphen)_\n\nConvert camelCase string to hyphen separated, e.g. one-two-three -> oneTwoThree.\nUseful when converting names from js property convention into filename convention.\n\n#### str.capitalize() _(es5-ext/string/#/capitalize)_\n\nCapitalize first character of a string\n\n#### str.caseInsensitiveCompare(str) _(es5-ext/string/#/case-insensitive-compare)_\n\nCase insensitive compare\n\n#### str.codePointAt(pos) _(es5-ext/string/#/code-point-at)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.codepointat)\n\nBased on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.codePointAt).\n\n#### str.contains(searchString[, position]) _(es5-ext/string/#/contains)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains)\n\nWhether string contains given string.\n\n#### str.endsWith(searchString[, endPosition]) _(es5-ext/string/#/ends-with)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith). \nWhether strings ends with given string\n\n#### str.hyphenToCamel() _(es5-ext/string/#/hyphen-to-camel)_\n\nConvert hyphen separated string to camelCase, e.g. one-two-three -> oneTwoThree.\nUseful when converting names from filename convention to js property name convention.\n\n#### str.indent(str[, count]) _(es5-ext/string/#/indent)_\n\nIndents each line with provided _str_ (if _count_ given then _str_ is repeated _count_ times).\n\n#### str.last() _(es5-ext/string/#/last)_\n\nReturn last character\n\n#### str.normalize([form]) _(es5-ext/string/#/normalize)_\n\n[_Introduced with ECMAScript 6_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize). \nReturns the Unicode Normalization Form of a given string. \nBased on Matsuza's version. Code used for integrated shim can be found at [github.com/walling/unorm](https://github.com/walling/unorm/blob/master/lib/unorm.js)\n\n#### str.pad(fill[, length]) _(es5-ext/string/#/pad)_\n\nPad string with _fill_.\nIf _length_ si given than _fill_ is reapated _length_ times.\nIf _length_ is negative then pad is applied from right.\n\n#### str.repeat(n) _(es5-ext/string/#/repeat)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.repeat). \nRepeat given string _n_ times\n\n#### str.plainReplace(search, replace) _(es5-ext/string/#/plain-replace)_\n\nSimple `replace` version. Doesn't support regular expressions. Replaces just first occurrence of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).\n\n#### str.plainReplaceAll(search, replace) _(es5-ext/string/#/plain-replace-all)_\n\nSimple `replace` version. Doesn't support regular expressions. Replaces all occurrences of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).\n\n#### str.startsWith(searchString[, position]) _(es5-ext/string/#/starts-with)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.startswith). \nWhether strings starts with given string\n\n#### str[@@iterator] _(es5-ext/string/#/@@iterator)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype-@@iterator). \nReturns iterator object which traverses all string characters (with respect to unicode symbols)\n\n### Tests\n\n $ npm test\n\n[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/es5-ext/branches/master/shields_badge.svg\n[nix-build-url]: https://semaphoreci.com/medikoo-org/es5-ext\n[win-build-image]: https://ci.appveyor.com/api/projects/status/3jox67ksw3p8hkwh?svg=true\n[win-build-url]: https://ci.appveyor.com/project/medikoo/es5-ext\n[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg\n[npm-image]: https://img.shields.io/npm/v/es5-ext.svg\n[npm-url]: https://www.npmjs.com/package/es5-ext\n", - "readmeFilename": "README.md", - "bugs": "[Circular]", - "homepage": "https://github.com/medikoo/es5-ext#readme", - "_id": "es5-ext@0.10.45", - "_requested": { - "type": "version", - "registry": true, - "raw": "es5-ext@0.10.45", - "name": "es5-ext", - "escapedName": "es5-ext", - "rawSpec": "0.10.45", - "saveSpec": "[Circular]", - "fetchSpec": "0.10.45" - }, - "_spec": "0.10.45", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": "[Circular]", - "optionalDependencies": "[Circular]", - "_dependencies": "[Circular]", - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/es5-ext", - "error": "[Circular]", - "extraneous": false, - "_deduped": "es5-ext" - }, - "d": { - "name": "d", - "version": "1.0.0", - "description": "Property descriptor factory", - "author": { - "name": "Mariusz Nowak", - "email": "medyk@medikoo.com", - "url": "http://www.medikoo.com/" - }, - "keywords": [ - "descriptor", - "es", - "ecmascript", - "ecma", - "property", - "descriptors", - "meta", - "properties" - ], - "repository": { - "type": "git", - "url": "git://github.com/medikoo/d.git" - }, - "dependencies": { - "es5-ext": { - "name": "es5-ext", - "version": "0.10.45", - "description": "ECMAScript extensions and shims", - "author": "[Circular]", - "keywords": "[Circular]", - "repository": "[Circular]", - "dependencies": {}, - "devDependencies": "[Circular]", - "eslintConfig": "[Circular]", - "scripts": "[Circular]", - "license": "ISC", - "_resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", - "_integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", - "_from": "es5-ext@0.10.45", - "readme": "[![Build status][nix-build-image]][nix-build-url]\n[![Windows status][win-build-image]][win-build-url]\n![Transpilation status][transpilation-image]\n[![npm version][npm-image]][npm-url]\n\n# es5-ext\n\n## ECMAScript 5 extensions\n\n### (with respect to ECMAScript 6 standard)\n\nShims for upcoming ES6 standard and other goodies implemented strictly with ECMAScript conventions in mind.\n\nIt's designed to be used in compliant ECMAScript 5 or ECMAScript 6 environments. Older environments are not supported, although most of the features should work with correct ECMAScript 5 shim on board.\n\nWhen used in ECMAScript 6 environment, native implementation (if valid) takes precedence over shims.\n\n### Installation\n\n $ npm install es5-ext\n\nTo port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)\n\n### Usage\n\n#### ECMAScript 6 features\n\nYou can force ES6 features to be implemented in your environment, e.g. following will assign `from` function to `Array` (only if it's not implemented already).\n\n```javascript\nrequire(\"es5-ext/array/from/implement\");\nArray.from(\"foo\"); // ['f', 'o', 'o']\n```\n\nYou can also access shims directly, without fixing native objects. Following will return native `Array.from` if it's available and fallback to shim if it's not.\n\n```javascript\nvar aFrom = require(\"es5-ext/array/from\");\naFrom(\"foo\"); // ['f', 'o', 'o']\n```\n\nIf you want to use shim unconditionally (even if native implementation exists) do:\n\n```javascript\nvar aFrom = require(\"es5-ext/array/from/shim\");\naFrom(\"foo\"); // ['f', 'o', 'o']\n```\n\n##### List of ES6 shims\n\nIt's about properties introduced with ES6 and those that have been updated in new spec.\n\n* `Array.from` -> `require('es5-ext/array/from')`\n* `Array.of` -> `require('es5-ext/array/of')`\n* `Array.prototype.concat` -> `require('es5-ext/array/#/concat')`\n* `Array.prototype.copyWithin` -> `require('es5-ext/array/#/copy-within')`\n* `Array.prototype.entries` -> `require('es5-ext/array/#/entries')`\n* `Array.prototype.fill` -> `require('es5-ext/array/#/fill')`\n* `Array.prototype.filter` -> `require('es5-ext/array/#/filter')`\n* `Array.prototype.find` -> `require('es5-ext/array/#/find')`\n* `Array.prototype.findIndex` -> `require('es5-ext/array/#/find-index')`\n* `Array.prototype.keys` -> `require('es5-ext/array/#/keys')`\n* `Array.prototype.map` -> `require('es5-ext/array/#/map')`\n* `Array.prototype.slice` -> `require('es5-ext/array/#/slice')`\n* `Array.prototype.splice` -> `require('es5-ext/array/#/splice')`\n* `Array.prototype.values` -> `require('es5-ext/array/#/values')`\n* `Array.prototype[@@iterator]` -> `require('es5-ext/array/#/@@iterator')`\n* `Math.acosh` -> `require('es5-ext/math/acosh')`\n* `Math.asinh` -> `require('es5-ext/math/asinh')`\n* `Math.atanh` -> `require('es5-ext/math/atanh')`\n* `Math.cbrt` -> `require('es5-ext/math/cbrt')`\n* `Math.clz32` -> `require('es5-ext/math/clz32')`\n* `Math.cosh` -> `require('es5-ext/math/cosh')`\n* `Math.exmp1` -> `require('es5-ext/math/expm1')`\n* `Math.fround` -> `require('es5-ext/math/fround')`\n* `Math.hypot` -> `require('es5-ext/math/hypot')`\n* `Math.imul` -> `require('es5-ext/math/imul')`\n* `Math.log1p` -> `require('es5-ext/math/log1p')`\n* `Math.log2` -> `require('es5-ext/math/log2')`\n* `Math.log10` -> `require('es5-ext/math/log10')`\n* `Math.sign` -> `require('es5-ext/math/sign')`\n* `Math.signh` -> `require('es5-ext/math/signh')`\n* `Math.tanh` -> `require('es5-ext/math/tanh')`\n* `Math.trunc` -> `require('es5-ext/math/trunc')`\n* `Number.EPSILON` -> `require('es5-ext/number/epsilon')`\n* `Number.MAX_SAFE_INTEGER` -> `require('es5-ext/number/max-safe-integer')`\n* `Number.MIN_SAFE_INTEGER` -> `require('es5-ext/number/min-safe-integer')`\n* `Number.isFinite` -> `require('es5-ext/number/is-finite')`\n* `Number.isInteger` -> `require('es5-ext/number/is-integer')`\n* `Number.isNaN` -> `require('es5-ext/number/is-nan')`\n* `Number.isSafeInteger` -> `require('es5-ext/number/is-safe-integer')`\n* `Object.assign` -> `require('es5-ext/object/assign')`\n* `Object.keys` -> `require('es5-ext/object/keys')`\n* `Object.setPrototypeOf` -> `require('es5-ext/object/set-prototype-of')`\n* `RegExp.prototype.match` -> `require('es5-ext/reg-exp/#/match')`\n* `RegExp.prototype.replace` -> `require('es5-ext/reg-exp/#/replace')`\n* `RegExp.prototype.search` -> `require('es5-ext/reg-exp/#/search')`\n* `RegExp.prototype.split` -> `require('es5-ext/reg-exp/#/split')`\n* `RegExp.prototype.sticky` -> Implement with `require('es5-ext/reg-exp/#/sticky/implement')`, use as function with `require('es5-ext/reg-exp/#/is-sticky')`\n* `RegExp.prototype.unicode` -> Implement with `require('es5-ext/reg-exp/#/unicode/implement')`, use as function with `require('es5-ext/reg-exp/#/is-unicode')`\n* `String.fromCodePoint` -> `require('es5-ext/string/from-code-point')`\n* `String.raw` -> `require('es5-ext/string/raw')`\n* `String.prototype.codePointAt` -> `require('es5-ext/string/#/code-point-at')`\n* `String.prototype.contains` -> `require('es5-ext/string/#/contains')`\n* `String.prototype.endsWith` -> `require('es5-ext/string/#/ends-with')`\n* `String.prototype.normalize` -> `require('es5-ext/string/#/normalize')`\n* `String.prototype.repeat` -> `require('es5-ext/string/#/repeat')`\n* `String.prototype.startsWith` -> `require('es5-ext/string/#/starts-with')`\n* `String.prototype[@@iterator]` -> `require('es5-ext/string/#/@@iterator')`\n\n#### Non ECMAScript standard features\n\n**es5-ext** provides also other utils, and implements them as if they were proposed for a standard. It mostly offers methods (not functions) which can directly be assigned to native prototypes:\n\n```javascript\nObject.defineProperty(Function.prototype, \"partial\", {\n\tvalue: require(\"es5-ext/function/#/partial\"),\n\tconfigurable: true,\n\tenumerable: false,\n\twritable: true\n});\nObject.defineProperty(Array.prototype, \"flatten\", {\n\tvalue: require(\"es5-ext/array/#/flatten\"),\n\tconfigurable: true,\n\tenumerable: false,\n\twritable: true\n});\nObject.defineProperty(String.prototype, \"capitalize\", {\n\tvalue: require(\"es5-ext/string/#/capitalize\"),\n\tconfigurable: true,\n\tenumerable: false,\n\twritable: true\n});\n```\n\nSee [es5-extend](https://github.com/wookieb/es5-extend#es5-extend), a great utility that automatically will extend natives for you.\n\n**Important:** Remember to **not** extend natives in scope of generic reusable packages (e.g. ones you intend to publish to npm). Extending natives is fine **only** if you're the _owner_ of the global scope, so e.g. in final project you lead development of.\n\nWhen you're in situation when native extensions are not good idea, then you should use methods indirectly:\n\n```javascript\nvar flatten = require(\"es5-ext/array/#/flatten\");\n\nflatten.call([1, [2, [3, 4]]]); // [1, 2, 3, 4]\n```\n\nfor better convenience you can turn methods into functions:\n\n```javascript\nvar call = Function.prototype.call;\nvar flatten = call.bind(require(\"es5-ext/array/#/flatten\"));\n\nflatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]\n```\n\nYou can configure custom toolkit (like [underscorejs](http://underscorejs.org/)), and use it throughout your application\n\n```javascript\nvar util = {};\nutil.partial = call.bind(require(\"es5-ext/function/#/partial\"));\nutil.flatten = call.bind(require(\"es5-ext/array/#/flatten\"));\nutil.startsWith = call.bind(require(\"es5-ext/string/#/starts-with\"));\n\nutil.flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]\n```\n\nAs with native ones most methods are generic and can be run on any type of object.\n\n## API\n\n### Global extensions\n\n#### global _(es5-ext/global)_\n\nObject that represents global scope\n\n### Array Constructor extensions\n\n#### from(arrayLike[, mapFn[, thisArg]]) _(es5-ext/array/from)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from). \nReturns array representation of _iterable_ or _arrayLike_. If _arrayLike_ is an instance of array, its copy is returned.\n\n#### generate([length[, …fill]]) _(es5-ext/array/generate)_\n\nGenerate an array of pre-given _length_ built of repeated arguments.\n\n#### isPlainArray(x) _(es5-ext/array/is-plain-array)_\n\nReturns true if object is plain array (not instance of one of the Array's extensions).\n\n#### of([…items]) _(es5-ext/array/of)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.of). \nCreate an array from given arguments.\n\n#### toArray(obj) _(es5-ext/array/to-array)_\n\nReturns array representation of `obj`. If `obj` is already an array, `obj` is returned back.\n\n#### validArray(obj) _(es5-ext/array/valid-array)_\n\nReturns `obj` if it's an array, otherwise throws `TypeError`\n\n### Array Prototype extensions\n\n#### arr.binarySearch(compareFn) _(es5-ext/array/#/binary-search)_\n\nIn **sorted** list search for index of item for which _compareFn_ returns value closest to _0_. \nIt's variant of binary search algorithm\n\n#### arr.clear() _(es5-ext/array/#/clear)_\n\nClears the array\n\n#### arr.compact() _(es5-ext/array/#/compact)_\n\nReturns a copy of the context with all non-values (`null` or `undefined`) removed.\n\n#### arr.concat() _(es5-ext/array/#/concat)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.concat). \nES6's version of `concat`. Supports `isConcatSpreadable` symbol, and returns array of same type as the context.\n\n#### arr.contains(searchElement[, position]) _(es5-ext/array/#/contains)_\n\nWhether list contains the given value.\n\n#### arr.copyWithin(target, start[, end]) _(es5-ext/array/#/copy-within)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.copywithin).\n\n#### arr.diff(other) _(es5-ext/array/#/diff)_\n\nReturns the array of elements that are present in context list but not present in other list.\n\n#### arr.eIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-index-of)_\n\n_egal_ version of `indexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision\n\n#### arr.eLastIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-last-index-of)_\n\n_egal_ version of `lastIndexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision\n\n#### arr.entries() _(es5-ext/array/#/entries)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.entries). \nReturns iterator object, which traverses the array. Each value is represented with an array, where first value is an index and second is corresponding to index value.\n\n#### arr.exclusion([…lists]]) _(es5-ext/array/#/exclusion)_\n\nReturns the array of elements that are found only in one of the lists (either context list or list provided in arguments).\n\n#### arr.fill(value[, start, end]) _(es5-ext/array/#/fill)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.fill).\n\n#### arr.filter(callback[, thisArg]) _(es5-ext/array/#/filter)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.filter). \nES6's version of `filter`, returns array of same type as the context.\n\n#### arr.find(predicate[, thisArg]) _(es5-ext/array/#/find)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.find). \nReturn first element for which given function returns true\n\n#### arr.findIndex(predicate[, thisArg]) _(es5-ext/array/#/find-index)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.findindex). \nReturn first index for which given function returns true\n\n#### arr.first() _(es5-ext/array/#/first)_\n\nReturns value for first defined index\n\n#### arr.firstIndex() _(es5-ext/array/#/first-index)_\n\nReturns first declared index of the array\n\n#### arr.flatten() _(es5-ext/array/#/flatten)_\n\nReturns flattened version of the array\n\n#### arr.forEachRight(cb[, thisArg]) _(es5-ext/array/#/for-each-right)_\n\n`forEach` starting from last element\n\n#### arr.group(cb[, thisArg]) _(es5-ext/array/#/group)_\n\nGroup list elements by value returned by _cb_ function\n\n#### arr.indexesOf(searchElement[, fromIndex]) _(es5-ext/array/#/indexes-of)_\n\nReturns array of all indexes of given value\n\n#### arr.intersection([…lists]) _(es5-ext/array/#/intersection)_\n\nComputes the array of values that are the intersection of all lists (context list and lists given in arguments)\n\n#### arr.isCopy(other) _(es5-ext/array/#/is-copy)_\n\nReturns true if both context and _other_ lists have same content\n\n#### arr.isUniq() _(es5-ext/array/#/is-uniq)_\n\nReturns true if all values in array are unique\n\n#### arr.keys() _(es5-ext/array/#/keys)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.keys). \nReturns iterator object, which traverses all array indexes.\n\n#### arr.last() _(es5-ext/array/#/last)_\n\nReturns value of last defined index\n\n#### arr.lastIndex() _(es5-ext/array/#/last)_\n\nReturns last defined index of the array\n\n#### arr.map(callback[, thisArg]) _(es5-ext/array/#/map)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.map). \nES6's version of `map`, returns array of same type as the context.\n\n#### arr.remove(value[, …valuen]) _(es5-ext/array/#/remove)_\n\nRemove values from the array\n\n#### arr.separate(sep) _(es5-ext/array/#/separate)_\n\nReturns array with items separated with `sep` value\n\n#### arr.slice(callback[, thisArg]) _(es5-ext/array/#/slice)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.slice). \nES6's version of `slice`, returns array of same type as the context.\n\n#### arr.someRight(cb[, thisArg]) _(es5-ext/array/#/someRight)_\n\n`some` starting from last element\n\n#### arr.splice(callback[, thisArg]) _(es5-ext/array/#/splice)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.splice). \nES6's version of `splice`, returns array of same type as the context.\n\n#### arr.uniq() _(es5-ext/array/#/uniq)_\n\nReturns duplicate-free version of the array\n\n#### arr.values() _(es5-ext/array/#/values)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.values). \nReturns iterator object which traverses all array values.\n\n#### arr[@@iterator] _(es5-ext/array/#/@@iterator)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype-@@iterator). \nReturns iterator object which traverses all array values.\n\n### Boolean Constructor extensions\n\n#### isBoolean(x) _(es5-ext/boolean/is-boolean)_\n\nWhether value is boolean\n\n### Date Constructor extensions\n\n#### isDate(x) _(es5-ext/date/is-date)_\n\nWhether value is date instance\n\n#### validDate(x) _(es5-ext/date/valid-date)_\n\nIf given object is not date throw TypeError in other case return it.\n\n### Date Prototype extensions\n\n#### date.copy(date) _(es5-ext/date/#/copy)_\n\nReturns a copy of the date object\n\n#### date.daysInMonth() _(es5-ext/date/#/days-in-month)_\n\nReturns number of days of date's month\n\n#### date.floorDay() _(es5-ext/date/#/floor-day)_\n\nSets the date time to 00:00:00.000\n\n#### date.floorMonth() _(es5-ext/date/#/floor-month)_\n\nSets date day to 1 and date time to 00:00:00.000\n\n#### date.floorYear() _(es5-ext/date/#/floor-year)_\n\nSets date month to 0, day to 1 and date time to 00:00:00.000\n\n#### date.format(pattern) _(es5-ext/date/#/format)_\n\nFormats date up to given string. Supported patterns:\n\n* `%Y` - Year with century, 1999, 2003\n* `%y` - Year without century, 99, 03\n* `%m` - Month, 01..12\n* `%d` - Day of the month 01..31\n* `%H` - Hour (24-hour clock), 00..23\n* `%M` - Minute, 00..59\n* `%S` - Second, 00..59\n* `%L` - Milliseconds, 000..999\n\n### Error Constructor extensions\n\n#### custom(message/_, code, ext_/) _(es5-ext/error/custom)_\n\nCreates custom error object, optinally extended with `code` and other extension properties (provided with `ext` object)\n\n#### isError(x) _(es5-ext/error/is-error)_\n\nWhether value is an error (instance of `Error`).\n\n#### validError(x) _(es5-ext/error/valid-error)_\n\nIf given object is not error throw TypeError in other case return it.\n\n### Error Prototype extensions\n\n#### err.throw() _(es5-ext/error/#/throw)_\n\nThrows error\n\n### Function Constructor extensions\n\nSome of the functions were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele\n\n#### constant(x) _(es5-ext/function/constant)_\n\nReturns a constant function that returns pregiven argument\n\n_k(x)(y) =def x_\n\n#### identity(x) _(es5-ext/function/identity)_\n\nIdentity function. Returns first argument\n\n_i(x) =def x_\n\n#### invoke(name[, …args]) _(es5-ext/function/invoke)_\n\nReturns a function that takes an object as an argument, and applies object's\n_name_ method to arguments. \n_name_ can be name of the method or method itself.\n\n_invoke(name, …args)(object, …args2) =def object\\[name\\]\\(…args, …args2\\)_\n\n#### isArguments(x) _(es5-ext/function/is-arguments)_\n\nWhether value is arguments object\n\n#### isFunction(arg) _(es5-ext/function/is-function)_\n\nWhether value is instance of function\n\n#### noop() _(es5-ext/function/noop)_\n\nNo operation function\n\n#### pluck(name) _(es5-ext/function/pluck)_\n\nReturns a function that takes an object, and returns the value of its _name_\nproperty\n\n_pluck(name)(obj) =def obj[name]_\n\n#### validFunction(arg) _(es5-ext/function/valid-function)_\n\nIf given object is not function throw TypeError in other case return it.\n\n### Function Prototype extensions\n\nSome of the methods were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele\n\n#### fn.compose([…fns]) _(es5-ext/function/#/compose)_\n\nApplies the functions in reverse argument-list order.\n\n_f1.compose(f2, f3, f4)(…args) =def f1(f2(f3(f4(…arg))))_\n\n#### fn.copy() _(es5-ext/function/#/copy)_\n\nProduces copy of given function\n\n#### fn.curry([n]) _(es5-ext/function/#/curry)_\n\nInvoking the function returned by this function only _n_ arguments are passed to the underlying function. If the underlying function is not saturated, the result is a function that passes all its arguments to the underlying function. \nIf _n_ is not provided then it defaults to context function length\n\n_f.curry(4)(arg1, arg2)(arg3)(arg4) =def f(arg1, args2, arg3, arg4)_\n\n#### fn.lock([…args]) _(es5-ext/function/#/lock)_\n\nReturns a function that applies the underlying function to _args_, and ignores its own arguments.\n\n_f.lock(…args)(…args2) =def f(…args)_\n\n_Named after it's counterpart in Google Closure_\n\n#### fn.not() _(es5-ext/function/#/not)_\n\nReturns a function that returns boolean negation of value returned by underlying function.\n\n_f.not()(…args) =def !f(…args)_\n\n#### fn.partial([…args]) _(es5-ext/function/#/partial)_\n\nReturns a function that when called will behave like context function called with initially passed arguments. If more arguments are suplilied, they are appended to initial args.\n\n_f.partial(…args1)(…args2) =def f(…args1, …args2)_\n\n#### fn.spread() _(es5-ext/function/#/spread)_\n\nReturns a function that applies underlying function with first list argument\n\n_f.match()(args) =def f.apply(null, args)_\n\n#### fn.toStringTokens() _(es5-ext/function/#/to-string-tokens)_\n\nSerializes function into two (arguments and body) string tokens. Result is plain object with `args` and `body` properties.\n\n### Math extensions\n\n#### acosh(x) _(es5-ext/math/acosh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.acosh).\n\n#### asinh(x) _(es5-ext/math/asinh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.asinh).\n\n#### atanh(x) _(es5-ext/math/atanh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.atanh).\n\n#### cbrt(x) _(es5-ext/math/cbrt)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cbrt).\n\n#### clz32(x) _(es5-ext/math/clz32)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.clz32).\n\n#### cosh(x) _(es5-ext/math/cosh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cosh).\n\n#### expm1(x) _(es5-ext/math/expm1)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.expm1).\n\n#### fround(x) _(es5-ext/math/fround)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround).\n\n#### hypot([…values]) _(es5-ext/math/hypot)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot).\n\n#### imul(x, y) _(es5-ext/math/imul)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.imul).\n\n#### log1p(x) _(es5-ext/math/log1p)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log1p).\n\n#### log2(x) _(es5-ext/math/log2)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log2).\n\n#### log10(x) _(es5-ext/math/log10)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log10).\n\n#### sign(x) _(es5-ext/math/sign)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sign).\n\n#### sinh(x) _(es5-ext/math/sinh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sinh).\n\n#### tanh(x) _(es5-ext/math/tanh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.tanh).\n\n#### trunc(x) _(es5-ext/math/trunc)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc).\n\n### Number Constructor extensions\n\n#### EPSILON _(es5-ext/number/epsilon)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.epsilon).\n\nThe difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately 2.2204460492503130808472633361816 x 10-16.\n\n#### isFinite(x) _(es5-ext/number/is-finite)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite). \nWhether value is finite. Differs from global isNaN that it doesn't do type coercion.\n\n#### isInteger(x) _(es5-ext/number/is-integer)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger). \nWhether value is integer.\n\n#### isNaN(x) _(es5-ext/number/is-nan)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan). \nWhether value is NaN. Differs from global isNaN that it doesn't do type coercion.\n\n#### isNumber(x) _(es5-ext/number/is-number)_\n\nWhether given value is number\n\n#### isSafeInteger(x) _(es5-ext/number/is-safe-integer)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.issafeinteger).\n\n#### MAX*SAFE_INTEGER *(es5-ext/number/max-safe-integer)\\_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.maxsafeinteger). \nThe value of Number.MAX_SAFE_INTEGER is 9007199254740991.\n\n#### MIN*SAFE_INTEGER *(es5-ext/number/min-safe-integer)\\_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.minsafeinteger). \nThe value of Number.MIN_SAFE_INTEGER is -9007199254740991 (253-1).\n\n#### toInteger(x) _(es5-ext/number/to-integer)_\n\nConverts value to integer\n\n#### toPosInteger(x) _(es5-ext/number/to-pos-integer)_\n\nConverts value to positive integer. If provided value is less than 0, then 0 is returned\n\n#### toUint32(x) _(es5-ext/number/to-uint32)_\n\nConverts value to unsigned 32 bit integer. This type is used for array lengths.\nSee: http://www.2ality.com/2012/02/js-integers.html\n\n### Number Prototype extensions\n\n#### num.pad(length[, precision]) _(es5-ext/number/#/pad)_\n\nPad given number with zeros. Returns string\n\n### Object Constructor extensions\n\n#### assign(target, source[, …sourcen]) _(es5-ext/object/assign)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign). \nExtend _target_ by enumerable own properties of other objects. If properties are already set on target object, they will be overwritten.\n\n#### clear(obj) _(es5-ext/object/clear)_\n\nRemove all enumerable own properties of the object\n\n#### compact(obj) _(es5-ext/object/compact)_\n\nReturns copy of the object with all enumerable properties that have no falsy values\n\n#### compare(obj1, obj2) _(es5-ext/object/compare)_\n\nUniversal cross-type compare function. To be used for e.g. array sort.\n\n#### copy(obj) _(es5-ext/object/copy)_\n\nReturns copy of the object with all enumerable properties.\n\n#### copyDeep(obj) _(es5-ext/object/copy-deep)_\n\nReturns deep copy of the object with all enumerable properties.\n\n#### count(obj) _(es5-ext/object/count)_\n\nCounts number of enumerable own properties on object\n\n#### create(obj[, properties]) _(es5-ext/object/create)_\n\n`Object.create` alternative that provides workaround for [V8 issue](http://code.google.com/p/v8/issues/detail?id=2804).\n\nWhen `null` is provided as a prototype, it's substituted with specially prepared object that derives from Object.prototype but has all Object.prototype properties shadowed with undefined.\n\nIt's quirky solution that allows us to have plain objects with no truthy properties but with turnable prototype.\n\nUse only for objects that you plan to switch prototypes of and be aware of limitations of this workaround.\n\n#### eq(x, y) _(es5-ext/object/eq)_\n\nWhether two values are equal, using [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.\n\n#### every(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/every)_\n\nAnalogous to Array.prototype.every. Returns true if every key-value pair in this object satisfies the provided testing function. \nOptionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### filter(obj, cb[, thisArg]) _(es5-ext/object/filter)_\n\nAnalogous to Array.prototype.filter. Returns new object with properites for which _cb_ function returned truthy value.\n\n#### firstKey(obj) _(es5-ext/object/first-key)_\n\nReturns first enumerable key of the object, as keys are unordered by specification, it can be any key of an object.\n\n#### flatten(obj) _(es5-ext/object/flatten)_\n\nReturns new object, with flatten properties of input object\n\n_flatten({ a: { b: 1 }, c: { d: 1 } }) =def { b: 1, d: 1 }_\n\n#### forEach(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/for-each)_\n\nAnalogous to Array.prototype.forEach. Calls a function for each key-value pair found in object\nOptionally _compareFn_ can be provided which assures that properties are iterated in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### getPropertyNames() _(es5-ext/object/get-property-names)_\n\nGet all (not just own) property names of the object\n\n#### is(x, y) _(es5-ext/object/is)_\n\nWhether two values are equal, using [_SameValue_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.\n\n#### isArrayLike(x) _(es5-ext/object/is-array-like)_\n\nWhether object is array-like object\n\n#### isCopy(x, y) _(es5-ext/object/is-copy)_\n\nTwo values are considered a copy of same value when all of their own enumerable properties have same values.\n\n#### isCopyDeep(x, y) _(es5-ext/object/is-copy-deep)_\n\nDeep comparision of objects\n\n#### isEmpty(obj) _(es5-ext/object/is-empty)_\n\nTrue if object doesn't have any own enumerable property\n\n#### isObject(arg) _(es5-ext/object/is-object)_\n\nWhether value is not primitive\n\n#### isPlainObject(arg) _(es5-ext/object/is-plain-object)_\n\nWhether object is plain object, its protototype should be Object.prototype and it cannot be host object.\n\n#### keyOf(obj, searchValue) _(es5-ext/object/key-of)_\n\nSearch object for value\n\n#### keys(obj) _(es5-ext/object/keys)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys). \nES6's version of `keys`, doesn't throw on primitive input\n\n#### map(obj, cb[, thisArg]) _(es5-ext/object/map)_\n\nAnalogous to Array.prototype.map. Creates a new object with properties which values are results of calling a provided function on every key-value pair in this object.\n\n#### mapKeys(obj, cb[, thisArg]) _(es5-ext/object/map-keys)_\n\nCreate new object with same values, but remapped keys\n\n#### mixin(target, source) _(es5-ext/object/mixin)_\n\nExtend _target_ by all own properties of other objects. Properties found in both objects will be overwritten (unless they're not configurable and cannot be overwritten).\n_It was for a moment part of ECMAScript 6 draft._\n\n#### mixinPrototypes(target, …source]) _(es5-ext/object/mixin-prototypes)_\n\nExtends _target_, with all source and source's prototype properties.\nUseful as an alternative for `setPrototypeOf` in environments in which it cannot be shimmed (no `__proto__` support).\n\n#### normalizeOptions(options) _(es5-ext/object/normalize-options)_\n\nNormalizes options object into flat plain object.\n\nUseful for functions in which we either need to keep options object for future reference or need to modify it for internal use.\n\n* It never returns input `options` object back (always a copy is created)\n* `options` can be undefined in such case empty plain object is returned.\n* Copies all enumerable properties found down prototype chain.\n\n#### primitiveSet([…names]) _(es5-ext/object/primitive-set)_\n\nCreates `null` prototype based plain object, and sets on it all property names provided in arguments to true.\n\n#### safeTraverse(obj[, …names]) _(es5-ext/object/safe-traverse)_\n\nSafe navigation of object properties. See http://wiki.ecmascript.org/doku.php?id=strawman:existential_operator\n\n#### serialize(value) _(es5-ext/object/serialize)_\n\nSerialize value into string. Differs from [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that it serializes also dates, functions and regular expresssions.\n\n#### setPrototypeOf(object, proto) _(es5-ext/object/set-prototype-of)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.setprototypeof). \nIf native version is not provided, it depends on existence of `__proto__` functionality, if it's missing, `null` instead of function is exposed.\n\n#### some(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/some)_\n\nAnalogous to Array.prototype.some Returns true if any key-value pair satisfies the provided\ntesting function. \nOptionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### toArray(obj[, cb[, thisArg[, compareFn]]]) _(es5-ext/object/to-array)_\n\nCreates an array of results of calling a provided function on every key-value pair in this object. \nOptionally _compareFn_ can be provided which assures that results are added in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### unserialize(str) _(es5-ext/object/unserialize)_\n\nUserializes value previously serialized with [serialize](#serializevalue-es5-extobjectserialize)\n\n#### validCallable(x) _(es5-ext/object/valid-callable)_\n\nIf given object is not callable throw TypeError in other case return it.\n\n#### validObject(x) _(es5-ext/object/valid-object)_\n\nThrows error if given value is not an object, otherwise it is returned.\n\n#### validValue(x) _(es5-ext/object/valid-value)_\n\nThrows error if given value is `null` or `undefined`, otherwise returns value.\n\n### RegExp Constructor extensions\n\n#### escape(str) _(es5-ext/reg-exp/escape)_\n\nEscapes string to be used in regular expression\n\n#### isRegExp(x) _(es5-ext/reg-exp/is-reg-exp)_\n\nWhether object is regular expression\n\n#### validRegExp(x) _(es5-ext/reg-exp/valid-reg-exp)_\n\nIf object is regular expression it is returned, otherwise TypeError is thrown.\n\n### RegExp Prototype extensions\n\n#### re.isSticky(x) _(es5-ext/reg-exp/#/is-sticky)_\n\nWhether regular expression has `sticky` flag.\n\nIt's to be used as counterpart to [regExp.sticky](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.sticky) if it's not implemented.\n\n#### re.isUnicode(x) _(es5-ext/reg-exp/#/is-unicode)_\n\nWhether regular expression has `unicode` flag.\n\nIt's to be used as counterpart to [regExp.unicode](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.unicode) if it's not implemented.\n\n#### re.match(string) _(es5-ext/reg-exp/#/match)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.match).\n\n#### re.replace(string, replaceValue) _(es5-ext/reg-exp/#/replace)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.replace).\n\n#### re.search(string) _(es5-ext/reg-exp/#/search)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.search).\n\n#### re.split(string) _(es5-ext/reg-exp/#/search)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.split).\n\n#### re.sticky _(es5-ext/reg-exp/#/sticky/implement)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.sticky). \nIt's a getter, so only `implement` and `is-implemented` modules are provided.\n\n#### re.unicode _(es5-ext/reg-exp/#/unicode/implement)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.unicode). \nIt's a getter, so only `implement` and `is-implemented` modules are provided.\n\n### String Constructor extensions\n\n#### formatMethod(fMap) _(es5-ext/string/format-method)_\n\nCreates format method. It's used e.g. to create `Date.prototype.format` method\n\n#### fromCodePoint([…codePoints]) _(es5-ext/string/from-code-point)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint)\n\n#### isString(x) _(es5-ext/string/is-string)_\n\nWhether object is string\n\n#### randomUniq() _(es5-ext/string/random-uniq)_\n\nReturns randomly generated id, with guarantee of local uniqueness (no same id will be returned twice)\n\n#### raw(callSite[, …substitutions]) _(es5-ext/string/raw)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.raw)\n\n### String Prototype extensions\n\n#### str.at(pos) _(es5-ext/string/#/at)_\n\n_Proposed for ECMAScript 6/7 standard, but not (yet) in a draft_\n\nReturns a string at given position in Unicode-safe manner.\nBased on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.at).\n\n#### str.camelToHyphen() _(es5-ext/string/#/camel-to-hyphen)_\n\nConvert camelCase string to hyphen separated, e.g. one-two-three -> oneTwoThree.\nUseful when converting names from js property convention into filename convention.\n\n#### str.capitalize() _(es5-ext/string/#/capitalize)_\n\nCapitalize first character of a string\n\n#### str.caseInsensitiveCompare(str) _(es5-ext/string/#/case-insensitive-compare)_\n\nCase insensitive compare\n\n#### str.codePointAt(pos) _(es5-ext/string/#/code-point-at)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.codepointat)\n\nBased on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.codePointAt).\n\n#### str.contains(searchString[, position]) _(es5-ext/string/#/contains)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains)\n\nWhether string contains given string.\n\n#### str.endsWith(searchString[, endPosition]) _(es5-ext/string/#/ends-with)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith). \nWhether strings ends with given string\n\n#### str.hyphenToCamel() _(es5-ext/string/#/hyphen-to-camel)_\n\nConvert hyphen separated string to camelCase, e.g. one-two-three -> oneTwoThree.\nUseful when converting names from filename convention to js property name convention.\n\n#### str.indent(str[, count]) _(es5-ext/string/#/indent)_\n\nIndents each line with provided _str_ (if _count_ given then _str_ is repeated _count_ times).\n\n#### str.last() _(es5-ext/string/#/last)_\n\nReturn last character\n\n#### str.normalize([form]) _(es5-ext/string/#/normalize)_\n\n[_Introduced with ECMAScript 6_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize). \nReturns the Unicode Normalization Form of a given string. \nBased on Matsuza's version. Code used for integrated shim can be found at [github.com/walling/unorm](https://github.com/walling/unorm/blob/master/lib/unorm.js)\n\n#### str.pad(fill[, length]) _(es5-ext/string/#/pad)_\n\nPad string with _fill_.\nIf _length_ si given than _fill_ is reapated _length_ times.\nIf _length_ is negative then pad is applied from right.\n\n#### str.repeat(n) _(es5-ext/string/#/repeat)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.repeat). \nRepeat given string _n_ times\n\n#### str.plainReplace(search, replace) _(es5-ext/string/#/plain-replace)_\n\nSimple `replace` version. Doesn't support regular expressions. Replaces just first occurrence of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).\n\n#### str.plainReplaceAll(search, replace) _(es5-ext/string/#/plain-replace-all)_\n\nSimple `replace` version. Doesn't support regular expressions. Replaces all occurrences of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).\n\n#### str.startsWith(searchString[, position]) _(es5-ext/string/#/starts-with)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.startswith). \nWhether strings starts with given string\n\n#### str[@@iterator] _(es5-ext/string/#/@@iterator)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype-@@iterator). \nReturns iterator object which traverses all string characters (with respect to unicode symbols)\n\n### Tests\n\n $ npm test\n\n[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/es5-ext/branches/master/shields_badge.svg\n[nix-build-url]: https://semaphoreci.com/medikoo-org/es5-ext\n[win-build-image]: https://ci.appveyor.com/api/projects/status/3jox67ksw3p8hkwh?svg=true\n[win-build-url]: https://ci.appveyor.com/project/medikoo/es5-ext\n[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg\n[npm-image]: https://img.shields.io/npm/v/es5-ext.svg\n[npm-url]: https://www.npmjs.com/package/es5-ext\n", - "readmeFilename": "README.md", - "bugs": "[Circular]", - "homepage": "https://github.com/medikoo/es5-ext#readme", - "_id": "es5-ext@0.10.45", - "_requested": { - "type": "version", - "registry": true, - "raw": "es5-ext@0.10.45", - "name": "es5-ext", - "escapedName": "es5-ext", - "rawSpec": "0.10.45", - "saveSpec": "[Circular]", - "fetchSpec": "0.10.45" - }, - "_spec": "0.10.45", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": "[Circular]", - "optionalDependencies": "[Circular]", - "_dependencies": "[Circular]", - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/es5-ext", - "error": "[Circular]", - "extraneous": false, - "_deduped": "es5-ext" - } - }, - "devDependencies": { - "tad": "^0.2.4", - "xlint": "^0.2.2", - "xlint-jslint-medikoo": "^0.1.4" - }, - "scripts": { - "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", - "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", - "test": "node node_modules/tad/bin/tad" - }, - "license": "MIT", - "_resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "_integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", - "_from": "d@1.0.0", - "readme": "# D\n## Property descriptor factory\n\n_Originally derived from [es5-ext](https://github.com/medikoo/es5-ext) package._\n\nDefining properties with descriptors is very verbose:\n\n```javascript\nvar Account = function () {};\nObject.defineProperties(Account.prototype, {\n deposit: { value: function () {\n /* ... */\n }, configurable: true, enumerable: false, writable: true },\n withdraw: { value: function () {\n /* ... */\n }, configurable: true, enumerable: false, writable: true },\n balance: { get: function () {\n /* ... */\n }, configurable: true, enumerable: false }\n});\n```\n\nD cuts that to:\n\n```javascript\nvar d = require('d');\n\nvar Account = function () {};\nObject.defineProperties(Account.prototype, {\n deposit: d(function () {\n /* ... */\n }),\n withdraw: d(function () {\n /* ... */\n }),\n balance: d.gs(function () {\n /* ... */\n })\n});\n```\n\nBy default, created descriptor follow characteristics of native ES5 properties, and defines values as:\n\n```javascript\n{ configurable: true, enumerable: false, writable: true }\n```\n\nYou can overwrite it by preceding _value_ argument with instruction:\n```javascript\nd('c', value); // { configurable: true, enumerable: false, writable: false }\nd('ce', value); // { configurable: true, enumerable: true, writable: false }\nd('e', value); // { configurable: false, enumerable: true, writable: false }\n\n// Same way for get/set:\nd.gs('e', value); // { configurable: false, enumerable: true }\n```\n\n### Installation\n\n\t$ npm install d\n\t\nTo port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)\n\n### Other utilities\n\n#### autoBind(obj, props) _(d/auto-bind)_\n\nDefine methods which will be automatically bound to its instances\n\n```javascript\nvar d = require('d');\nvar autoBind = require('d/auto-bind');\n\nvar Foo = function () { this._count = 0; };\nObject.defineProperties(Foo.prototype, autoBind({\n increment: d(function () { ++this._count; });\n}));\n\nvar foo = new Foo();\n\n// Increment foo counter on each domEl click\ndomEl.addEventListener('click', foo.increment, false);\n```\n\n#### lazy(obj, props) _(d/lazy)_\n\nDefine lazy properties, which will be resolved on first access\n\n```javascript\nvar d = require('d');\nvar lazy = require('d/lazy');\n\nvar Foo = function () {};\nObject.defineProperties(Foo.prototype, lazy({\n items: d(function () { return []; })\n}));\n\nvar foo = new Foo();\nfoo.items.push(1, 2); // foo.items array created and defined directly on foo\n```\n\n## Tests [![Build Status](https://travis-ci.org/medikoo/d.png)](https://travis-ci.org/medikoo/d)\n\n\t$ npm test\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/medikoo/d/issues" - }, - "homepage": "https://github.com/medikoo/d#readme", - "_id": "d@1.0.0", - "_requested": { - "type": "version", - "registry": true, - "raw": "d@1.0.0", - "name": "d", - "escapedName": "d", - "rawSpec": "1.0.0", - "saveSpec": "[Circular]", - "fetchSpec": "1.0.0" - }, - "_spec": "1.0.0", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "d@1.0.0", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": { - "es5-ext": "^0.10.9" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/es6-symbol/node_modules/d", - "error": "[Circular]", - "extraneous": false - } - }, - "devDependencies": "[Circular]", - "scripts": "[Circular]", - "license": "MIT", - "_resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "_integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "_from": "es6-symbol@3.1.1", - "readme": "# es6-symbol\n## ECMAScript 6 Symbol polyfill\n\nFor more information about symbols see following links\n- [Symbols in ECMAScript 6 by Axel Rauschmayer](http://www.2ality.com/2014/12/es6-symbols.html)\n- [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol)\n- [Specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-constructor)\n\n### Limitations\n\nUnderneath it uses real string property names which can easily be retrieved, however accidental collision with other property names is unlikely.\n\n### Usage\n\nIf you'd like to use native version when it exists and fallback to [ponyfill](https://ponyfill.com) if it doesn't, use *es6-symbol* as following:\n\n```javascript\nvar Symbol = require('es6-symbol');\n```\n\nIf you want to make sure your environment implements `Symbol` globally, do:\n\n```javascript\nrequire('es6-symbol/implement');\n```\n\nIf you strictly want to use polyfill even if native `Symbol` exists (hard to find a good reason for that), do:\n\n```javascript\nvar Symbol = require('es6-symbol/polyfill');\n```\n\n#### API\n\nBest is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-objects). Still if you want quick look, follow examples:\n\n```javascript\nvar Symbol = require('es6-symbol');\n\nvar symbol = Symbol('My custom symbol');\nvar x = {};\n\nx[symbol] = 'foo';\nconsole.log(x[symbol]); 'foo'\n\n// Detect iterable:\nvar iterator, result;\nif (possiblyIterable[Symbol.iterator]) {\n iterator = possiblyIterable[Symbol.iterator]();\n result = iterator.next();\n while(!result.done) {\n console.log(result.value);\n result = iterator.next();\n }\n}\n```\n\n### Installation\n#### NPM\n\nIn your project path:\n\n\t$ npm install es6-symbol\n\n##### Browser\n\nTo port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)\n\n## Tests [![Build Status](https://travis-ci.org/medikoo/es6-symbol.png)](https://travis-ci.org/medikoo/es6-symbol)\n\n\t$ npm test\n", - "readmeFilename": "README.md", - "bugs": "[Circular]", - "homepage": "https://github.com/medikoo/es6-symbol#readme", - "_id": "es6-symbol@3.1.1", - "_requested": { - "type": "version", - "registry": true, - "raw": "es6-symbol@3.1.1", - "name": "es6-symbol", - "escapedName": "es6-symbol", - "rawSpec": "3.1.1", - "saveSpec": "[Circular]", - "fetchSpec": "3.1.1" - }, - "_spec": "3.1.1", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": "[Circular]", - "optionalDependencies": "[Circular]", - "_dependencies": "[Circular]", - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/es6-symbol", - "error": "[Circular]", - "extraneous": false - }, - "next-tick": { - "name": "next-tick", - "version": "1.0.0", - "description": "Environment agnostic nextTick polyfill", - "author": { - "name": "Mariusz Nowak", - "email": "medyk@medikoo.com", - "url": "http://www.medikoo.com/" - }, - "keywords": [ - "nexttick", - "setImmediate", - "setTimeout", - "async" - ], - "repository": { - "type": "git", - "url": "git://github.com/medikoo/next-tick.git" - }, - "devDependencies": { - "tad": "^0.2.4", - "xlint": "^0.2.2", - "xlint-jslint-medikoo": "^0.1.4" - }, - "scripts": { - "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", - "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", - "test": "node node_modules/tad/bin/tad" - }, - "license": "MIT", - "_resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "_integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", - "_from": "next-tick@1.0.0", - "readme": "# next-tick\n## Environment agnostic nextTick polyfill\n\nTo be used in environment agnostic modules that need nextTick functionality.\n\n- When run in Node.js `process.nextTick` is used\n- In modern browsers microtask resolution is guaranteed by `MutationObserver`\n- In other engines `setImmediate` or `setTimeout(fn, 0)` is used as fallback.\n- If none of the above is supported module resolves to `null`\n\n## Installation\n### NPM\n\nIn your project path:\n\n\t$ npm install next-tick\n\n#### Browser\n\nYou can easily bundle `next-tick` for browser with any CJS bundler, e.g. [modules-webmake](https://github.com/medikoo/modules-webmake)\n\n## Tests [![Build Status](https://api.travis-ci.org/medikoo/next-tick.png?branch=master)](https://travis-ci.org/medikoo/next-tick)\n\n\t$ npm test\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/medikoo/next-tick/issues" - }, - "homepage": "https://github.com/medikoo/next-tick#readme", - "_id": "next-tick@1.0.0", - "_requested": { - "type": "version", - "registry": true, - "raw": "next-tick@1.0.0", - "name": "next-tick", - "escapedName": "next-tick", - "rawSpec": "1.0.0", - "saveSpec": "[Circular]", - "fetchSpec": "1.0.0" - }, - "_spec": "1.0.0", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "next-tick@1.0.0", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/next-tick", - "error": "[Circular]", - "extraneous": false - } - }, - "devDependencies": "[Circular]", - "eslintConfig": "[Circular]", - "scripts": "[Circular]", - "license": "ISC", - "_resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", - "_integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", - "_from": "es5-ext@0.10.45", - "readme": "[![Build status][nix-build-image]][nix-build-url]\n[![Windows status][win-build-image]][win-build-url]\n![Transpilation status][transpilation-image]\n[![npm version][npm-image]][npm-url]\n\n# es5-ext\n\n## ECMAScript 5 extensions\n\n### (with respect to ECMAScript 6 standard)\n\nShims for upcoming ES6 standard and other goodies implemented strictly with ECMAScript conventions in mind.\n\nIt's designed to be used in compliant ECMAScript 5 or ECMAScript 6 environments. Older environments are not supported, although most of the features should work with correct ECMAScript 5 shim on board.\n\nWhen used in ECMAScript 6 environment, native implementation (if valid) takes precedence over shims.\n\n### Installation\n\n $ npm install es5-ext\n\nTo port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)\n\n### Usage\n\n#### ECMAScript 6 features\n\nYou can force ES6 features to be implemented in your environment, e.g. following will assign `from` function to `Array` (only if it's not implemented already).\n\n```javascript\nrequire(\"es5-ext/array/from/implement\");\nArray.from(\"foo\"); // ['f', 'o', 'o']\n```\n\nYou can also access shims directly, without fixing native objects. Following will return native `Array.from` if it's available and fallback to shim if it's not.\n\n```javascript\nvar aFrom = require(\"es5-ext/array/from\");\naFrom(\"foo\"); // ['f', 'o', 'o']\n```\n\nIf you want to use shim unconditionally (even if native implementation exists) do:\n\n```javascript\nvar aFrom = require(\"es5-ext/array/from/shim\");\naFrom(\"foo\"); // ['f', 'o', 'o']\n```\n\n##### List of ES6 shims\n\nIt's about properties introduced with ES6 and those that have been updated in new spec.\n\n* `Array.from` -> `require('es5-ext/array/from')`\n* `Array.of` -> `require('es5-ext/array/of')`\n* `Array.prototype.concat` -> `require('es5-ext/array/#/concat')`\n* `Array.prototype.copyWithin` -> `require('es5-ext/array/#/copy-within')`\n* `Array.prototype.entries` -> `require('es5-ext/array/#/entries')`\n* `Array.prototype.fill` -> `require('es5-ext/array/#/fill')`\n* `Array.prototype.filter` -> `require('es5-ext/array/#/filter')`\n* `Array.prototype.find` -> `require('es5-ext/array/#/find')`\n* `Array.prototype.findIndex` -> `require('es5-ext/array/#/find-index')`\n* `Array.prototype.keys` -> `require('es5-ext/array/#/keys')`\n* `Array.prototype.map` -> `require('es5-ext/array/#/map')`\n* `Array.prototype.slice` -> `require('es5-ext/array/#/slice')`\n* `Array.prototype.splice` -> `require('es5-ext/array/#/splice')`\n* `Array.prototype.values` -> `require('es5-ext/array/#/values')`\n* `Array.prototype[@@iterator]` -> `require('es5-ext/array/#/@@iterator')`\n* `Math.acosh` -> `require('es5-ext/math/acosh')`\n* `Math.asinh` -> `require('es5-ext/math/asinh')`\n* `Math.atanh` -> `require('es5-ext/math/atanh')`\n* `Math.cbrt` -> `require('es5-ext/math/cbrt')`\n* `Math.clz32` -> `require('es5-ext/math/clz32')`\n* `Math.cosh` -> `require('es5-ext/math/cosh')`\n* `Math.exmp1` -> `require('es5-ext/math/expm1')`\n* `Math.fround` -> `require('es5-ext/math/fround')`\n* `Math.hypot` -> `require('es5-ext/math/hypot')`\n* `Math.imul` -> `require('es5-ext/math/imul')`\n* `Math.log1p` -> `require('es5-ext/math/log1p')`\n* `Math.log2` -> `require('es5-ext/math/log2')`\n* `Math.log10` -> `require('es5-ext/math/log10')`\n* `Math.sign` -> `require('es5-ext/math/sign')`\n* `Math.signh` -> `require('es5-ext/math/signh')`\n* `Math.tanh` -> `require('es5-ext/math/tanh')`\n* `Math.trunc` -> `require('es5-ext/math/trunc')`\n* `Number.EPSILON` -> `require('es5-ext/number/epsilon')`\n* `Number.MAX_SAFE_INTEGER` -> `require('es5-ext/number/max-safe-integer')`\n* `Number.MIN_SAFE_INTEGER` -> `require('es5-ext/number/min-safe-integer')`\n* `Number.isFinite` -> `require('es5-ext/number/is-finite')`\n* `Number.isInteger` -> `require('es5-ext/number/is-integer')`\n* `Number.isNaN` -> `require('es5-ext/number/is-nan')`\n* `Number.isSafeInteger` -> `require('es5-ext/number/is-safe-integer')`\n* `Object.assign` -> `require('es5-ext/object/assign')`\n* `Object.keys` -> `require('es5-ext/object/keys')`\n* `Object.setPrototypeOf` -> `require('es5-ext/object/set-prototype-of')`\n* `RegExp.prototype.match` -> `require('es5-ext/reg-exp/#/match')`\n* `RegExp.prototype.replace` -> `require('es5-ext/reg-exp/#/replace')`\n* `RegExp.prototype.search` -> `require('es5-ext/reg-exp/#/search')`\n* `RegExp.prototype.split` -> `require('es5-ext/reg-exp/#/split')`\n* `RegExp.prototype.sticky` -> Implement with `require('es5-ext/reg-exp/#/sticky/implement')`, use as function with `require('es5-ext/reg-exp/#/is-sticky')`\n* `RegExp.prototype.unicode` -> Implement with `require('es5-ext/reg-exp/#/unicode/implement')`, use as function with `require('es5-ext/reg-exp/#/is-unicode')`\n* `String.fromCodePoint` -> `require('es5-ext/string/from-code-point')`\n* `String.raw` -> `require('es5-ext/string/raw')`\n* `String.prototype.codePointAt` -> `require('es5-ext/string/#/code-point-at')`\n* `String.prototype.contains` -> `require('es5-ext/string/#/contains')`\n* `String.prototype.endsWith` -> `require('es5-ext/string/#/ends-with')`\n* `String.prototype.normalize` -> `require('es5-ext/string/#/normalize')`\n* `String.prototype.repeat` -> `require('es5-ext/string/#/repeat')`\n* `String.prototype.startsWith` -> `require('es5-ext/string/#/starts-with')`\n* `String.prototype[@@iterator]` -> `require('es5-ext/string/#/@@iterator')`\n\n#### Non ECMAScript standard features\n\n**es5-ext** provides also other utils, and implements them as if they were proposed for a standard. It mostly offers methods (not functions) which can directly be assigned to native prototypes:\n\n```javascript\nObject.defineProperty(Function.prototype, \"partial\", {\n\tvalue: require(\"es5-ext/function/#/partial\"),\n\tconfigurable: true,\n\tenumerable: false,\n\twritable: true\n});\nObject.defineProperty(Array.prototype, \"flatten\", {\n\tvalue: require(\"es5-ext/array/#/flatten\"),\n\tconfigurable: true,\n\tenumerable: false,\n\twritable: true\n});\nObject.defineProperty(String.prototype, \"capitalize\", {\n\tvalue: require(\"es5-ext/string/#/capitalize\"),\n\tconfigurable: true,\n\tenumerable: false,\n\twritable: true\n});\n```\n\nSee [es5-extend](https://github.com/wookieb/es5-extend#es5-extend), a great utility that automatically will extend natives for you.\n\n**Important:** Remember to **not** extend natives in scope of generic reusable packages (e.g. ones you intend to publish to npm). Extending natives is fine **only** if you're the _owner_ of the global scope, so e.g. in final project you lead development of.\n\nWhen you're in situation when native extensions are not good idea, then you should use methods indirectly:\n\n```javascript\nvar flatten = require(\"es5-ext/array/#/flatten\");\n\nflatten.call([1, [2, [3, 4]]]); // [1, 2, 3, 4]\n```\n\nfor better convenience you can turn methods into functions:\n\n```javascript\nvar call = Function.prototype.call;\nvar flatten = call.bind(require(\"es5-ext/array/#/flatten\"));\n\nflatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]\n```\n\nYou can configure custom toolkit (like [underscorejs](http://underscorejs.org/)), and use it throughout your application\n\n```javascript\nvar util = {};\nutil.partial = call.bind(require(\"es5-ext/function/#/partial\"));\nutil.flatten = call.bind(require(\"es5-ext/array/#/flatten\"));\nutil.startsWith = call.bind(require(\"es5-ext/string/#/starts-with\"));\n\nutil.flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]\n```\n\nAs with native ones most methods are generic and can be run on any type of object.\n\n## API\n\n### Global extensions\n\n#### global _(es5-ext/global)_\n\nObject that represents global scope\n\n### Array Constructor extensions\n\n#### from(arrayLike[, mapFn[, thisArg]]) _(es5-ext/array/from)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from). \nReturns array representation of _iterable_ or _arrayLike_. If _arrayLike_ is an instance of array, its copy is returned.\n\n#### generate([length[, …fill]]) _(es5-ext/array/generate)_\n\nGenerate an array of pre-given _length_ built of repeated arguments.\n\n#### isPlainArray(x) _(es5-ext/array/is-plain-array)_\n\nReturns true if object is plain array (not instance of one of the Array's extensions).\n\n#### of([…items]) _(es5-ext/array/of)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.of). \nCreate an array from given arguments.\n\n#### toArray(obj) _(es5-ext/array/to-array)_\n\nReturns array representation of `obj`. If `obj` is already an array, `obj` is returned back.\n\n#### validArray(obj) _(es5-ext/array/valid-array)_\n\nReturns `obj` if it's an array, otherwise throws `TypeError`\n\n### Array Prototype extensions\n\n#### arr.binarySearch(compareFn) _(es5-ext/array/#/binary-search)_\n\nIn **sorted** list search for index of item for which _compareFn_ returns value closest to _0_. \nIt's variant of binary search algorithm\n\n#### arr.clear() _(es5-ext/array/#/clear)_\n\nClears the array\n\n#### arr.compact() _(es5-ext/array/#/compact)_\n\nReturns a copy of the context with all non-values (`null` or `undefined`) removed.\n\n#### arr.concat() _(es5-ext/array/#/concat)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.concat). \nES6's version of `concat`. Supports `isConcatSpreadable` symbol, and returns array of same type as the context.\n\n#### arr.contains(searchElement[, position]) _(es5-ext/array/#/contains)_\n\nWhether list contains the given value.\n\n#### arr.copyWithin(target, start[, end]) _(es5-ext/array/#/copy-within)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.copywithin).\n\n#### arr.diff(other) _(es5-ext/array/#/diff)_\n\nReturns the array of elements that are present in context list but not present in other list.\n\n#### arr.eIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-index-of)_\n\n_egal_ version of `indexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision\n\n#### arr.eLastIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-last-index-of)_\n\n_egal_ version of `lastIndexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision\n\n#### arr.entries() _(es5-ext/array/#/entries)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.entries). \nReturns iterator object, which traverses the array. Each value is represented with an array, where first value is an index and second is corresponding to index value.\n\n#### arr.exclusion([…lists]]) _(es5-ext/array/#/exclusion)_\n\nReturns the array of elements that are found only in one of the lists (either context list or list provided in arguments).\n\n#### arr.fill(value[, start, end]) _(es5-ext/array/#/fill)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.fill).\n\n#### arr.filter(callback[, thisArg]) _(es5-ext/array/#/filter)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.filter). \nES6's version of `filter`, returns array of same type as the context.\n\n#### arr.find(predicate[, thisArg]) _(es5-ext/array/#/find)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.find). \nReturn first element for which given function returns true\n\n#### arr.findIndex(predicate[, thisArg]) _(es5-ext/array/#/find-index)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.findindex). \nReturn first index for which given function returns true\n\n#### arr.first() _(es5-ext/array/#/first)_\n\nReturns value for first defined index\n\n#### arr.firstIndex() _(es5-ext/array/#/first-index)_\n\nReturns first declared index of the array\n\n#### arr.flatten() _(es5-ext/array/#/flatten)_\n\nReturns flattened version of the array\n\n#### arr.forEachRight(cb[, thisArg]) _(es5-ext/array/#/for-each-right)_\n\n`forEach` starting from last element\n\n#### arr.group(cb[, thisArg]) _(es5-ext/array/#/group)_\n\nGroup list elements by value returned by _cb_ function\n\n#### arr.indexesOf(searchElement[, fromIndex]) _(es5-ext/array/#/indexes-of)_\n\nReturns array of all indexes of given value\n\n#### arr.intersection([…lists]) _(es5-ext/array/#/intersection)_\n\nComputes the array of values that are the intersection of all lists (context list and lists given in arguments)\n\n#### arr.isCopy(other) _(es5-ext/array/#/is-copy)_\n\nReturns true if both context and _other_ lists have same content\n\n#### arr.isUniq() _(es5-ext/array/#/is-uniq)_\n\nReturns true if all values in array are unique\n\n#### arr.keys() _(es5-ext/array/#/keys)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.keys). \nReturns iterator object, which traverses all array indexes.\n\n#### arr.last() _(es5-ext/array/#/last)_\n\nReturns value of last defined index\n\n#### arr.lastIndex() _(es5-ext/array/#/last)_\n\nReturns last defined index of the array\n\n#### arr.map(callback[, thisArg]) _(es5-ext/array/#/map)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.map). \nES6's version of `map`, returns array of same type as the context.\n\n#### arr.remove(value[, …valuen]) _(es5-ext/array/#/remove)_\n\nRemove values from the array\n\n#### arr.separate(sep) _(es5-ext/array/#/separate)_\n\nReturns array with items separated with `sep` value\n\n#### arr.slice(callback[, thisArg]) _(es5-ext/array/#/slice)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.slice). \nES6's version of `slice`, returns array of same type as the context.\n\n#### arr.someRight(cb[, thisArg]) _(es5-ext/array/#/someRight)_\n\n`some` starting from last element\n\n#### arr.splice(callback[, thisArg]) _(es5-ext/array/#/splice)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.splice). \nES6's version of `splice`, returns array of same type as the context.\n\n#### arr.uniq() _(es5-ext/array/#/uniq)_\n\nReturns duplicate-free version of the array\n\n#### arr.values() _(es5-ext/array/#/values)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.values). \nReturns iterator object which traverses all array values.\n\n#### arr[@@iterator] _(es5-ext/array/#/@@iterator)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype-@@iterator). \nReturns iterator object which traverses all array values.\n\n### Boolean Constructor extensions\n\n#### isBoolean(x) _(es5-ext/boolean/is-boolean)_\n\nWhether value is boolean\n\n### Date Constructor extensions\n\n#### isDate(x) _(es5-ext/date/is-date)_\n\nWhether value is date instance\n\n#### validDate(x) _(es5-ext/date/valid-date)_\n\nIf given object is not date throw TypeError in other case return it.\n\n### Date Prototype extensions\n\n#### date.copy(date) _(es5-ext/date/#/copy)_\n\nReturns a copy of the date object\n\n#### date.daysInMonth() _(es5-ext/date/#/days-in-month)_\n\nReturns number of days of date's month\n\n#### date.floorDay() _(es5-ext/date/#/floor-day)_\n\nSets the date time to 00:00:00.000\n\n#### date.floorMonth() _(es5-ext/date/#/floor-month)_\n\nSets date day to 1 and date time to 00:00:00.000\n\n#### date.floorYear() _(es5-ext/date/#/floor-year)_\n\nSets date month to 0, day to 1 and date time to 00:00:00.000\n\n#### date.format(pattern) _(es5-ext/date/#/format)_\n\nFormats date up to given string. Supported patterns:\n\n* `%Y` - Year with century, 1999, 2003\n* `%y` - Year without century, 99, 03\n* `%m` - Month, 01..12\n* `%d` - Day of the month 01..31\n* `%H` - Hour (24-hour clock), 00..23\n* `%M` - Minute, 00..59\n* `%S` - Second, 00..59\n* `%L` - Milliseconds, 000..999\n\n### Error Constructor extensions\n\n#### custom(message/_, code, ext_/) _(es5-ext/error/custom)_\n\nCreates custom error object, optinally extended with `code` and other extension properties (provided with `ext` object)\n\n#### isError(x) _(es5-ext/error/is-error)_\n\nWhether value is an error (instance of `Error`).\n\n#### validError(x) _(es5-ext/error/valid-error)_\n\nIf given object is not error throw TypeError in other case return it.\n\n### Error Prototype extensions\n\n#### err.throw() _(es5-ext/error/#/throw)_\n\nThrows error\n\n### Function Constructor extensions\n\nSome of the functions were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele\n\n#### constant(x) _(es5-ext/function/constant)_\n\nReturns a constant function that returns pregiven argument\n\n_k(x)(y) =def x_\n\n#### identity(x) _(es5-ext/function/identity)_\n\nIdentity function. Returns first argument\n\n_i(x) =def x_\n\n#### invoke(name[, …args]) _(es5-ext/function/invoke)_\n\nReturns a function that takes an object as an argument, and applies object's\n_name_ method to arguments. \n_name_ can be name of the method or method itself.\n\n_invoke(name, …args)(object, …args2) =def object\\[name\\]\\(…args, …args2\\)_\n\n#### isArguments(x) _(es5-ext/function/is-arguments)_\n\nWhether value is arguments object\n\n#### isFunction(arg) _(es5-ext/function/is-function)_\n\nWhether value is instance of function\n\n#### noop() _(es5-ext/function/noop)_\n\nNo operation function\n\n#### pluck(name) _(es5-ext/function/pluck)_\n\nReturns a function that takes an object, and returns the value of its _name_\nproperty\n\n_pluck(name)(obj) =def obj[name]_\n\n#### validFunction(arg) _(es5-ext/function/valid-function)_\n\nIf given object is not function throw TypeError in other case return it.\n\n### Function Prototype extensions\n\nSome of the methods were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele\n\n#### fn.compose([…fns]) _(es5-ext/function/#/compose)_\n\nApplies the functions in reverse argument-list order.\n\n_f1.compose(f2, f3, f4)(…args) =def f1(f2(f3(f4(…arg))))_\n\n#### fn.copy() _(es5-ext/function/#/copy)_\n\nProduces copy of given function\n\n#### fn.curry([n]) _(es5-ext/function/#/curry)_\n\nInvoking the function returned by this function only _n_ arguments are passed to the underlying function. If the underlying function is not saturated, the result is a function that passes all its arguments to the underlying function. \nIf _n_ is not provided then it defaults to context function length\n\n_f.curry(4)(arg1, arg2)(arg3)(arg4) =def f(arg1, args2, arg3, arg4)_\n\n#### fn.lock([…args]) _(es5-ext/function/#/lock)_\n\nReturns a function that applies the underlying function to _args_, and ignores its own arguments.\n\n_f.lock(…args)(…args2) =def f(…args)_\n\n_Named after it's counterpart in Google Closure_\n\n#### fn.not() _(es5-ext/function/#/not)_\n\nReturns a function that returns boolean negation of value returned by underlying function.\n\n_f.not()(…args) =def !f(…args)_\n\n#### fn.partial([…args]) _(es5-ext/function/#/partial)_\n\nReturns a function that when called will behave like context function called with initially passed arguments. If more arguments are suplilied, they are appended to initial args.\n\n_f.partial(…args1)(…args2) =def f(…args1, …args2)_\n\n#### fn.spread() _(es5-ext/function/#/spread)_\n\nReturns a function that applies underlying function with first list argument\n\n_f.match()(args) =def f.apply(null, args)_\n\n#### fn.toStringTokens() _(es5-ext/function/#/to-string-tokens)_\n\nSerializes function into two (arguments and body) string tokens. Result is plain object with `args` and `body` properties.\n\n### Math extensions\n\n#### acosh(x) _(es5-ext/math/acosh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.acosh).\n\n#### asinh(x) _(es5-ext/math/asinh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.asinh).\n\n#### atanh(x) _(es5-ext/math/atanh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.atanh).\n\n#### cbrt(x) _(es5-ext/math/cbrt)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cbrt).\n\n#### clz32(x) _(es5-ext/math/clz32)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.clz32).\n\n#### cosh(x) _(es5-ext/math/cosh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cosh).\n\n#### expm1(x) _(es5-ext/math/expm1)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.expm1).\n\n#### fround(x) _(es5-ext/math/fround)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround).\n\n#### hypot([…values]) _(es5-ext/math/hypot)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot).\n\n#### imul(x, y) _(es5-ext/math/imul)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.imul).\n\n#### log1p(x) _(es5-ext/math/log1p)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log1p).\n\n#### log2(x) _(es5-ext/math/log2)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log2).\n\n#### log10(x) _(es5-ext/math/log10)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log10).\n\n#### sign(x) _(es5-ext/math/sign)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sign).\n\n#### sinh(x) _(es5-ext/math/sinh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sinh).\n\n#### tanh(x) _(es5-ext/math/tanh)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.tanh).\n\n#### trunc(x) _(es5-ext/math/trunc)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc).\n\n### Number Constructor extensions\n\n#### EPSILON _(es5-ext/number/epsilon)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.epsilon).\n\nThe difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately 2.2204460492503130808472633361816 x 10-16.\n\n#### isFinite(x) _(es5-ext/number/is-finite)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite). \nWhether value is finite. Differs from global isNaN that it doesn't do type coercion.\n\n#### isInteger(x) _(es5-ext/number/is-integer)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger). \nWhether value is integer.\n\n#### isNaN(x) _(es5-ext/number/is-nan)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan). \nWhether value is NaN. Differs from global isNaN that it doesn't do type coercion.\n\n#### isNumber(x) _(es5-ext/number/is-number)_\n\nWhether given value is number\n\n#### isSafeInteger(x) _(es5-ext/number/is-safe-integer)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.issafeinteger).\n\n#### MAX*SAFE_INTEGER *(es5-ext/number/max-safe-integer)\\_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.maxsafeinteger). \nThe value of Number.MAX_SAFE_INTEGER is 9007199254740991.\n\n#### MIN*SAFE_INTEGER *(es5-ext/number/min-safe-integer)\\_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.minsafeinteger). \nThe value of Number.MIN_SAFE_INTEGER is -9007199254740991 (253-1).\n\n#### toInteger(x) _(es5-ext/number/to-integer)_\n\nConverts value to integer\n\n#### toPosInteger(x) _(es5-ext/number/to-pos-integer)_\n\nConverts value to positive integer. If provided value is less than 0, then 0 is returned\n\n#### toUint32(x) _(es5-ext/number/to-uint32)_\n\nConverts value to unsigned 32 bit integer. This type is used for array lengths.\nSee: http://www.2ality.com/2012/02/js-integers.html\n\n### Number Prototype extensions\n\n#### num.pad(length[, precision]) _(es5-ext/number/#/pad)_\n\nPad given number with zeros. Returns string\n\n### Object Constructor extensions\n\n#### assign(target, source[, …sourcen]) _(es5-ext/object/assign)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign). \nExtend _target_ by enumerable own properties of other objects. If properties are already set on target object, they will be overwritten.\n\n#### clear(obj) _(es5-ext/object/clear)_\n\nRemove all enumerable own properties of the object\n\n#### compact(obj) _(es5-ext/object/compact)_\n\nReturns copy of the object with all enumerable properties that have no falsy values\n\n#### compare(obj1, obj2) _(es5-ext/object/compare)_\n\nUniversal cross-type compare function. To be used for e.g. array sort.\n\n#### copy(obj) _(es5-ext/object/copy)_\n\nReturns copy of the object with all enumerable properties.\n\n#### copyDeep(obj) _(es5-ext/object/copy-deep)_\n\nReturns deep copy of the object with all enumerable properties.\n\n#### count(obj) _(es5-ext/object/count)_\n\nCounts number of enumerable own properties on object\n\n#### create(obj[, properties]) _(es5-ext/object/create)_\n\n`Object.create` alternative that provides workaround for [V8 issue](http://code.google.com/p/v8/issues/detail?id=2804).\n\nWhen `null` is provided as a prototype, it's substituted with specially prepared object that derives from Object.prototype but has all Object.prototype properties shadowed with undefined.\n\nIt's quirky solution that allows us to have plain objects with no truthy properties but with turnable prototype.\n\nUse only for objects that you plan to switch prototypes of and be aware of limitations of this workaround.\n\n#### eq(x, y) _(es5-ext/object/eq)_\n\nWhether two values are equal, using [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.\n\n#### every(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/every)_\n\nAnalogous to Array.prototype.every. Returns true if every key-value pair in this object satisfies the provided testing function. \nOptionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### filter(obj, cb[, thisArg]) _(es5-ext/object/filter)_\n\nAnalogous to Array.prototype.filter. Returns new object with properites for which _cb_ function returned truthy value.\n\n#### firstKey(obj) _(es5-ext/object/first-key)_\n\nReturns first enumerable key of the object, as keys are unordered by specification, it can be any key of an object.\n\n#### flatten(obj) _(es5-ext/object/flatten)_\n\nReturns new object, with flatten properties of input object\n\n_flatten({ a: { b: 1 }, c: { d: 1 } }) =def { b: 1, d: 1 }_\n\n#### forEach(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/for-each)_\n\nAnalogous to Array.prototype.forEach. Calls a function for each key-value pair found in object\nOptionally _compareFn_ can be provided which assures that properties are iterated in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### getPropertyNames() _(es5-ext/object/get-property-names)_\n\nGet all (not just own) property names of the object\n\n#### is(x, y) _(es5-ext/object/is)_\n\nWhether two values are equal, using [_SameValue_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.\n\n#### isArrayLike(x) _(es5-ext/object/is-array-like)_\n\nWhether object is array-like object\n\n#### isCopy(x, y) _(es5-ext/object/is-copy)_\n\nTwo values are considered a copy of same value when all of their own enumerable properties have same values.\n\n#### isCopyDeep(x, y) _(es5-ext/object/is-copy-deep)_\n\nDeep comparision of objects\n\n#### isEmpty(obj) _(es5-ext/object/is-empty)_\n\nTrue if object doesn't have any own enumerable property\n\n#### isObject(arg) _(es5-ext/object/is-object)_\n\nWhether value is not primitive\n\n#### isPlainObject(arg) _(es5-ext/object/is-plain-object)_\n\nWhether object is plain object, its protototype should be Object.prototype and it cannot be host object.\n\n#### keyOf(obj, searchValue) _(es5-ext/object/key-of)_\n\nSearch object for value\n\n#### keys(obj) _(es5-ext/object/keys)_\n\n[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys). \nES6's version of `keys`, doesn't throw on primitive input\n\n#### map(obj, cb[, thisArg]) _(es5-ext/object/map)_\n\nAnalogous to Array.prototype.map. Creates a new object with properties which values are results of calling a provided function on every key-value pair in this object.\n\n#### mapKeys(obj, cb[, thisArg]) _(es5-ext/object/map-keys)_\n\nCreate new object with same values, but remapped keys\n\n#### mixin(target, source) _(es5-ext/object/mixin)_\n\nExtend _target_ by all own properties of other objects. Properties found in both objects will be overwritten (unless they're not configurable and cannot be overwritten).\n_It was for a moment part of ECMAScript 6 draft._\n\n#### mixinPrototypes(target, …source]) _(es5-ext/object/mixin-prototypes)_\n\nExtends _target_, with all source and source's prototype properties.\nUseful as an alternative for `setPrototypeOf` in environments in which it cannot be shimmed (no `__proto__` support).\n\n#### normalizeOptions(options) _(es5-ext/object/normalize-options)_\n\nNormalizes options object into flat plain object.\n\nUseful for functions in which we either need to keep options object for future reference or need to modify it for internal use.\n\n* It never returns input `options` object back (always a copy is created)\n* `options` can be undefined in such case empty plain object is returned.\n* Copies all enumerable properties found down prototype chain.\n\n#### primitiveSet([…names]) _(es5-ext/object/primitive-set)_\n\nCreates `null` prototype based plain object, and sets on it all property names provided in arguments to true.\n\n#### safeTraverse(obj[, …names]) _(es5-ext/object/safe-traverse)_\n\nSafe navigation of object properties. See http://wiki.ecmascript.org/doku.php?id=strawman:existential_operator\n\n#### serialize(value) _(es5-ext/object/serialize)_\n\nSerialize value into string. Differs from [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that it serializes also dates, functions and regular expresssions.\n\n#### setPrototypeOf(object, proto) _(es5-ext/object/set-prototype-of)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.setprototypeof). \nIf native version is not provided, it depends on existence of `__proto__` functionality, if it's missing, `null` instead of function is exposed.\n\n#### some(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/some)_\n\nAnalogous to Array.prototype.some Returns true if any key-value pair satisfies the provided\ntesting function. \nOptionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### toArray(obj[, cb[, thisArg[, compareFn]]]) _(es5-ext/object/to-array)_\n\nCreates an array of results of calling a provided function on every key-value pair in this object. \nOptionally _compareFn_ can be provided which assures that results are added in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).\n\n#### unserialize(str) _(es5-ext/object/unserialize)_\n\nUserializes value previously serialized with [serialize](#serializevalue-es5-extobjectserialize)\n\n#### validCallable(x) _(es5-ext/object/valid-callable)_\n\nIf given object is not callable throw TypeError in other case return it.\n\n#### validObject(x) _(es5-ext/object/valid-object)_\n\nThrows error if given value is not an object, otherwise it is returned.\n\n#### validValue(x) _(es5-ext/object/valid-value)_\n\nThrows error if given value is `null` or `undefined`, otherwise returns value.\n\n### RegExp Constructor extensions\n\n#### escape(str) _(es5-ext/reg-exp/escape)_\n\nEscapes string to be used in regular expression\n\n#### isRegExp(x) _(es5-ext/reg-exp/is-reg-exp)_\n\nWhether object is regular expression\n\n#### validRegExp(x) _(es5-ext/reg-exp/valid-reg-exp)_\n\nIf object is regular expression it is returned, otherwise TypeError is thrown.\n\n### RegExp Prototype extensions\n\n#### re.isSticky(x) _(es5-ext/reg-exp/#/is-sticky)_\n\nWhether regular expression has `sticky` flag.\n\nIt's to be used as counterpart to [regExp.sticky](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.sticky) if it's not implemented.\n\n#### re.isUnicode(x) _(es5-ext/reg-exp/#/is-unicode)_\n\nWhether regular expression has `unicode` flag.\n\nIt's to be used as counterpart to [regExp.unicode](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.unicode) if it's not implemented.\n\n#### re.match(string) _(es5-ext/reg-exp/#/match)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.match).\n\n#### re.replace(string, replaceValue) _(es5-ext/reg-exp/#/replace)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.replace).\n\n#### re.search(string) _(es5-ext/reg-exp/#/search)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.search).\n\n#### re.split(string) _(es5-ext/reg-exp/#/search)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.split).\n\n#### re.sticky _(es5-ext/reg-exp/#/sticky/implement)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.sticky). \nIt's a getter, so only `implement` and `is-implemented` modules are provided.\n\n#### re.unicode _(es5-ext/reg-exp/#/unicode/implement)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.unicode). \nIt's a getter, so only `implement` and `is-implemented` modules are provided.\n\n### String Constructor extensions\n\n#### formatMethod(fMap) _(es5-ext/string/format-method)_\n\nCreates format method. It's used e.g. to create `Date.prototype.format` method\n\n#### fromCodePoint([…codePoints]) _(es5-ext/string/from-code-point)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint)\n\n#### isString(x) _(es5-ext/string/is-string)_\n\nWhether object is string\n\n#### randomUniq() _(es5-ext/string/random-uniq)_\n\nReturns randomly generated id, with guarantee of local uniqueness (no same id will be returned twice)\n\n#### raw(callSite[, …substitutions]) _(es5-ext/string/raw)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.raw)\n\n### String Prototype extensions\n\n#### str.at(pos) _(es5-ext/string/#/at)_\n\n_Proposed for ECMAScript 6/7 standard, but not (yet) in a draft_\n\nReturns a string at given position in Unicode-safe manner.\nBased on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.at).\n\n#### str.camelToHyphen() _(es5-ext/string/#/camel-to-hyphen)_\n\nConvert camelCase string to hyphen separated, e.g. one-two-three -> oneTwoThree.\nUseful when converting names from js property convention into filename convention.\n\n#### str.capitalize() _(es5-ext/string/#/capitalize)_\n\nCapitalize first character of a string\n\n#### str.caseInsensitiveCompare(str) _(es5-ext/string/#/case-insensitive-compare)_\n\nCase insensitive compare\n\n#### str.codePointAt(pos) _(es5-ext/string/#/code-point-at)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.codepointat)\n\nBased on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.codePointAt).\n\n#### str.contains(searchString[, position]) _(es5-ext/string/#/contains)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains)\n\nWhether string contains given string.\n\n#### str.endsWith(searchString[, endPosition]) _(es5-ext/string/#/ends-with)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith). \nWhether strings ends with given string\n\n#### str.hyphenToCamel() _(es5-ext/string/#/hyphen-to-camel)_\n\nConvert hyphen separated string to camelCase, e.g. one-two-three -> oneTwoThree.\nUseful when converting names from filename convention to js property name convention.\n\n#### str.indent(str[, count]) _(es5-ext/string/#/indent)_\n\nIndents each line with provided _str_ (if _count_ given then _str_ is repeated _count_ times).\n\n#### str.last() _(es5-ext/string/#/last)_\n\nReturn last character\n\n#### str.normalize([form]) _(es5-ext/string/#/normalize)_\n\n[_Introduced with ECMAScript 6_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize). \nReturns the Unicode Normalization Form of a given string. \nBased on Matsuza's version. Code used for integrated shim can be found at [github.com/walling/unorm](https://github.com/walling/unorm/blob/master/lib/unorm.js)\n\n#### str.pad(fill[, length]) _(es5-ext/string/#/pad)_\n\nPad string with _fill_.\nIf _length_ si given than _fill_ is reapated _length_ times.\nIf _length_ is negative then pad is applied from right.\n\n#### str.repeat(n) _(es5-ext/string/#/repeat)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.repeat). \nRepeat given string _n_ times\n\n#### str.plainReplace(search, replace) _(es5-ext/string/#/plain-replace)_\n\nSimple `replace` version. Doesn't support regular expressions. Replaces just first occurrence of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).\n\n#### str.plainReplaceAll(search, replace) _(es5-ext/string/#/plain-replace-all)_\n\nSimple `replace` version. Doesn't support regular expressions. Replaces all occurrences of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).\n\n#### str.startsWith(searchString[, position]) _(es5-ext/string/#/starts-with)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.startswith). \nWhether strings starts with given string\n\n#### str[@@iterator] _(es5-ext/string/#/@@iterator)_\n\n[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype-@@iterator). \nReturns iterator object which traverses all string characters (with respect to unicode symbols)\n\n### Tests\n\n $ npm test\n\n[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/es5-ext/branches/master/shields_badge.svg\n[nix-build-url]: https://semaphoreci.com/medikoo-org/es5-ext\n[win-build-image]: https://ci.appveyor.com/api/projects/status/3jox67ksw3p8hkwh?svg=true\n[win-build-url]: https://ci.appveyor.com/project/medikoo/es5-ext\n[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg\n[npm-image]: https://img.shields.io/npm/v/es5-ext.svg\n[npm-url]: https://www.npmjs.com/package/es5-ext\n", - "readmeFilename": "README.md", - "bugs": "[Circular]", - "homepage": "https://github.com/medikoo/es5-ext#readme", - "_id": "es5-ext@0.10.45", - "_requested": { - "type": "version", - "registry": true, - "raw": "es5-ext@0.10.45", - "name": "es5-ext", - "escapedName": "es5-ext", - "rawSpec": "0.10.45", - "saveSpec": "[Circular]", - "fetchSpec": "0.10.45" - }, - "_spec": "0.10.45", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": "[Circular]", - "optionalDependencies": "[Circular]", - "_dependencies": "[Circular]", - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/es5-ext", - "error": "[Circular]", - "extraneous": false - } - }, - "devDependencies": { - "tad": "~0.2.3", - "xlint": "~0.2.2", - "xlint-jslint-medikoo": "~0.1.4" - }, - "scripts": { - "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", - "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", - "test": "node ./node_modules/tad/bin/tad" - }, - "license": "MIT", - "_resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.4.tgz", - "_integrity": "sha1-jWPd+0z+H647MsomXExyAiIIC7U=", - "_from": "event-emitter@0.3.4", - "readme": "# event-emitter\n## Environment agnostic event emitter\n\n### Installation\n\n\t$ npm install event-emitter\n\t\nTo port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)\n\n### Usage\n\n```javascript\nvar ee = require('event-emitter');\n\nvar emitter = ee({}), listener;\n\nemitter.on('test', listener = function (args) {\n // …emitter logic\n});\n\nemitter.once('test', function (args) {\n // …invoked only once(!)\n});\n\nemitter.emit('test', arg1, arg2/*…args*/); // Two above listeners invoked\nemitter.emit('test', arg1, arg2/*…args*/); // Only first listener invoked\n\nemitter.off('test', listener); // Removed first listener\nemitter.emit('test', arg1, arg2/*…args*/); // No listeners invoked\n```\n### Additional utilities\n\n#### allOff(obj) _(event-emitter/all-off)_\n\nRemoves all listeners from given event emitter object\n\n#### hasListeners(obj[, name]) _(event-emitter/has-listeners)_\n\nWhether object has some listeners attached to the object.\nWhen `name` is provided, it checks listeners for specific event name\n\n```javascript\nvar emitter = ee();\nvar hasListeners = require('event-emitter/has-listeners');\nvar listener = function () {};\n\nhasListeners(emitter); // false\n\nemitter.on('foo', listener);\nhasListeners(emitter); // true\nhasListeners(emitter, 'foo'); // true\nhasListeners(emitter, 'bar'); // false\n\nemitter.off('foo', listener);\nhasListeners(emitter, 'foo'); // false\n```\n\n#### pipe(source, target[, emitMethodName]) _(event-emitter/pipe)_\n\nPipes all events from _source_ emitter onto _target_ emitter (all events from _source_ emitter will be emitted also on _target_ emitter, but not other way). \nReturns _pipe_ object which exposes `pipe.close` function. Invoke it to close configured _pipe_. \nIt works internally by redefinition of `emit` method, if in your interface this method is referenced differently, provide its name (or symbol) with third argument.\n\n#### unify(emitter1, emitter2) _(event-emitter/unify)_\n\nUnifies event handling for two objects. Events emitted on _emitter1_ would be also emitter on _emitter2_, and other way back. \nNon reversible.\n\n```javascript\nvar eeUnify = require('event-emitter/unify');\n\nvar emitter1 = ee(), listener1, listener3;\nvar emitter2 = ee(), listener2, listener4;\n\nemitter1.on('test', listener1 = function () { });\nemitter2.on('test', listener2 = function () { });\n\nemitter1.emit('test'); // Invoked listener1\nemitter2.emit('test'); // Invoked listener2\n\nvar unify = eeUnify(emitter1, emitter2);\n\nemitter1.emit('test'); // Invoked listener1 and listener2\nemitter2.emit('test'); // Invoked listener1 and listener2\n\nemitter1.on('test', listener3 = function () { });\nemitter2.on('test', listener4 = function () { });\n\nemitter1.emit('test'); // Invoked listener1, listener2, listener3 and listener4\nemitter2.emit('test'); // Invoked listener1, listener2, listener3 and listener4\n```\n\n### Tests [![Build Status](https://travis-ci.org/medikoo/event-emitter.png)](https://travis-ci.org/medikoo/event-emitter)\n\n\t$ npm test\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/medikoo/event-emitter/issues" - }, - "homepage": "https://github.com/medikoo/event-emitter#readme", - "_id": "event-emitter@0.3.4", - "_requested": { - "type": "version", - "registry": true, - "raw": "event-emitter@0.3.4", - "name": "event-emitter", - "escapedName": "event-emitter", - "rawSpec": "0.3.4", - "saveSpec": "[Circular]", - "fetchSpec": "0.3.4" - }, - "_spec": "0.3.4", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "event-emitter@0.3.4", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": { - "es5-ext": "~0.10.7", - "d": "~0.1.1" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/event-emitter", - "error": "[Circular]", - "extraneous": false - }, - "superagent": { - "name": "superagent", - "version": "3.8.2", - "description": "elegant & feature rich browser / node HTTP with a fluent API", - "scripts": { - "prepare": "make all", - "test": "make test" - }, - "keywords": [ - "http", - "ajax", - "request", - "agent" - ], - "license": "MIT", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "contributors": [ - { - "name": "Kornel Lesiński", - "email": "kornel@geekhood.net" - }, - { - "name": "Peter Lyons", - "email": "pete@peterlyons.com" - }, - { - "name": "Hunter Loftis", - "email": "hunter@hunterloftis.com" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/superagent.git" - }, - "dependencies": { - "component-emitter": { - "name": "component-emitter", - "description": "Event emitter", - "version": "1.2.1", - "license": "MIT", - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "component": { - "scripts": { - "emitter/index.js": "index.js" - } - }, - "main": "index.js", - "repository": { - "type": "git", - "url": "git+https://github.com/component/emitter.git" - }, - "scripts": { - "test": "make test" - }, - "files": [ - "index.js", - "LICENSE" - ], - "_resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "_integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "_from": "component-emitter@1.2.1", - "readme": "# Emitter [![Build Status](https://travis-ci.org/component/emitter.png)](https://travis-ci.org/component/emitter)\r\n\r\n Event emitter component.\r\n\r\n## Installation\r\n\r\n```\r\n$ component install component/emitter\r\n```\r\n\r\n## API\r\n\r\n### Emitter(obj)\r\n\r\n The `Emitter` may also be used as a mixin. For example\r\n a \"plain\" object may become an emitter, or you may\r\n extend an existing prototype.\r\n\r\n As an `Emitter` instance:\r\n\r\n```js\r\nvar Emitter = require('emitter');\r\nvar emitter = new Emitter;\r\nemitter.emit('something');\r\n```\r\n\r\n As a mixin:\r\n\r\n```js\r\nvar Emitter = require('emitter');\r\nvar user = { name: 'tobi' };\r\nEmitter(user);\r\n\r\nuser.emit('im a user');\r\n```\r\n\r\n As a prototype mixin:\r\n\r\n```js\r\nvar Emitter = require('emitter');\r\nEmitter(User.prototype);\r\n```\r\n\r\n### Emitter#on(event, fn)\r\n\r\n Register an `event` handler `fn`.\r\n\r\n### Emitter#once(event, fn)\r\n\r\n Register a single-shot `event` handler `fn`,\r\n removed immediately after it is invoked the\r\n first time.\r\n\r\n### Emitter#off(event, fn)\r\n\r\n * Pass `event` and `fn` to remove a listener.\r\n * Pass `event` to remove all listeners on that event.\r\n * Pass nothing to remove all listeners on all events.\r\n\r\n### Emitter#emit(event, ...)\r\n\r\n Emit an `event` with variable option args.\r\n\r\n### Emitter#listeners(event)\r\n\r\n Return an array of callbacks, or an empty array.\r\n\r\n### Emitter#hasListeners(event)\r\n\r\n Check if this emitter has `event` handlers.\r\n\r\n## License\r\n\r\nMIT\r\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/component/emitter/issues" - }, - "homepage": "https://github.com/component/emitter#readme", - "_id": "component-emitter@1.2.1", - "_requested": { - "type": "version", - "registry": true, - "raw": "component-emitter@1.2.1", - "name": "component-emitter", - "escapedName": "component-emitter", - "rawSpec": "1.2.1", - "saveSpec": "[Circular]", - "fetchSpec": "1.2.1" - }, - "_spec": "1.2.1", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "component-emitter@1.2.1", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/component-emitter", - "error": "[Circular]", - "extraneous": false - }, - "cookiejar": { - "name": "cookiejar", - "version": "2.1.2", - "author": { - "name": "bradleymeck" - }, - "main": "cookiejar.js", - "description": "simple persistent cookiejar system", - "files": [ - "cookiejar.js" - ], - "license": "MIT", - "jshintConfig": { - "node": true - }, - "scripts": { - "test": "node tests/test.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/bmeck/node-cookiejar.git" - }, - "devDependencies": { - "jshint": "^2.9.4" - }, - "_resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", - "_integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", - "_from": "cookiejar@2.1.2", - "readme": "# CookieJar\n\n[![NPM version](http://img.shields.io/npm/v/cookiejar.svg)](https://www.npmjs.org/package/cookiejar)\n[![devDependency Status](https://david-dm.org/bmeck/node-cookiejar/dev-status.svg)](https://david-dm.org/bmeck/node-cookiejar?type=dev)\n\nSimple robust cookie library\n\n## Exports\n\n### CookieAccessInfo(domain,path,secure,script)\n\nclass to determine matching qualities of a cookie\n\n##### Properties\n\n* String domain - domain to match\n* String path - path to match\n* Boolean secure - access is secure (ssl generally)\n* Boolean script - access is from a script\n\n\n### Cookie(cookiestr_or_cookie, request_domain, request_path)\n\nIt turns input into a Cookie (singleton if given a Cookie),\nthe `request_domain` argument is used to default the domain if it is not explicit in the cookie string,\nthe `request_path` argument is used to set the path if it is not explicit in a cookie String.\n\nExplicit domains/paths will cascade, implied domains/paths must *exactly* match (see http://en.wikipedia.org/wiki/HTTP_cookie#Domain_and_Pat).\n\n##### Properties\n\n* String name - name of the cookie\n* String value - string associated with the cookie\n* String domain - domain to match (on a cookie a '.' at the start means a wildcard matching anything ending in the rest)\n* Boolean explicit_domain - if the domain was explicitly set via the cookie string\n* String path - base path to match (matches any path starting with this '/' is root)\n* Boolean explicit_path - if the path was explicitly set via the cookie string\n* Boolean noscript - if it should be kept from scripts\n* Boolean secure - should it only be transmitted over secure means\n* Number expiration_date - number of millis since 1970 at which this should be removed\n\n##### Methods\n\n* `String toString()` - the __set-cookie:__ string for this cookie\n* `String toValueString()` - the __cookie:__ string for this cookie\n* `Cookie parse(cookiestr, request_domain, request_path)` - parses the string onto this cookie or a new one if called directly\n* `Boolean matches(access_info)` - returns true if the access_info allows retrieval of this cookie\n* `Boolean collidesWith(cookie)` - returns true if the cookies cannot exist in the same space (domain and path match)\n\n\n### CookieJar()\n\nclass to hold numerous cookies from multiple domains correctly\n\n##### Methods\n\n* `Cookie setCookie(cookie, request_domain, request_path)` - modify (or add if not already-existing) a cookie to the jar\n* `Cookie[] setCookies(cookiestr_or_list, request_domain, request_path)` - modify (or add if not already-existing) a large number of cookies to the jar\n* `Cookie getCookie(cookie_name,access_info)` - get a cookie with the name and access_info matching\n* `Cookie[] getCookies(access_info)` - grab all cookies matching this access_info\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/bmeck/node-cookiejar/issues" - }, - "homepage": "https://github.com/bmeck/node-cookiejar#readme", - "_id": "cookiejar@2.1.2", - "_requested": { - "type": "version", - "registry": true, - "raw": "cookiejar@2.1.2", - "name": "cookiejar", - "escapedName": "cookiejar", - "rawSpec": "2.1.2", - "saveSpec": "[Circular]", - "fetchSpec": "2.1.2" - }, - "_spec": "2.1.2", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "cookiejar@2.1.2", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/cookiejar", - "error": "[Circular]", - "extraneous": false - }, - "debug": { - "name": "debug", - "version": "3.1.0", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" - }, - "description": "small debugging utility", - "keywords": [ - "debug", - "log", - "debugger" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "contributors": [ - { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io" - }, - { - "name": "Andrew Rhyne", - "email": "rhyneandrew@gmail.com" - } - ], - "license": "MIT", - "dependencies": { - "ms": { - "name": "ms", - "version": "2.0.0", - "description": "Tiny milisecond conversion utility", - "repository": { - "type": "git", - "url": "git+https://github.com/zeit/ms.git" - }, - "main": "./index", - "files": [ - "index.js" - ], - "scripts": { - "precommit": "lint-staged", - "lint": "eslint lib/* bin/*", - "test": "mocha tests.js" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true, - "es6": true - } - }, - "lint-staged": { - "*.js": [ - "npm run lint", - "prettier --single-quote --write", - "git add" - ] - }, - "license": "MIT", - "devDependencies": { - "eslint": "3.19.0", - "expect.js": "0.3.1", - "husky": "0.13.3", - "lint-staged": "3.4.1", - "mocha": "3.4.1" - }, - "_resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "_integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "_from": "ms@2.0.0", - "readme": "# ms\n\n[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)\n[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/)\n\nUse this package to easily convert various time formats to milliseconds.\n\n## Examples\n\n```js\nms('2 days') // 172800000\nms('1d') // 86400000\nms('10h') // 36000000\nms('2.5 hrs') // 9000000\nms('2h') // 7200000\nms('1m') // 60000\nms('5s') // 5000\nms('1y') // 31557600000\nms('100') // 100\n```\n\n### Convert from milliseconds\n\n```js\nms(60000) // \"1m\"\nms(2 * 60000) // \"2m\"\nms(ms('10 hours')) // \"10h\"\n```\n\n### Time format written-out\n\n```js\nms(60000, { long: true }) // \"1 minute\"\nms(2 * 60000, { long: true }) // \"2 minutes\"\nms(ms('10 hours'), { long: true }) // \"10 hours\"\n```\n\n## Features\n\n- Works both in [node](https://nodejs.org) and in the browser.\n- If a number is supplied to `ms`, a string with a unit is returned.\n- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`).\n- If you pass a string with a number and a valid unit, the number of equivalent ms is returned.\n\n## Caught a bug?\n\n1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device\n2. Link the package to the global module directory: `npm link`\n3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms!\n\nAs always, you can run the tests using: `npm test`\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/zeit/ms/issues" - }, - "homepage": "https://github.com/zeit/ms#readme", - "_id": "ms@2.0.0", - "_requested": { - "type": "version", - "registry": true, - "raw": "ms@2.0.0", - "name": "ms", - "escapedName": "ms", - "rawSpec": "2.0.0", - "saveSpec": "[Circular]", - "fetchSpec": "2.0.0" - }, - "_spec": "2.0.0", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "ms@2.0.0", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/ms", - "error": "[Circular]", - "extraneous": false - } - }, - "devDependencies": { - "browserify": "14.4.0", - "chai": "^3.5.0", - "concurrently": "^3.1.0", - "coveralls": "^2.11.15", - "eslint": "^3.12.1", - "istanbul": "^0.4.5", - "karma": "^1.3.0", - "karma-chai": "^0.1.0", - "karma-mocha": "^1.3.0", - "karma-phantomjs-launcher": "^1.0.2", - "karma-sinon": "^1.0.5", - "mocha": "^3.2.0", - "mocha-lcov-reporter": "^1.2.0", - "rimraf": "^2.5.4", - "sinon": "^1.17.6", - "sinon-chai": "^2.8.0" - }, - "main": "./src/index.js", - "browser": "./src/browser.js", - "_resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "_integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "_from": "debug@3.1.0", - "readme": "# debug\n[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)\n[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)\n\n\n\nA tiny JavaScript debugging utility modelled after Node.js core's debugging\ntechnique. Works in Node.js and web browsers.\n\n## Installation\n\n```bash\n$ npm install debug\n```\n\n## Usage\n\n`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.\n\nExample [_app.js_](./examples/node/app.js):\n\n```js\nvar debug = require('debug')('http')\n , http = require('http')\n , name = 'My App';\n\n// fake app\n\ndebug('booting %o', name);\n\nhttp.createServer(function(req, res){\n debug(req.method + ' ' + req.url);\n res.end('hello\\n');\n}).listen(3000, function(){\n debug('listening');\n});\n\n// fake worker of some kind\n\nrequire('./worker');\n```\n\nExample [_worker.js_](./examples/node/worker.js):\n\n```js\nvar a = require('debug')('worker:a')\n , b = require('debug')('worker:b');\n\nfunction work() {\n a('doing lots of uninteresting work');\n setTimeout(work, Math.random() * 1000);\n}\n\nwork();\n\nfunction workb() {\n b('doing some work');\n setTimeout(workb, Math.random() * 2000);\n}\n\nworkb();\n```\n\nThe `DEBUG` environment variable is then used to enable these based on space or\ncomma-delimited names.\n\nHere are some examples:\n\n\"screen\n\"screen\n\"screen\n\n#### Windows note\n\nOn Windows the environment variable is set using the `set` command.\n\n```cmd\nset DEBUG=*,-not_this\n```\n\nNote that PowerShell uses different syntax to set environment variables.\n\n```cmd\n$env:DEBUG = \"*,-not_this\"\n```\n\nThen, run the program to be debugged as usual.\n\n\n## Namespace Colors\n\nEvery debug instance has a color generated for it based on its namespace name.\nThis helps when visually parsing the debug output to identify which debug instance\na debug line belongs to.\n\n#### Node.js\n\nIn Node.js, colors are enabled when stderr is a TTY. You also _should_ install\nthe [`supports-color`](https://npmjs.org/supports-color) module alongside debug,\notherwise debug will only use a small handful of basic colors.\n\n\n\n#### Web Browser\n\nColors are also enabled on \"Web Inspectors\" that understand the `%c` formatting\noption. These are WebKit web inspectors, Firefox ([since version\n31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))\nand the Firebug plugin for Firefox (any version).\n\n\n\n\n## Millisecond diff\n\nWhen actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the \"+NNNms\" will show you how much time was spent between calls.\n\n\n\nWhen stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:\n\n\n\n\n## Conventions\n\nIf you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use \":\" to separate features. For example \"bodyParser\" from Connect would then be \"connect:bodyParser\". If you append a \"*\" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.\n\n## Wildcards\n\nThe `*` character may be used as a wildcard. Suppose for example your library has\ndebuggers named \"connect:bodyParser\", \"connect:compress\", \"connect:session\",\ninstead of listing all three with\n`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do\n`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.\n\nYou can also exclude specific debuggers by prefixing them with a \"-\" character.\nFor example, `DEBUG=*,-connect:*` would include all debuggers except those\nstarting with \"connect:\".\n\n## Environment Variables\n\nWhen running through Node.js, you can set a few environment variables that will\nchange the behavior of the debug logging:\n\n| Name | Purpose |\n|-----------|-------------------------------------------------|\n| `DEBUG` | Enables/disables specific debugging namespaces. |\n| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |\n| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |\n| `DEBUG_DEPTH` | Object inspection depth. |\n| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |\n\n\n__Note:__ The environment variables beginning with `DEBUG_` end up being\nconverted into an Options object that gets used with `%o`/`%O` formatters.\nSee the Node.js documentation for\n[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)\nfor the complete list.\n\n## Formatters\n\nDebug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.\nBelow are the officially supported formatters:\n\n| Formatter | Representation |\n|-----------|----------------|\n| `%O` | Pretty-print an Object on multiple lines. |\n| `%o` | Pretty-print an Object all on a single line. |\n| `%s` | String. |\n| `%d` | Number (both integer and float). |\n| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |\n| `%%` | Single percent sign ('%'). This does not consume an argument. |\n\n\n### Custom formatters\n\nYou can add custom formatters by extending the `debug.formatters` object.\nFor example, if you wanted to add support for rendering a Buffer as hex with\n`%h`, you could do something like:\n\n```js\nconst createDebug = require('debug')\ncreateDebug.formatters.h = (v) => {\n return v.toString('hex')\n}\n\n// …elsewhere\nconst debug = createDebug('foo')\ndebug('this is hex: %h', new Buffer('hello world'))\n// foo this is hex: 68656c6c6f20776f726c6421 +0ms\n```\n\n\n## Browser Support\n\nYou can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),\nor just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),\nif you don't want to build it yourself.\n\nDebug's enable state is currently persisted by `localStorage`.\nConsider the situation shown below where you have `worker:a` and `worker:b`,\nand wish to debug both. You can enable this using `localStorage.debug`:\n\n```js\nlocalStorage.debug = 'worker:*'\n```\n\nAnd then refresh the page.\n\n```js\na = debug('worker:a');\nb = debug('worker:b');\n\nsetInterval(function(){\n a('doing some work');\n}, 1000);\n\nsetInterval(function(){\n b('doing some work');\n}, 1200);\n```\n\n\n## Output streams\n\n By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:\n\nExample [_stdout.js_](./examples/node/stdout.js):\n\n```js\nvar debug = require('debug');\nvar error = debug('app:error');\n\n// by default stderr is used\nerror('goes to stderr!');\n\nvar log = debug('app:log');\n// set this namespace to log via console.log\nlog.log = console.log.bind(console); // don't forget to bind to console!\nlog('goes to stdout');\nerror('still goes to stderr!');\n\n// set all output to go via console.info\n// overrides all per-namespace log settings\ndebug.log = console.info.bind(console);\nerror('now goes to stdout via console.info');\nlog('still goes to stdout, but via console.info now');\n```\n\n## Checking whether a debug target is enabled\n\nAfter you've created a debug instance, you can determine whether or not it is\nenabled by checking the `enabled` property:\n\n```javascript\nconst debug = require('debug')('http');\n\nif (debug.enabled) {\n // do stuff...\n}\n```\n\nYou can also manually toggle this property to force the debug instance to be\nenabled or disabled.\n\n\n## Authors\n\n - TJ Holowaychuk\n - Nathan Rajlich\n - Andrew Rhyne\n\n## Backers\n\nSupport us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Sponsors\n\nBecome a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/visionmedia/debug/issues" - }, - "homepage": "https://github.com/visionmedia/debug#readme", - "_id": "debug@3.1.0", - "_requested": { - "type": "version", - "registry": true, - "raw": "debug@3.1.0", - "name": "debug", - "escapedName": "debug", - "rawSpec": "3.1.0", - "saveSpec": "[Circular]", - "fetchSpec": "3.1.0" - }, - "_spec": "3.1.0", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "debug@3.1.0", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": { - "ms": "2.0.0" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/debug", - "error": "[Circular]", - "extraneous": false - }, - "extend": { - "name": "extend", - "author": { - "name": "Stefan Thomas", - "email": "justmoon@members.fsf.org", - "url": "http://www.justmoon.net" - }, - "version": "3.0.2", - "description": "Port of jQuery.extend for node.js and the browser", - "main": "index", - "scripts": { - "pretest": "npm run lint", - "test": "npm run tests-only", - "posttest": "npm run coverage-quiet", - "tests-only": "node test", - "coverage": "covert test/index.js", - "coverage-quiet": "covert test/index.js --quiet", - "lint": "npm run jscs && npm run eslint", - "jscs": "jscs *.js */*.js", - "eslint": "eslint *.js */*.js" - }, - "contributors": [ - { - "name": "Jordan Harband", - "url": "https://github.com/ljharb" - } - ], - "keywords": [ - "extend", - "clone", - "merge" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/justmoon/node-extend.git" - }, - "dependencies": {}, - "devDependencies": { - "@ljharb/eslint-config": "^12.2.1", - "covert": "^1.1.0", - "eslint": "^4.19.1", - "jscs": "^3.0.7", - "tape": "^4.9.1" - }, - "license": "MIT", - "_resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "_integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "_from": "extend@3.0.2", - "readme": "[![Build Status][travis-svg]][travis-url]\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n\n# extend() for Node.js [![Version Badge][npm-version-png]][npm-url]\n\n`node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true.\n\nNotes:\n\n* Since Node.js >= 4,\n [`Object.assign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\n now offers the same functionality natively (but without the \"deep copy\" option).\n See [ECMAScript 2015 (ES6) in Node.js](https://nodejs.org/en/docs/es6).\n* Some native implementations of `Object.assign` in both Node.js and many\n browsers (since NPM modules are for the browser too) may not be fully\n spec-compliant.\n Check [`object.assign`](https://www.npmjs.com/package/object.assign) module for\n a compliant candidate.\n\n## Installation\n\nThis package is available on [npm][npm-url] as: `extend`\n\n``` sh\nnpm install extend\n```\n\n## Usage\n\n**Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)**\n\n*Extend one object with one or more others, returning the modified object.*\n\n**Example:**\n\n``` js\nvar extend = require('extend');\nextend(targetObject, object1, object2);\n```\n\nKeep in mind that the target object will be modified, and will be returned from extend().\n\nIf a boolean true is specified as the first argument, extend performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s).\nUndefined properties are not copied. However, properties inherited from the object's prototype will be copied over.\nWarning: passing `false` as the first argument is not supported.\n\n### Arguments\n\n* `deep` *Boolean* (optional)\nIf set, the merge becomes recursive (i.e. deep copy).\n* `target`\t*Object*\nThe object to extend.\n* `object1`\t*Object*\nThe object that will be merged into the first.\n* `objectN` *Object* (Optional)\nMore objects to merge into the first.\n\n## License\n\n`node-extend` is licensed under the [MIT License][mit-license-url].\n\n## Acknowledgements\n\nAll credit to the jQuery authors for perfecting this amazing utility.\n\nPorted to Node.js by [Stefan Thomas][github-justmoon] with contributions by [Jonathan Buchanan][github-insin] and [Jordan Harband][github-ljharb].\n\n[travis-svg]: https://travis-ci.org/justmoon/node-extend.svg\n[travis-url]: https://travis-ci.org/justmoon/node-extend\n[npm-url]: https://npmjs.org/package/extend\n[mit-license-url]: http://opensource.org/licenses/MIT\n[github-justmoon]: https://github.com/justmoon\n[github-insin]: https://github.com/insin\n[github-ljharb]: https://github.com/ljharb\n[npm-version-png]: http://versionbadg.es/justmoon/node-extend.svg\n[deps-svg]: https://david-dm.org/justmoon/node-extend.svg\n[deps-url]: https://david-dm.org/justmoon/node-extend\n[dev-deps-svg]: https://david-dm.org/justmoon/node-extend/dev-status.svg\n[dev-deps-url]: https://david-dm.org/justmoon/node-extend#info=devDependencies\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/justmoon/node-extend/issues" - }, - "homepage": "https://github.com/justmoon/node-extend#readme", - "_id": "extend@3.0.2", - "_requested": { - "type": "version", - "registry": true, - "raw": "extend@3.0.2", - "name": "extend", - "escapedName": "extend", - "rawSpec": "3.0.2", - "saveSpec": "[Circular]", - "fetchSpec": "3.0.2" - }, - "_spec": "3.0.2", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "extend@3.0.2", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/extend", - "error": "[Circular]", - "extraneous": false - }, - "form-data": { - "author": { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com", - "url": "http://debuggable.com/" - }, - "name": "form-data", - "description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.", - "version": "2.3.2", - "repository": { - "type": "git", - "url": "git://github.com/form-data/form-data.git" - }, - "main": "./lib/form_data", - "browser": "./lib/browser", - "scripts": { - "pretest": "rimraf coverage test/tmp", - "test": "istanbul cover test/run.js", - "posttest": "istanbul report lcov text", - "lint": "eslint lib/*.js test/*.js test/integration/*.js", - "report": "istanbul report lcov text", - "ci-lint": "is-node-modern 6 && npm run lint || is-node-not-modern 6", - "ci-test": "npm run test && npm run browser && npm run report", - "predebug": "rimraf coverage test/tmp", - "debug": "verbose=1 ./test/run.js", - "browser": "browserify -t browserify-istanbul test/run-browser.js | obake --coverage", - "check": "istanbul check-coverage coverage/coverage*.json", - "files": "pkgfiles --sort=name", - "get-version": "node -e \"console.log(require('./package.json').version)\"", - "update-readme": "sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md", - "restore-readme": "mv README.md.bak README.md", - "prepublish": "in-publish && npm run update-readme || not-in-publish", - "postpublish": "npm run restore-readme" - }, - "pre-commit": [ - "lint", - "ci-test", - "check" - ], - "engines": { - "node": ">= 0.12" - }, - "dependencies": { - "asynckit": { - "name": "asynckit", - "version": "0.4.0", - "description": "Minimal async jobs utility library, with streams support", - "main": "index.js", - "scripts": { - "clean": "rimraf coverage", - "lint": "eslint *.js lib/*.js test/*.js", - "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec", - "win-test": "tape test/test-*.js", - "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec", - "report": "istanbul report", - "size": "browserify index.js | size-table asynckit", - "debug": "tape test/test-*.js" - }, - "pre-commit": [ - "clean", - "lint", - "test", - "browser", - "report", - "size" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/alexindigo/asynckit.git" - }, - "keywords": [ - "async", - "jobs", - "parallel", - "serial", - "iterator", - "array", - "object", - "stream", - "destroy", - "terminate", - "abort" - ], - "author": { - "name": "Alex Indigo", - "email": "iam@alexindigo.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/alexindigo/asynckit/issues" - }, - "homepage": "https://github.com/alexindigo/asynckit#readme", - "devDependencies": { - "browserify": "^13.0.0", - "browserify-istanbul": "^2.0.0", - "coveralls": "^2.11.9", - "eslint": "^2.9.0", - "istanbul": "^0.4.3", - "obake": "^0.1.2", - "phantomjs-prebuilt": "^2.1.7", - "pre-commit": "^1.1.3", - "reamde": "^1.1.0", - "rimraf": "^2.5.2", - "size-table": "^0.2.0", - "tap-spec": "^4.1.1", - "tape": "^4.5.1" - }, - "dependencies": {}, - "_resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "_integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "_from": "asynckit@0.4.0", - "readme": "# asynckit [![NPM Module](https://img.shields.io/npm/v/asynckit.svg?style=flat)](https://www.npmjs.com/package/asynckit)\n\nMinimal async jobs utility library, with streams support.\n\n[![PhantomJS Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=browser&style=flat)](https://travis-ci.org/alexindigo/asynckit)\n[![Linux Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=linux:0.12-6.x&style=flat)](https://travis-ci.org/alexindigo/asynckit)\n[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/asynckit/v0.4.0.svg?label=windows:0.12-6.x&style=flat)](https://ci.appveyor.com/project/alexindigo/asynckit)\n\n[![Coverage Status](https://img.shields.io/coveralls/alexindigo/asynckit/v0.4.0.svg?label=code+coverage&style=flat)](https://coveralls.io/github/alexindigo/asynckit?branch=master)\n[![Dependency Status](https://img.shields.io/david/alexindigo/asynckit/v0.4.0.svg?style=flat)](https://david-dm.org/alexindigo/asynckit)\n[![bitHound Overall Score](https://www.bithound.io/github/alexindigo/asynckit/badges/score.svg)](https://www.bithound.io/github/alexindigo/asynckit)\n\n\n\nAsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects.\nOptionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method.\n\nIt ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators.\n\n| compression | size |\n| :----------------- | -------: |\n| asynckit.js | 12.34 kB |\n| asynckit.min.js | 4.11 kB |\n| asynckit.min.js.gz | 1.47 kB |\n\n\n## Install\n\n```sh\n$ npm install --save asynckit\n```\n\n## Examples\n\n### Parallel Jobs\n\nRuns iterator over provided array in parallel. Stores output in the `result` array,\non the matching positions. In unlikely event of an error from one of the jobs,\nwill terminate rest of the active jobs (if abort function is provided)\nand return error along with salvaged data to the main callback function.\n\n#### Input Array\n\n```javascript\nvar parallel = require('asynckit').parallel\n , assert = require('assert')\n ;\n\nvar source = [ 1, 1, 4, 16, 64, 32, 8, 2 ]\n , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]\n , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ]\n , target = []\n ;\n\nparallel(source, asyncJob, function(err, result)\n{\n assert.deepEqual(result, expectedResult);\n assert.deepEqual(target, expectedTarget);\n});\n\n// async job accepts one element from the array\n// and a callback function\nfunction asyncJob(item, cb)\n{\n // different delays (in ms) per item\n var delay = item * 25;\n\n // pretend different jobs take different time to finish\n // and not in consequential order\n var timeoutId = setTimeout(function() {\n target.push(item);\n cb(null, item * 2);\n }, delay);\n\n // allow to cancel \"leftover\" jobs upon error\n // return function, invoking of which will abort this job\n return clearTimeout.bind(null, timeoutId);\n}\n```\n\nMore examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js).\n\n#### Input Object\n\nAlso it supports named jobs, listed via object.\n\n```javascript\nvar parallel = require('asynckit/parallel')\n , assert = require('assert')\n ;\n\nvar source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 }\n , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 }\n , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ]\n , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ]\n , target = []\n , keys = []\n ;\n\nparallel(source, asyncJob, function(err, result)\n{\n assert.deepEqual(result, expectedResult);\n assert.deepEqual(target, expectedTarget);\n assert.deepEqual(keys, expectedKeys);\n});\n\n// supports full value, key, callback (shortcut) interface\nfunction asyncJob(item, key, cb)\n{\n // different delays (in ms) per item\n var delay = item * 25;\n\n // pretend different jobs take different time to finish\n // and not in consequential order\n var timeoutId = setTimeout(function() {\n keys.push(key);\n target.push(item);\n cb(null, item * 2);\n }, delay);\n\n // allow to cancel \"leftover\" jobs upon error\n // return function, invoking of which will abort this job\n return clearTimeout.bind(null, timeoutId);\n}\n```\n\nMore examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js).\n\n### Serial Jobs\n\nRuns iterator over provided array sequentially. Stores output in the `result` array,\non the matching positions. In unlikely event of an error from one of the jobs,\nwill not proceed to the rest of the items in the list\nand return error along with salvaged data to the main callback function.\n\n#### Input Array\n\n```javascript\nvar serial = require('asynckit/serial')\n , assert = require('assert')\n ;\n\nvar source = [ 1, 1, 4, 16, 64, 32, 8, 2 ]\n , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]\n , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ]\n , target = []\n ;\n\nserial(source, asyncJob, function(err, result)\n{\n assert.deepEqual(result, expectedResult);\n assert.deepEqual(target, expectedTarget);\n});\n\n// extended interface (item, key, callback)\n// also supported for arrays\nfunction asyncJob(item, key, cb)\n{\n target.push(key);\n\n // it will be automatically made async\n // even it iterator \"returns\" in the same event loop\n cb(null, item * 2);\n}\n```\n\nMore examples could be found in [test/test-serial-array.js](test/test-serial-array.js).\n\n#### Input Object\n\nAlso it supports named jobs, listed via object.\n\n```javascript\nvar serial = require('asynckit').serial\n , assert = require('assert')\n ;\n\nvar source = [ 1, 1, 4, 16, 64, 32, 8, 2 ]\n , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]\n , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ]\n , target = []\n ;\n\nvar source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 }\n , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 }\n , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ]\n , target = []\n ;\n\n\nserial(source, asyncJob, function(err, result)\n{\n assert.deepEqual(result, expectedResult);\n assert.deepEqual(target, expectedTarget);\n});\n\n// shortcut interface (item, callback)\n// works for object as well as for the arrays\nfunction asyncJob(item, cb)\n{\n target.push(item);\n\n // it will be automatically made async\n // even it iterator \"returns\" in the same event loop\n cb(null, item * 2);\n}\n```\n\nMore examples could be found in [test/test-serial-object.js](test/test-serial-object.js).\n\n_Note: Since _object_ is an _unordered_ collection of properties,\nit may produce unexpected results with sequential iterations.\nWhenever order of the jobs' execution is important please use `serialOrdered` method._\n\n### Ordered Serial Iterations\n\nTBD\n\nFor example [compare-property](compare-property) package.\n\n### Streaming interface\n\nTBD\n\n## Want to Know More?\n\nMore examples can be found in [test folder](test/).\n\nOr open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions.\n\n## License\n\nAsyncKit is licensed under the MIT license.\n", - "readmeFilename": "README.md", - "_id": "asynckit@0.4.0", - "_requested": { - "type": "version", - "registry": true, - "raw": "asynckit@0.4.0", - "name": "asynckit", - "escapedName": "asynckit", - "rawSpec": "0.4.0", - "saveSpec": "[Circular]", - "fetchSpec": "0.4.0" - }, - "_spec": "0.4.0", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "asynckit@0.4.0", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/asynckit", - "error": "[Circular]", - "extraneous": false - }, - "combined-stream": { - "author": { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com", - "url": "http://debuggable.com/" - }, - "name": "combined-stream", - "description": "A stream that emits multiple other streams one after another.", - "version": "1.0.6", - "homepage": "https://github.com/felixge/node-combined-stream", - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-combined-stream.git" - }, - "main": "./lib/combined_stream", - "scripts": { - "test": "node test/run.js" - }, - "engines": { - "node": ">= 0.8" - }, - "dependencies": { - "delayed-stream": { - "author": { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com", - "url": "http://debuggable.com/" - }, - "contributors": [ - { - "name": "Mike Atkins", - "email": "apeherder@gmail.com" - } - ], - "name": "delayed-stream", - "description": "Buffers events from a stream until you are ready to handle them.", - "license": "MIT", - "version": "1.0.0", - "homepage": "https://github.com/felixge/node-delayed-stream", - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-delayed-stream.git" - }, - "main": "./lib/delayed_stream", - "engines": { - "node": ">=0.4.0" - }, - "scripts": { - "test": "make test" - }, - "dependencies": {}, - "devDependencies": { - "fake": "0.2.0", - "far": "0.0.1" - }, - "_resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "_integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "_from": "delayed-stream@1.0.0", - "readme": "# delayed-stream\n\nBuffers events from a stream until you are ready to handle them.\n\n## Installation\n\n``` bash\nnpm install delayed-stream\n```\n\n## Usage\n\nThe following example shows how to write a http echo server that delays its\nresponse by 1000 ms.\n\n``` javascript\nvar DelayedStream = require('delayed-stream');\nvar http = require('http');\n\nhttp.createServer(function(req, res) {\n var delayed = DelayedStream.create(req);\n\n setTimeout(function() {\n res.writeHead(200);\n delayed.pipe(res);\n }, 1000);\n});\n```\n\nIf you are not using `Stream#pipe`, you can also manually release the buffered\nevents by calling `delayedStream.resume()`:\n\n``` javascript\nvar delayed = DelayedStream.create(req);\n\nsetTimeout(function() {\n // Emit all buffered events and resume underlaying source\n delayed.resume();\n}, 1000);\n```\n\n## Implementation\n\nIn order to use this meta stream properly, here are a few things you should\nknow about the implementation.\n\n### Event Buffering / Proxying\n\nAll events of the `source` stream are hijacked by overwriting the `source.emit`\nmethod. Until node implements a catch-all event listener, this is the only way.\n\nHowever, delayed-stream still continues to emit all events it captures on the\n`source`, regardless of whether you have released the delayed stream yet or\nnot.\n\nUpon creation, delayed-stream captures all `source` events and stores them in\nan internal event buffer. Once `delayedStream.release()` is called, all\nbuffered events are emitted on the `delayedStream`, and the event buffer is\ncleared. After that, delayed-stream merely acts as a proxy for the underlaying\nsource.\n\n### Error handling\n\nError events on `source` are buffered / proxied just like any other events.\nHowever, `delayedStream.create` attaches a no-op `'error'` listener to the\n`source`. This way you only have to handle errors on the `delayedStream`\nobject, rather than in two places.\n\n### Buffer limits\n\ndelayed-stream provides a `maxDataSize` property that can be used to limit\nthe amount of data being buffered. In order to protect you from bad `source`\nstreams that don't react to `source.pause()`, this feature is enabled by\ndefault.\n\n## API\n\n### DelayedStream.create(source, [options])\n\nReturns a new `delayedStream`. Available options are:\n\n* `pauseStream`\n* `maxDataSize`\n\nThe description for those properties can be found below.\n\n### delayedStream.source\n\nThe `source` stream managed by this object. This is useful if you are\npassing your `delayedStream` around, and you still want to access properties\non the `source` object.\n\n### delayedStream.pauseStream = true\n\nWhether to pause the underlaying `source` when calling\n`DelayedStream.create()`. Modifying this property afterwards has no effect.\n\n### delayedStream.maxDataSize = 1024 * 1024\n\nThe amount of data to buffer before emitting an `error`.\n\nIf the underlaying source is emitting `Buffer` objects, the `maxDataSize`\nrefers to bytes.\n\nIf the underlaying source is emitting JavaScript strings, the size refers to\ncharacters.\n\nIf you know what you are doing, you can set this property to `Infinity` to\ndisable this feature. You can also modify this property during runtime.\n\n### delayedStream.dataSize = 0\n\nThe amount of data buffered so far.\n\n### delayedStream.readable\n\nAn ECMA5 getter that returns the value of `source.readable`.\n\n### delayedStream.resume()\n\nIf the `delayedStream` has not been released so far, `delayedStream.release()`\nis called.\n\nIn either case, `source.resume()` is called.\n\n### delayedStream.pause()\n\nCalls `source.pause()`.\n\n### delayedStream.pipe(dest)\n\nCalls `delayedStream.resume()` and then proxies the arguments to `source.pipe`.\n\n### delayedStream.release()\n\nEmits and clears all events that have been buffered up so far. This does not\nresume the underlaying source, use `delayedStream.resume()` instead.\n\n## License\n\ndelayed-stream is licensed under the MIT license.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/felixge/node-delayed-stream/issues" - }, - "_id": "delayed-stream@1.0.0", - "_requested": { - "type": "version", - "registry": true, - "raw": "delayed-stream@1.0.0", - "name": "delayed-stream", - "escapedName": "delayed-stream", - "rawSpec": "1.0.0", - "saveSpec": "[Circular]", - "fetchSpec": "1.0.0" - }, - "_spec": "1.0.0", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "delayed-stream@1.0.0", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/delayed-stream", - "error": "[Circular]", - "extraneous": false - } - }, - "devDependencies": { - "far": "~0.0.7" - }, - "license": "MIT", - "_resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "_integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "_from": "combined-stream@1.0.6", - "readme": "# combined-stream\n\nA stream that emits multiple other streams one after another.\n\n**NB** Currently `combined-stream` works with streams version 1 only. There is ongoing effort to switch this library to streams version 2. Any help is welcome. :) Meanwhile you can explore other libraries that provide streams2 support with more or less compatibility with `combined-stream`.\n\n- [combined-stream2](https://www.npmjs.com/package/combined-stream2): A drop-in streams2-compatible replacement for the combined-stream module.\n\n- [multistream](https://www.npmjs.com/package/multistream): A stream that emits multiple other streams one after another.\n\n## Installation\n\n``` bash\nnpm install combined-stream\n```\n\n## Usage\n\nHere is a simple example that shows how you can use combined-stream to combine\ntwo files into one:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create();\ncombinedStream.append(fs.createReadStream('file1.txt'));\ncombinedStream.append(fs.createReadStream('file2.txt'));\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\nWhile the example above works great, it will pause all source streams until\nthey are needed. If you don't want that to happen, you can set `pauseStreams`\nto `false`:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create({pauseStreams: false});\ncombinedStream.append(fs.createReadStream('file1.txt'));\ncombinedStream.append(fs.createReadStream('file2.txt'));\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\nHowever, what if you don't have all the source streams yet, or you don't want\nto allocate the resources (file descriptors, memory, etc.) for them right away?\nWell, in that case you can simply provide a callback that supplies the stream\nby calling a `next()` function:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create();\ncombinedStream.append(function(next) {\n next(fs.createReadStream('file1.txt'));\n});\ncombinedStream.append(function(next) {\n next(fs.createReadStream('file2.txt'));\n});\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\n## API\n\n### CombinedStream.create([options])\n\nReturns a new combined stream object. Available options are:\n\n* `maxDataSize`\n* `pauseStreams`\n\nThe effect of those options is described below.\n\n### combinedStream.pauseStreams = `true`\n\nWhether to apply back pressure to the underlaying streams. If set to `false`,\nthe underlaying streams will never be paused. If set to `true`, the\nunderlaying streams will be paused right after being appended, as well as when\n`delayedStream.pipe()` wants to throttle.\n\n### combinedStream.maxDataSize = `2 * 1024 * 1024`\n\nThe maximum amount of bytes (or characters) to buffer for all source streams.\nIf this value is exceeded, `combinedStream` emits an `'error'` event.\n\n### combinedStream.dataSize = `0`\n\nThe amount of bytes (or characters) currently buffered by `combinedStream`.\n\n### combinedStream.append(stream)\n\nAppends the given `stream` to the combinedStream object. If `pauseStreams` is\nset to `true, this stream will also be paused right away.\n\n`streams` can also be a function that takes one parameter called `next`. `next`\nis a function that must be invoked in order to provide the `next` stream, see\nexample above.\n\nRegardless of how the `stream` is appended, combined-stream always attaches an\n`'error'` listener to it, so you don't have to do that manually.\n\nSpecial case: `stream` can also be a String or Buffer.\n\n### combinedStream.write(data)\n\nYou should not call this, `combinedStream` takes care of piping the appended\nstreams into itself for you.\n\n### combinedStream.resume()\n\nCauses `combinedStream` to start drain the streams it manages. The function is\nidempotent, and also emits a `'resume'` event each time which usually goes to\nthe stream that is currently being drained.\n\n### combinedStream.pause();\n\nIf `combinedStream.pauseStreams` is set to `false`, this does nothing.\nOtherwise a `'pause'` event is emitted, this goes to the stream that is\ncurrently being drained, so you can use it to apply back pressure.\n\n### combinedStream.end();\n\nSets `combinedStream.writable` to false, emits an `'end'` event, and removes\nall streams from the queue.\n\n### combinedStream.destroy();\n\nSame as `combinedStream.end()`, except it emits a `'close'` event instead of\n`'end'`.\n\n## License\n\ncombined-stream is licensed under the MIT license.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/felixge/node-combined-stream/issues" - }, - "_id": "combined-stream@1.0.6", - "_requested": { - "type": "version", - "registry": true, - "raw": "combined-stream@1.0.6", - "name": "combined-stream", - "escapedName": "combined-stream", - "rawSpec": "1.0.6", - "saveSpec": "[Circular]", - "fetchSpec": "1.0.6" - }, - "_spec": "1.0.6", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "combined-stream@1.0.6", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": { - "delayed-stream": "~1.0.0" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/combined-stream", - "error": "[Circular]", - "extraneous": false - }, - "mime-types": { - "name": "mime-types", - "description": "The ultimate javascript content-type utility.", - "version": "2.1.19", - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "Jeremiah Senkpiel", - "email": "fishrock123@rocketmail.com", - "url": "https://searchbeam.jit.su" - }, - { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - } - ], - "license": "MIT", - "keywords": [ - "mime", - "types" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/jshttp/mime-types.git" - }, - "dependencies": { - "mime-db": { - "name": "mime-db", - "description": "Media Type Database", - "version": "1.35.0", - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - }, - { - "name": "Robert Kieffer", - "email": "robert@broofa.com", - "url": "http://github.com/broofa" - } - ], - "license": "MIT", - "keywords": [ - "mime", - "db", - "type", - "types", - "database", - "charset", - "charsets" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/jshttp/mime-db.git" - }, - "devDependencies": { - "bluebird": "3.5.1", - "co": "4.6.0", - "cogent": "1.0.1", - "csv-parse": "2.5.0", - "eslint": "4.19.1", - "eslint-config-standard": "11.0.0", - "eslint-plugin-import": "2.13.0", - "eslint-plugin-node": "6.0.1", - "eslint-plugin-promise": "3.8.0", - "eslint-plugin-standard": "3.1.0", - "gnode": "0.1.2", - "mocha": "1.21.5", - "nyc": "11.8.0", - "raw-body": "2.3.3", - "stream-to-array": "2.3.0" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "README.md", - "db.json", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "build": "node scripts/build", - "fetch": "node scripts/fetch-apache && gnode scripts/fetch-iana && node scripts/fetch-nginx", - "lint": "eslint .", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "test-travis": "nyc --reporter=text npm test", - "update": "npm run fetch && npm run build" - }, - "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", - "_integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==", - "_from": "mime-db@1.35.0", - "readme": "# mime-db\n\n[![NPM Version][npm-version-image]][npm-url]\n[![NPM Downloads][npm-downloads-image]][npm-url]\n[![Node.js Version][node-image]][node-url]\n[![Build Status][travis-image]][travis-url]\n[![Coverage Status][coveralls-image]][coveralls-url]\n\nThis is a database of all mime types.\nIt consists of a single, public JSON file and does not include any logic,\nallowing it to remain as un-opinionated as possible with an API.\nIt aggregates data from the following sources:\n\n- http://www.iana.org/assignments/media-types/media-types.xhtml\n- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types\n- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types\n\n## Installation\n\n```bash\nnpm install mime-db\n```\n\n### Database Download\n\nIf you're crazy enough to use this in the browser, you can just grab the\nJSON file using [RawGit](https://rawgit.com/). It is recommended to replace\n`master` with [a release tag](https://github.com/jshttp/mime-db/tags) as the\nJSON format may change in the future.\n\n```\nhttps://cdn.rawgit.com/jshttp/mime-db/master/db.json\n```\n\n## Usage\n\n```js\nvar db = require('mime-db');\n\n// grab data on .js files\nvar data = db['application/javascript'];\n```\n\n## Data Structure\n\nThe JSON file is a map lookup for lowercased mime types.\nEach mime type has the following properties:\n\n- `.source` - where the mime type is defined.\n If not set, it's probably a custom media type.\n - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types)\n - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml)\n - `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types)\n- `.extensions[]` - known extensions associated with this mime type.\n- `.compressible` - whether a file of this type can be gzipped.\n- `.charset` - the default charset associated with this type, if any.\n\nIf unknown, every property could be `undefined`.\n\n## Contributing\n\nTo edit the database, only make PRs against `src/custom.json` or\n`src/custom-suffix.json`.\n\nThe `src/custom.json` file is a JSON object with the MIME type as the keys\nand the values being an object with the following keys:\n\n- `compressible` - leave out if you don't know, otherwise `true`/`false` to\n indicate whether the data represented by the type is typically compressible.\n- `extensions` - include an array of file extensions that are associated with\n the type.\n- `notes` - human-readable notes about the type, typically what the type is.\n- `sources` - include an array of URLs of where the MIME type and the associated\n extensions are sourced from. This needs to be a [primary source](https://en.wikipedia.org/wiki/Primary_source);\n links to type aggregating sites and Wikipedia are _not acceptable_.\n\nTo update the build, run `npm run build`.\n\n## Adding Custom Media Types\n\nThe best way to get new media types included in this library is to register\nthem with the IANA. The community registration procedure is outlined in\n[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types\nregistered with the IANA are automatically pulled into this library.\n\n[npm-version-image]: https://img.shields.io/npm/v/mime-db.svg\n[npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg\n[npm-url]: https://npmjs.org/package/mime-db\n[travis-image]: https://img.shields.io/travis/jshttp/mime-db/master.svg\n[travis-url]: https://travis-ci.org/jshttp/mime-db\n[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-db/master.svg\n[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master\n[node-image]: https://img.shields.io/node/v/mime-db.svg\n[node-url]: https://nodejs.org/en/download/\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/jshttp/mime-db/issues" - }, - "homepage": "https://github.com/jshttp/mime-db#readme", - "_id": "mime-db@1.35.0", - "_requested": { - "type": "version", - "registry": true, - "raw": "mime-db@1.35.0", - "name": "mime-db", - "escapedName": "mime-db", - "rawSpec": "1.35.0", - "saveSpec": "[Circular]", - "fetchSpec": "1.35.0" - }, - "_spec": "1.35.0", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "mime-db@1.35.0", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/mime-db", - "error": "[Circular]", - "extraneous": false - } - }, - "devDependencies": { - "eslint": "4.19.1", - "eslint-config-standard": "11.0.0", - "eslint-plugin-import": "2.13.0", - "eslint-plugin-node": "6.0.1", - "eslint-plugin-promise": "3.8.0", - "eslint-plugin-standard": "3.1.0", - "istanbul": "0.4.5", - "mocha": "1.21.5" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec test/test.js", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js" - }, - "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz", - "_integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", - "_from": "mime-types@2.1.19", - "readme": "# mime-types\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Node.js Version][node-version-image]][node-version-url]\n[![Build Status][travis-image]][travis-url]\n[![Test Coverage][coveralls-image]][coveralls-url]\n\nThe ultimate javascript content-type utility.\n\nSimilar to [the `mime@1.x` module](https://www.npmjs.com/package/mime), except:\n\n- __No fallbacks.__ Instead of naively returning the first available type,\n `mime-types` simply returns `false`, so do\n `var type = mime.lookup('unrecognized') || 'application/octet-stream'`.\n- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`.\n- No `.define()` functionality\n- Bug fixes for `.lookup(path)`\n\nOtherwise, the API is compatible with `mime` 1.x.\n\n## Install\n\nThis is a [Node.js](https://nodejs.org/en/) module available through the\n[npm registry](https://www.npmjs.com/). Installation is done using the\n[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):\n\n```sh\n$ npm install mime-types\n```\n\n## Adding Types\n\nAll mime types are based on [mime-db](https://www.npmjs.com/package/mime-db),\nso open a PR there if you'd like to add mime types.\n\n## API\n\n```js\nvar mime = require('mime-types')\n```\n\nAll functions return `false` if input is invalid or not found.\n\n### mime.lookup(path)\n\nLookup the content-type associated with a file.\n\n```js\nmime.lookup('json') // 'application/json'\nmime.lookup('.md') // 'text/markdown'\nmime.lookup('file.html') // 'text/html'\nmime.lookup('folder/file.js') // 'application/javascript'\nmime.lookup('folder/.htaccess') // false\n\nmime.lookup('cats') // false\n```\n\n### mime.contentType(type)\n\nCreate a full content-type header given a content-type or extension.\n\n```js\nmime.contentType('markdown') // 'text/x-markdown; charset=utf-8'\nmime.contentType('file.json') // 'application/json; charset=utf-8'\n\n// from a full path\nmime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8'\n```\n\n### mime.extension(type)\n\nGet the default extension for a content-type.\n\n```js\nmime.extension('application/octet-stream') // 'bin'\n```\n\n### mime.charset(type)\n\nLookup the implied default charset of a content-type.\n\n```js\nmime.charset('text/markdown') // 'UTF-8'\n```\n\n### var type = mime.types[extension]\n\nA map of content-types by extension.\n\n### [extensions...] = mime.extensions[type]\n\nA map of extensions by content-type.\n\n## License\n\n[MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/mime-types.svg\n[npm-url]: https://npmjs.org/package/mime-types\n[node-version-image]: https://img.shields.io/node/v/mime-types.svg\n[node-version-url]: https://nodejs.org/en/download/\n[travis-image]: https://img.shields.io/travis/jshttp/mime-types/master.svg\n[travis-url]: https://travis-ci.org/jshttp/mime-types\n[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types/master.svg\n[coveralls-url]: https://coveralls.io/r/jshttp/mime-types\n[downloads-image]: https://img.shields.io/npm/dm/mime-types.svg\n[downloads-url]: https://npmjs.org/package/mime-types\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/jshttp/mime-types/issues" - }, - "homepage": "https://github.com/jshttp/mime-types#readme", - "_id": "mime-types@2.1.19", - "_requested": { - "type": "version", - "registry": true, - "raw": "mime-types@2.1.19", - "name": "mime-types", - "escapedName": "mime-types", - "rawSpec": "2.1.19", - "saveSpec": "[Circular]", - "fetchSpec": "2.1.19" - }, - "_spec": "2.1.19", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "mime-types@2.1.19", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": { - "mime-db": "~1.35.0" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/mime-types", - "error": "[Circular]", - "extraneous": false - } - }, - "devDependencies": { - "browserify": "^13.1.1", - "browserify-istanbul": "^2.0.0", - "coveralls": "^2.11.14", - "cross-spawn": "^4.0.2", - "eslint": "^3.9.1", - "fake": "^0.2.2", - "far": "^0.0.7", - "formidable": "^1.0.17", - "in-publish": "^2.0.0", - "is-node-modern": "^1.0.0", - "istanbul": "^0.4.5", - "obake": "^0.1.2", - "phantomjs-prebuilt": "^2.1.13", - "pkgfiles": "^2.3.0", - "pre-commit": "^1.1.3", - "request": "2.76.0", - "rimraf": "^2.5.4", - "tape": "^4.6.2" - }, - "license": "MIT", - "_resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "_integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "_from": "form-data@2.3.2", - "readme": "# Form-Data [![NPM Module](https://img.shields.io/npm/v/form-data.svg)](https://www.npmjs.com/package/form-data) [![Join the chat at https://gitter.im/form-data/form-data](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/form-data/form-data)\n\nA library to create readable ```\"multipart/form-data\"``` streams. Can be used to submit forms and file uploads to other web applications.\n\nThe API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd].\n\n[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface\n\n[![Linux Build](https://img.shields.io/travis/form-data/form-data/v2.3.2.svg?label=linux:4.x-9.x)](https://travis-ci.org/form-data/form-data)\n[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v2.3.2.svg?label=macos:4.x-9.x)](https://travis-ci.org/form-data/form-data)\n[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/v2.3.2.svg?label=windows:4.x-9.x)](https://ci.appveyor.com/project/alexindigo/form-data)\n\n[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v2.3.2.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master)\n[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data)\n[![bitHound Overall Score](https://www.bithound.io/github/form-data/form-data/badges/score.svg)](https://www.bithound.io/github/form-data/form-data)\n\n## Install\n\n```\nnpm install --save form-data\n```\n\n## Usage\n\nIn this example we are constructing a form with 3 fields that contain a string,\na buffer and a file stream.\n\n``` javascript\nvar FormData = require('form-data');\nvar fs = require('fs');\n\nvar form = new FormData();\nform.append('my_field', 'my value');\nform.append('my_buffer', new Buffer(10));\nform.append('my_file', fs.createReadStream('/foo/bar.jpg'));\n```\n\nAlso you can use http-response stream:\n\n``` javascript\nvar FormData = require('form-data');\nvar http = require('http');\n\nvar form = new FormData();\n\nhttp.request('http://nodejs.org/images/logo.png', function(response) {\n form.append('my_field', 'my value');\n form.append('my_buffer', new Buffer(10));\n form.append('my_logo', response);\n});\n```\n\nOr @mikeal's [request](https://github.com/request/request) stream:\n\n``` javascript\nvar FormData = require('form-data');\nvar request = require('request');\n\nvar form = new FormData();\n\nform.append('my_field', 'my value');\nform.append('my_buffer', new Buffer(10));\nform.append('my_logo', request('http://nodejs.org/images/logo.png'));\n```\n\nIn order to submit this form to a web application, call ```submit(url, [callback])``` method:\n\n``` javascript\nform.submit('http://example.org/', function(err, res) {\n // res – response object (http.IncomingMessage) //\n res.resume();\n});\n\n```\n\nFor more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods.\n\n### Custom options\n\nYou can provide custom options, such as `maxDataSize`:\n\n``` javascript\nvar FormData = require('form-data');\n\nvar form = new FormData({ maxDataSize: 20971520 });\nform.append('my_field', 'my value');\nform.append('my_buffer', /* something big */);\n```\n\nList of available options could be found in [combined-stream](https://github.com/felixge/node-combined-stream/blob/master/lib/combined_stream.js#L7-L15)\n\n### Alternative submission methods\n\nYou can use node's http client interface:\n\n``` javascript\nvar http = require('http');\n\nvar request = http.request({\n method: 'post',\n host: 'example.org',\n path: '/upload',\n headers: form.getHeaders()\n});\n\nform.pipe(request);\n\nrequest.on('response', function(res) {\n console.log(res.statusCode);\n});\n```\n\nOr if you would prefer the `'Content-Length'` header to be set for you:\n\n``` javascript\nform.submit('example.org/upload', function(err, res) {\n console.log(res.statusCode);\n});\n```\n\nTo use custom headers and pre-known length in parts:\n\n``` javascript\nvar CRLF = '\\r\\n';\nvar form = new FormData();\n\nvar options = {\n header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF,\n knownLength: 1\n};\n\nform.append('my_buffer', buffer, options);\n\nform.submit('http://example.com/', function(err, res) {\n if (err) throw err;\n console.log('Done');\n});\n```\n\nForm-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide \"file\"-related information manually:\n\n``` javascript\nsomeModule.stream(function(err, stdout, stderr) {\n if (err) throw err;\n\n var form = new FormData();\n\n form.append('file', stdout, {\n filename: 'unicycle.jpg', // ... or:\n filepath: 'photos/toys/unicycle.jpg',\n contentType: 'image/jpeg',\n knownLength: 19806\n });\n\n form.submit('http://example.com/', function(err, res) {\n if (err) throw err;\n console.log('Done');\n });\n});\n```\n\nThe `filepath` property overrides `filename` and may contain a relative path. This is typically used when uploading [multiple files from a directory](https://wicg.github.io/entries-api/#dom-htmlinputelement-webkitdirectory).\n\nFor edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter:\n\n``` javascript\nform.submit({\n host: 'example.com',\n path: '/probably.php?extra=params',\n auth: 'username:password'\n}, function(err, res) {\n console.log(res.statusCode);\n});\n```\n\nIn case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`:\n\n``` javascript\nform.submit({\n host: 'example.com',\n path: '/surelynot.php',\n headers: {'x-test-header': 'test-header-value'}\n}, function(err, res) {\n console.log(res.statusCode);\n});\n```\n\n### Integration with other libraries\n\n#### Request\n\nForm submission using [request](https://github.com/request/request):\n\n```javascript\nvar formData = {\n my_field: 'my_value',\n my_file: fs.createReadStream(__dirname + '/unicycle.jpg'),\n};\n\nrequest.post({url:'http://service.com/upload', formData: formData}, function(err, httpResponse, body) {\n if (err) {\n return console.error('upload failed:', err);\n }\n console.log('Upload successful! Server responded with:', body);\n});\n```\n\nFor more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads).\n\n#### node-fetch\n\nYou can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch):\n\n```javascript\nvar form = new FormData();\n\nform.append('a', 1);\n\nfetch('http://example.com', { method: 'POST', body: form })\n .then(function(res) {\n return res.json();\n }).then(function(json) {\n console.log(json);\n });\n```\n\n## Notes\n\n- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround.\n- Starting version `2.x` FormData has dropped support for `node@0.10.x`.\n\n## License\n\nForm-Data is released under the [MIT](License) license.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/form-data/form-data/issues" - }, - "homepage": "https://github.com/form-data/form-data#readme", - "_id": "form-data@2.3.2", - "_requested": { - "type": "version", - "registry": true, - "raw": "form-data@2.3.2", - "name": "form-data", - "escapedName": "form-data", - "rawSpec": "2.3.2", - "saveSpec": "[Circular]", - "fetchSpec": "2.3.2" - }, - "_spec": "2.3.2", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "form-data@2.3.2", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "1.0.6", - "mime-types": "^2.1.12" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/form-data", - "error": "[Circular]", - "extraneous": false - }, - "formidable": { - "name": "formidable", - "description": "A node.js module for parsing form data, especially file uploads.", - "homepage": "https://github.com/felixge/node-formidable", - "license": "MIT", - "version": "1.2.1", - "devDependencies": { - "gently": "^0.8.0", - "findit": "^0.1.2", - "hashish": "^0.0.4", - "urun": "^0.0.6", - "utest": "^0.0.8", - "request": "^2.11.4" - }, - "directories": { - "lib": "./lib" - }, - "main": "./lib/index", - "scripts": { - "test": "node test/run.js", - "clean": "rm test/tmp/*" - }, - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-formidable.git" - }, - "bugs": { - "url": "http://github.com/felixge/node-formidable/issues" - }, - "optionalDependencies": {}, - "_resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", - "_integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==", - "_from": "formidable@1.2.1", - "readme": "# Formidable\n\n[![Build Status](https://travis-ci.org/felixge/node-formidable.svg?branch=master)](https://travis-ci.org/felixge/node-formidable)\n\n## Purpose\n\nA Node.js module for parsing form data, especially file uploads.\n\n## Current status\n\n**Maintainers Wanted:** Please see https://github.com/felixge/node-formidable/issues/412\n\nThis module was developed for [Transloadit](http://transloadit.com/), a service focused on uploading\nand encoding images and videos. It has been battle-tested against hundreds of GB of file uploads from\na large variety of clients and is considered production-ready.\n\n## Features\n\n* Fast (~500mb/sec), non-buffering multipart parser\n* Automatically writing file uploads to disk\n* Low memory footprint\n* Graceful error handling\n* Very high test coverage\n\n## Installation\n\n```sh\nnpm i -S formidable\n```\n\nThis is a low-level package, and if you're using a high-level framework it may already be included. However, [Express v4](http://expressjs.com) does not include any multipart handling, nor does [body-parser](https://github.com/expressjs/body-parser).\n\nNote: Formidable requires [gently](http://github.com/felixge/node-gently) to run the unit tests, but you won't need it for just using the library.\n\n## Example\n\nParse an incoming file upload.\n```javascript\nvar formidable = require('formidable'),\n http = require('http'),\n util = require('util');\n\nhttp.createServer(function(req, res) {\n if (req.url == '/upload' && req.method.toLowerCase() == 'post') {\n // parse a file upload\n var form = new formidable.IncomingForm();\n\n form.parse(req, function(err, fields, files) {\n res.writeHead(200, {'content-type': 'text/plain'});\n res.write('received upload:\\n\\n');\n res.end(util.inspect({fields: fields, files: files}));\n });\n\n return;\n }\n\n // show a file upload form\n res.writeHead(200, {'content-type': 'text/html'});\n res.end(\n '
'+\n '
'+\n '
'+\n ''+\n '
'\n );\n}).listen(8080);\n```\n## API\n\n### Formidable.IncomingForm\n```javascript\nvar form = new formidable.IncomingForm()\n```\nCreates a new incoming form.\n\n```javascript\nform.encoding = 'utf-8';\n```\nSets encoding for incoming form fields.\n\n```javascript\nform.uploadDir = \"/my/dir\";\n```\nSets the directory for placing file uploads in. You can move them later on using\n`fs.rename()`. The default is `os.tmpdir()`.\n\n```javascript\nform.keepExtensions = false;\n```\nIf you want the files written to `form.uploadDir` to include the extensions of the original files, set this property to `true`.\n\n```javascript\nform.type\n```\nEither 'multipart' or 'urlencoded' depending on the incoming request.\n\n```javascript\nform.maxFieldsSize = 20 * 1024 * 1024;\n```\nLimits the amount of memory all fields together (except files) can allocate in bytes.\nIf this value is exceeded, an `'error'` event is emitted. The default\nsize is 20MB.\n\n```javascript\nform.maxFileSize = 200 * 1024 * 1024;\n```\nLimits the size of uploaded file.\nIf this value is exceeded, an `'error'` event is emitted. The default\nsize is 200MB.\n\n```javascript\nform.maxFields = 1000;\n```\nLimits the number of fields that the querystring parser will decode. Defaults\nto 1000 (0 for unlimited).\n\n```javascript\nform.hash = false;\n```\nIf you want checksums calculated for incoming files, set this to either `'sha1'` or `'md5'`.\n\n```javascript\nform.multiples = false;\n```\nIf this option is enabled, when you call `form.parse`, the `files` argument will contain arrays of files for inputs which submit multiple files using the HTML5 `multiple` attribute.\n\n```javascript\nform.bytesReceived\n```\nThe amount of bytes received for this form so far.\n\n```javascript\nform.bytesExpected\n```\nThe expected number of bytes in this form.\n\n```javascript\nform.parse(request, [cb]);\n```\nParses an incoming node.js `request` containing form data. If `cb` is provided, all fields and files are collected and passed to the callback:\n\n\n```javascript\nform.parse(req, function(err, fields, files) {\n // ...\n});\n\nform.onPart(part);\n```\nYou may overwrite this method if you are interested in directly accessing the multipart stream. Doing so will disable any `'field'` / `'file'` events processing which would occur otherwise, making you fully responsible for handling the processing.\n\n```javascript\nform.onPart = function(part) {\n part.addListener('data', function() {\n // ...\n });\n}\n```\nIf you want to use formidable to only handle certain parts for you, you can do so:\n```javascript\nform.onPart = function(part) {\n if (!part.filename) {\n // let formidable handle all non-file parts\n form.handlePart(part);\n }\n}\n```\nCheck the code in this method for further inspiration.\n\n\n### Formidable.File\n```javascript\nfile.size = 0\n```\nThe size of the uploaded file in bytes. If the file is still being uploaded (see `'fileBegin'` event), this property says how many bytes of the file have been written to disk yet.\n```javascript\nfile.path = null\n```\nThe path this file is being written to. You can modify this in the `'fileBegin'` event in\ncase you are unhappy with the way formidable generates a temporary path for your files.\n```javascript\nfile.name = null\n```\nThe name this file had according to the uploading client.\n```javascript\nfile.type = null\n```\nThe mime type of this file, according to the uploading client.\n```javascript\nfile.lastModifiedDate = null\n```\nA date object (or `null`) containing the time this file was last written to. Mostly\nhere for compatibility with the [W3C File API Draft](http://dev.w3.org/2006/webapi/FileAPI/).\n```javascript\nfile.hash = null\n```\nIf hash calculation was set, you can read the hex digest out of this var.\n\n#### Formidable.File#toJSON()\n\n This method returns a JSON-representation of the file, allowing you to\n `JSON.stringify()` the file which is useful for logging and responding\n to requests.\n\n### Events\n\n\n#### 'progress'\n\nEmitted after each incoming chunk of data that has been parsed. Can be used to roll your own progress bar.\n\n```javascript\nform.on('progress', function(bytesReceived, bytesExpected) {\n});\n```\n\n\n\n#### 'field'\n\nEmitted whenever a field / value pair has been received.\n\n```javascript\nform.on('field', function(name, value) {\n});\n```\n\n#### 'fileBegin'\n\nEmitted whenever a new file is detected in the upload stream. Use this event if\nyou want to stream the file to somewhere else while buffering the upload on\nthe file system.\n\n```javascript\nform.on('fileBegin', function(name, file) {\n});\n```\n\n#### 'file'\n\nEmitted whenever a field / file pair has been received. `file` is an instance of `File`.\n\n```javascript\nform.on('file', function(name, file) {\n});\n```\n\n#### 'error'\n\nEmitted when there is an error processing the incoming form. A request that experiences an error is automatically paused, you will have to manually call `request.resume()` if you want the request to continue firing `'data'` events.\n\n```javascript\nform.on('error', function(err) {\n});\n```\n\n#### 'aborted'\n\n\nEmitted when the request was aborted by the user. Right now this can be due to a 'timeout' or 'close' event on the socket. After this event is emitted, an `error` event will follow. In the future there will be a separate 'timeout' event (needs a change in the node core).\n```javascript\nform.on('aborted', function() {\n});\n```\n\n##### 'end'\n```javascript\nform.on('end', function() {\n});\n```\nEmitted when the entire request has been received, and all contained files have finished flushing to disk. This is a great place for you to send your response.\n\n\n\n## Changelog\n\n### v1.1.1 (2017-01-15)\n\n * Fix DeprecationWarning about os.tmpDir() (Christian)\n * Update `buffer.write` order of arguments for Node 7 (Kornel Lesiński)\n * JSON Parser emits error events to the IncomingForm (alessio.montagnani)\n * Improved Content-Disposition parsing (Sebastien)\n * Access WriteStream of fs during runtime instead of include time (Jonas Amundsen)\n * Use built-in toString to convert buffer to hex (Charmander)\n * Add hash to json if present (Nick Stamas)\n * Add license to package.json (Simen Bekkhus)\n\n### v1.0.14 (2013-05-03)\n\n* Add failing hash tests. (Ben Trask)\n* Enable hash calculation again (Eugene Girshov)\n* Test for immediate data events (Tim Smart)\n* Re-arrange IncomingForm#parse (Tim Smart)\n\n### v1.0.13\n\n* Only update hash if update method exists (Sven Lito)\n* According to travis v0.10 needs to go quoted (Sven Lito)\n* Bumping build node versions (Sven Lito)\n* Additional fix for empty requests (Eugene Girshov)\n* Change the default to 1000, to match the new Node behaviour. (OrangeDog)\n* Add ability to control maxKeys in the querystring parser. (OrangeDog)\n* Adjust test case to work with node 0.9.x (Eugene Girshov)\n* Update package.json (Sven Lito)\n* Path adjustment according to eb4468b (Markus Ast)\n\n### v1.0.12\n\n* Emit error on aborted connections (Eugene Girshov)\n* Add support for empty requests (Eugene Girshov)\n* Fix name/filename handling in Content-Disposition (jesperp)\n* Tolerate malformed closing boundary in multipart (Eugene Girshov)\n* Ignore preamble in multipart messages (Eugene Girshov)\n* Add support for application/json (Mike Frey, Carlos Rodriguez)\n* Add support for Base64 encoding (Elmer Bulthuis)\n* Add File#toJSON (TJ Holowaychuk)\n* Remove support for Node.js 0.4 & 0.6 (Andrew Kelley)\n* Documentation improvements (Sven Lito, Andre Azevedo)\n* Add support for application/octet-stream (Ion Lupascu, Chris Scribner)\n* Use os.tmpdir() to get tmp directory (Andrew Kelley)\n* Improve package.json (Andrew Kelley, Sven Lito)\n* Fix benchmark script (Andrew Kelley)\n* Fix scope issue in incoming_forms (Sven Lito)\n* Fix file handle leak on error (OrangeDog)\n\n## License\n\nFormidable is licensed under the MIT license.\n\n## Ports\n\n* [multipart-parser](http://github.com/FooBarWidget/multipart-parser): a C++ parser based on formidable\n\n## Credits\n\n* [Ryan Dahl](http://twitter.com/ryah) for his work on [http-parser](http://github.com/ry/http-parser) which heavily inspired multipart_parser.js\n", - "readmeFilename": "Readme.md", - "dependencies": {}, - "_id": "formidable@1.2.1", - "_requested": { - "type": "version", - "registry": true, - "raw": "formidable@1.2.1", - "name": "formidable", - "escapedName": "formidable", - "rawSpec": "1.2.1", - "saveSpec": "[Circular]", - "fetchSpec": "1.2.1" - }, - "_spec": "1.2.1", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "formidable@1.2.1", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/formidable", - "error": "[Circular]", - "extraneous": false - }, - "methods": { - "name": "methods", - "description": "HTTP methods that node supports", - "version": "1.1.2", - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - }, - { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - } - ], - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/jshttp/methods.git" - }, - "devDependencies": { - "istanbul": "0.4.1", - "mocha": "1.21.5" - }, - "files": [ - "index.js", - "HISTORY.md", - "LICENSE" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - }, - "browser": { - "http": false - }, - "keywords": [ - "http", - "methods" - ], - "_resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "_integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "_from": "methods@1.1.2", - "readme": "# Methods\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Node.js Version][node-version-image]][node-version-url]\n[![Build Status][travis-image]][travis-url]\n[![Test Coverage][coveralls-image]][coveralls-url]\n\nHTTP verbs that Node.js core's HTTP parser supports.\n\nThis module provides an export that is just like `http.METHODS` from Node.js core,\nwith the following differences:\n\n * All method names are lower-cased.\n * Contains a fallback list of methods for Node.js versions that do not have a\n `http.METHODS` export (0.10 and lower).\n * Provides the fallback list when using tools like `browserify` without pulling\n in the `http` shim module.\n\n## Install\n\n```bash\n$ npm install methods\n```\n\n## API\n\n```js\nvar methods = require('methods')\n```\n\n### methods\n\nThis is an array of lower-cased method names that Node.js supports. If Node.js\nprovides the `http.METHODS` export, then this is the same array lower-cased,\notherwise it is a snapshot of the verbs from Node.js 0.10.\n\n## License\n\n[MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/methods.svg?style=flat\n[npm-url]: https://npmjs.org/package/methods\n[node-version-image]: https://img.shields.io/node/v/methods.svg?style=flat\n[node-version-url]: https://nodejs.org/en/download/\n[travis-image]: https://img.shields.io/travis/jshttp/methods.svg?style=flat\n[travis-url]: https://travis-ci.org/jshttp/methods\n[coveralls-image]: https://img.shields.io/coveralls/jshttp/methods.svg?style=flat\n[coveralls-url]: https://coveralls.io/r/jshttp/methods?branch=master\n[downloads-image]: https://img.shields.io/npm/dm/methods.svg?style=flat\n[downloads-url]: https://npmjs.org/package/methods\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/jshttp/methods/issues" - }, - "homepage": "https://github.com/jshttp/methods#readme", - "_id": "methods@1.1.2", - "_requested": { - "type": "version", - "registry": true, - "raw": "methods@1.1.2", - "name": "methods", - "escapedName": "methods", - "rawSpec": "1.1.2", - "saveSpec": "[Circular]", - "fetchSpec": "1.1.2" - }, - "_spec": "1.1.2", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "methods@1.1.2", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/methods", - "error": "[Circular]", - "extraneous": false - }, - "mime": { - "author": { - "name": "Robert Kieffer", - "email": "robert@broofa.com", - "url": "http://github.com/broofa" - }, - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - }, - "contributors": [ - { - "name": "Benjamin Thomas", - "email": "benjamin@benjaminthomas.org", - "url": "http://github.com/bentomas" - } - ], - "description": "A comprehensive library for mime-type mapping", - "license": "MIT", - "dependencies": {}, - "devDependencies": { - "github-release-notes": "0.13.1", - "mime-db": "1.31.0", - "mime-score": "1.1.0" - }, - "scripts": { - "prepare": "node src/build.js", - "changelog": "gren changelog --tags=all --generate --override", - "test": "node src/test.js" - }, - "keywords": [ - "util", - "mime" - ], - "main": "mime.js", - "name": "mime", - "repository": { - "url": "git+https://github.com/broofa/node-mime.git", - "type": "git" - }, - "version": "1.6.0", - "_resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "_integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "_from": "mime@1.6.0", - "readme": "# mime\n\nComprehensive MIME type mapping API based on mime-db module.\n\n## Install\n\nInstall with [npm](http://github.com/isaacs/npm):\n\n npm install mime\n\n## Contributing / Testing\n\n npm run test\n\n## Command Line\n\n mime [path_string]\n\nE.g.\n\n > mime scripts/jquery.js\n application/javascript\n\n## API - Queries\n\n### mime.lookup(path)\nGet the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.\n\n```js\nvar mime = require('mime');\n\nmime.lookup('/path/to/file.txt'); // => 'text/plain'\nmime.lookup('file.txt'); // => 'text/plain'\nmime.lookup('.TXT'); // => 'text/plain'\nmime.lookup('htm'); // => 'text/html'\n```\n\n### mime.default_type\nSets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)\n\n### mime.extension(type)\nGet the default extension for `type`\n\n```js\nmime.extension('text/html'); // => 'html'\nmime.extension('application/octet-stream'); // => 'bin'\n```\n\n### mime.charsets.lookup()\n\nMap mime-type to charset\n\n```js\nmime.charsets.lookup('text/plain'); // => 'UTF-8'\n```\n\n(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)\n\n## API - Defining Custom Types\n\nCustom type mappings can be added on a per-project basis via the following APIs.\n\n### mime.define()\n\nAdd custom mime/extension mappings\n\n```js\nmime.define({\n 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],\n 'application/x-my-type': ['x-mt', 'x-mtt'],\n // etc ...\n});\n\nmime.lookup('x-sft'); // => 'text/x-some-format'\n```\n\nThe first entry in the extensions array is returned by `mime.extension()`. E.g.\n\n```js\nmime.extension('text/x-some-format'); // => 'x-sf'\n```\n\n### mime.load(filepath)\n\nLoad mappings from an Apache \".types\" format file\n\n```js\nmime.load('./my_project.types');\n```\nThe .types file format is simple - See the `types` dir for examples.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/broofa/node-mime/issues" - }, - "homepage": "https://github.com/broofa/node-mime#readme", - "_id": "mime@1.6.0", - "_requested": { - "type": "version", - "registry": true, - "raw": "mime@1.6.0", - "name": "mime", - "escapedName": "mime", - "rawSpec": "1.6.0", - "saveSpec": "[Circular]", - "fetchSpec": "1.6.0" - }, - "_spec": "1.6.0", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "mime@1.6.0", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/mime", - "error": "[Circular]", - "extraneous": false - }, - "qs": { - "name": "qs", - "description": "A querystring parser that supports nesting and arrays, with a depth limit", - "homepage": "https://github.com/ljharb/qs", - "version": "6.5.2", - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/qs.git" - }, - "main": "lib/index.js", - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "keywords": [ - "querystring", - "qs" - ], - "engines": { - "node": ">=0.6" - }, - "dependencies": {}, - "devDependencies": { - "@ljharb/eslint-config": "^12.2.1", - "browserify": "^16.2.0", - "covert": "^1.1.0", - "editorconfig-tools": "^0.1.1", - "eslint": "^4.19.1", - "evalmd": "^0.0.17", - "iconv-lite": "^0.4.21", - "mkdirp": "^0.5.1", - "qs-iconv": "^1.0.4", - "safe-publish-latest": "^1.1.1", - "safer-buffer": "^2.1.2", - "tape": "^4.9.0" - }, - "scripts": { - "prepublish": "safe-publish-latest && npm run dist", - "pretest": "npm run --silent readme && npm run --silent lint", - "test": "npm run --silent coverage", - "tests-only": "node test", - "readme": "evalmd README.md", - "prelint": "editorconfig-tools check * lib/* test/*", - "lint": "eslint lib/*.js test/*.js", - "coverage": "covert test", - "dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js" - }, - "license": "BSD-3-Clause", - "_resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "_integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "_from": "qs@6.5.2", - "readme": "# qs [![Version Badge][2]][1]\n\n[![Build Status][3]][4]\n[![dependency status][5]][6]\n[![dev dependency status][7]][8]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][11]][1]\n\nA querystring parsing and stringifying library with some added security.\n\nLead Maintainer: [Jordan Harband](https://github.com/ljharb)\n\nThe **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring).\n\n## Usage\n\n```javascript\nvar qs = require('qs');\nvar assert = require('assert');\n\nvar obj = qs.parse('a=c');\nassert.deepEqual(obj, { a: 'c' });\n\nvar str = qs.stringify(obj);\nassert.equal(str, 'a=c');\n```\n\n### Parsing Objects\n\n[](#preventEval)\n```javascript\nqs.parse(string, [options]);\n```\n\n**qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`.\nFor example, the string `'foo[bar]=baz'` converts to:\n\n```javascript\nassert.deepEqual(qs.parse('foo[bar]=baz'), {\n foo: {\n bar: 'baz'\n }\n});\n```\n\nWhen using the `plainObjects` option the parsed value is returned as a null object, created via `Object.create(null)` and as such you should be aware that prototype methods will not exist on it and a user may set those names to whatever value they like:\n\n```javascript\nvar nullObject = qs.parse('a[hasOwnProperty]=b', { plainObjects: true });\nassert.deepEqual(nullObject, { a: { hasOwnProperty: 'b' } });\n```\n\nBy default parameters that would overwrite properties on the object prototype are ignored, if you wish to keep the data from those fields either use `plainObjects` as mentioned above, or set `allowPrototypes` to `true` which will allow user input to overwrite those properties. *WARNING* It is generally a bad idea to enable this option as it can cause problems when attempting to use the properties that have been overwritten. Always be careful with this option.\n\n```javascript\nvar protoObject = qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true });\nassert.deepEqual(protoObject, { a: { hasOwnProperty: 'b' } });\n```\n\nURI encoded strings work too:\n\n```javascript\nassert.deepEqual(qs.parse('a%5Bb%5D=c'), {\n a: { b: 'c' }\n});\n```\n\nYou can also nest your objects, like `'foo[bar][baz]=foobarbaz'`:\n\n```javascript\nassert.deepEqual(qs.parse('foo[bar][baz]=foobarbaz'), {\n foo: {\n bar: {\n baz: 'foobarbaz'\n }\n }\n});\n```\n\nBy default, when nesting objects **qs** will only parse up to 5 children deep. This means if you attempt to parse a string like\n`'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be:\n\n```javascript\nvar expected = {\n a: {\n b: {\n c: {\n d: {\n e: {\n f: {\n '[g][h][i]': 'j'\n }\n }\n }\n }\n }\n }\n};\nvar string = 'a[b][c][d][e][f][g][h][i]=j';\nassert.deepEqual(qs.parse(string), expected);\n```\n\nThis depth can be overridden by passing a `depth` option to `qs.parse(string, [options])`:\n\n```javascript\nvar deep = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 });\nassert.deepEqual(deep, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } });\n```\n\nThe depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number.\n\nFor similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option:\n\n```javascript\nvar limited = qs.parse('a=b&c=d', { parameterLimit: 1 });\nassert.deepEqual(limited, { a: 'b' });\n```\n\nTo bypass the leading question mark, use `ignoreQueryPrefix`:\n\n```javascript\nvar prefixed = qs.parse('?a=b&c=d', { ignoreQueryPrefix: true });\nassert.deepEqual(prefixed, { a: 'b', c: 'd' });\n```\n\nAn optional delimiter can also be passed:\n\n```javascript\nvar delimited = qs.parse('a=b;c=d', { delimiter: ';' });\nassert.deepEqual(delimited, { a: 'b', c: 'd' });\n```\n\nDelimiters can be a regular expression too:\n\n```javascript\nvar regexed = qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ });\nassert.deepEqual(regexed, { a: 'b', c: 'd', e: 'f' });\n```\n\nOption `allowDots` can be used to enable dot notation:\n\n```javascript\nvar withDots = qs.parse('a.b=c', { allowDots: true });\nassert.deepEqual(withDots, { a: { b: 'c' } });\n```\n\n### Parsing Arrays\n\n**qs** can also parse arrays using a similar `[]` notation:\n\n```javascript\nvar withArray = qs.parse('a[]=b&a[]=c');\nassert.deepEqual(withArray, { a: ['b', 'c'] });\n```\n\nYou may specify an index as well:\n\n```javascript\nvar withIndexes = qs.parse('a[1]=c&a[0]=b');\nassert.deepEqual(withIndexes, { a: ['b', 'c'] });\n```\n\nNote that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number\nto create an array. When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving\ntheir order:\n\n```javascript\nvar noSparse = qs.parse('a[1]=b&a[15]=c');\nassert.deepEqual(noSparse, { a: ['b', 'c'] });\n```\n\nNote that an empty string is also a value, and will be preserved:\n\n```javascript\nvar withEmptyString = qs.parse('a[]=&a[]=b');\nassert.deepEqual(withEmptyString, { a: ['', 'b'] });\n\nvar withIndexedEmptyString = qs.parse('a[0]=b&a[1]=&a[2]=c');\nassert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] });\n```\n\n**qs** will also limit specifying indices in an array to a maximum index of `20`. Any array members with an index of greater than `20` will\ninstead be converted to an object with the index as the key:\n\n```javascript\nvar withMaxIndex = qs.parse('a[100]=b');\nassert.deepEqual(withMaxIndex, { a: { '100': 'b' } });\n```\n\nThis limit can be overridden by passing an `arrayLimit` option:\n\n```javascript\nvar withArrayLimit = qs.parse('a[1]=b', { arrayLimit: 0 });\nassert.deepEqual(withArrayLimit, { a: { '1': 'b' } });\n```\n\nTo disable array parsing entirely, set `parseArrays` to `false`.\n\n```javascript\nvar noParsingArrays = qs.parse('a[]=b', { parseArrays: false });\nassert.deepEqual(noParsingArrays, { a: { '0': 'b' } });\n```\n\nIf you mix notations, **qs** will merge the two items into an object:\n\n```javascript\nvar mixedNotation = qs.parse('a[0]=b&a[b]=c');\nassert.deepEqual(mixedNotation, { a: { '0': 'b', b: 'c' } });\n```\n\nYou can also create arrays of objects:\n\n```javascript\nvar arraysOfObjects = qs.parse('a[][b]=c');\nassert.deepEqual(arraysOfObjects, { a: [{ b: 'c' }] });\n```\n\n### Stringifying\n\n[](#preventEval)\n```javascript\nqs.stringify(object, [options]);\n```\n\nWhen stringifying, **qs** by default URI encodes output. Objects are stringified as you would expect:\n\n```javascript\nassert.equal(qs.stringify({ a: 'b' }), 'a=b');\nassert.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c');\n```\n\nThis encoding can be disabled by setting the `encode` option to `false`:\n\n```javascript\nvar unencoded = qs.stringify({ a: { b: 'c' } }, { encode: false });\nassert.equal(unencoded, 'a[b]=c');\n```\n\nEncoding can be disabled for keys by setting the `encodeValuesOnly` option to `true`:\n```javascript\nvar encodedValues = qs.stringify(\n { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] },\n { encodeValuesOnly: true }\n);\nassert.equal(encodedValues,'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h');\n```\n\nThis encoding can also be replaced by a custom encoding method set as `encoder` option:\n\n```javascript\nvar encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str) {\n // Passed in values `a`, `b`, `c`\n return // Return encoded string\n}})\n```\n\n_(Note: the `encoder` option does not apply if `encode` is `false`)_\n\nAnalogue to the `encoder` there is a `decoder` option for `parse` to override decoding of properties and values:\n\n```javascript\nvar decoded = qs.parse('x=z', { decoder: function (str) {\n // Passed in values `x`, `z`\n return // Return decoded string\n}})\n```\n\nExamples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage.\n\nWhen arrays are stringified, by default they are given explicit indices:\n\n```javascript\nqs.stringify({ a: ['b', 'c', 'd'] });\n// 'a[0]=b&a[1]=c&a[2]=d'\n```\n\nYou may override this by setting the `indices` option to `false`:\n\n```javascript\nqs.stringify({ a: ['b', 'c', 'd'] }, { indices: false });\n// 'a=b&a=c&a=d'\n```\n\nYou may use the `arrayFormat` option to specify the format of the output array:\n\n```javascript\nqs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' })\n// 'a[0]=b&a[1]=c'\nqs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' })\n// 'a[]=b&a[]=c'\nqs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' })\n// 'a=b&a=c'\n```\n\nWhen objects are stringified, by default they use bracket notation:\n\n```javascript\nqs.stringify({ a: { b: { c: 'd', e: 'f' } } });\n// 'a[b][c]=d&a[b][e]=f'\n```\n\nYou may override this to use dot notation by setting the `allowDots` option to `true`:\n\n```javascript\nqs.stringify({ a: { b: { c: 'd', e: 'f' } } }, { allowDots: true });\n// 'a.b.c=d&a.b.e=f'\n```\n\nEmpty strings and null values will omit the value, but the equals sign (=) remains in place:\n\n```javascript\nassert.equal(qs.stringify({ a: '' }), 'a=');\n```\n\nKey with no values (such as an empty object or array) will return nothing:\n\n```javascript\nassert.equal(qs.stringify({ a: [] }), '');\nassert.equal(qs.stringify({ a: {} }), '');\nassert.equal(qs.stringify({ a: [{}] }), '');\nassert.equal(qs.stringify({ a: { b: []} }), '');\nassert.equal(qs.stringify({ a: { b: {}} }), '');\n```\n\nProperties that are set to `undefined` will be omitted entirely:\n\n```javascript\nassert.equal(qs.stringify({ a: null, b: undefined }), 'a=');\n```\n\nThe query string may optionally be prepended with a question mark:\n\n```javascript\nassert.equal(qs.stringify({ a: 'b', c: 'd' }, { addQueryPrefix: true }), '?a=b&c=d');\n```\n\nThe delimiter may be overridden with stringify as well:\n\n```javascript\nassert.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d');\n```\n\nIf you only want to override the serialization of `Date` objects, you can provide a `serializeDate` option:\n\n```javascript\nvar date = new Date(7);\nassert.equal(qs.stringify({ a: date }), 'a=1970-01-01T00:00:00.007Z'.replace(/:/g, '%3A'));\nassert.equal(\n qs.stringify({ a: date }, { serializeDate: function (d) { return d.getTime(); } }),\n 'a=7'\n);\n```\n\nYou may use the `sort` option to affect the order of parameter keys:\n\n```javascript\nfunction alphabeticalSort(a, b) {\n return a.localeCompare(b);\n}\nassert.equal(qs.stringify({ a: 'c', z: 'y', b : 'f' }, { sort: alphabeticalSort }), 'a=c&b=f&z=y');\n```\n\nFinally, you can use the `filter` option to restrict which keys will be included in the stringified output.\nIf you pass a function, it will be called for each key to obtain the replacement value. Otherwise, if you\npass an array, it will be used to select properties and array indices for stringification:\n\n```javascript\nfunction filterFunc(prefix, value) {\n if (prefix == 'b') {\n // Return an `undefined` value to omit a property.\n return;\n }\n if (prefix == 'e[f]') {\n return value.getTime();\n }\n if (prefix == 'e[g][0]') {\n return value * 2;\n }\n return value;\n}\nqs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: filterFunc });\n// 'a=b&c=d&e[f]=123&e[g][0]=4'\nqs.stringify({ a: 'b', c: 'd', e: 'f' }, { filter: ['a', 'e'] });\n// 'a=b&e=f'\nqs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] });\n// 'a[0]=b&a[2]=d'\n```\n\n### Handling of `null` values\n\nBy default, `null` values are treated like empty strings:\n\n```javascript\nvar withNull = qs.stringify({ a: null, b: '' });\nassert.equal(withNull, 'a=&b=');\n```\n\nParsing does not distinguish between parameters with and without equal signs. Both are converted to empty strings.\n\n```javascript\nvar equalsInsensitive = qs.parse('a&b=');\nassert.deepEqual(equalsInsensitive, { a: '', b: '' });\n```\n\nTo distinguish between `null` values and empty strings use the `strictNullHandling` flag. In the result string the `null`\nvalues have no `=` sign:\n\n```javascript\nvar strictNull = qs.stringify({ a: null, b: '' }, { strictNullHandling: true });\nassert.equal(strictNull, 'a&b=');\n```\n\nTo parse values without `=` back to `null` use the `strictNullHandling` flag:\n\n```javascript\nvar parsedStrictNull = qs.parse('a&b=', { strictNullHandling: true });\nassert.deepEqual(parsedStrictNull, { a: null, b: '' });\n```\n\nTo completely skip rendering keys with `null` values, use the `skipNulls` flag:\n\n```javascript\nvar nullsSkipped = qs.stringify({ a: 'b', c: null}, { skipNulls: true });\nassert.equal(nullsSkipped, 'a=b');\n```\n\n### Dealing with special character sets\n\nBy default the encoding and decoding of characters is done in `utf-8`. If you\nwish to encode querystrings to a different character set (i.e.\n[Shift JIS](https://en.wikipedia.org/wiki/Shift_JIS)) you can use the\n[`qs-iconv`](https://github.com/martinheidegger/qs-iconv) library:\n\n```javascript\nvar encoder = require('qs-iconv/encoder')('shift_jis');\nvar shiftJISEncoded = qs.stringify({ a: 'こんにちは!' }, { encoder: encoder });\nassert.equal(shiftJISEncoded, 'a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I');\n```\n\nThis also works for decoding of query strings:\n\n```javascript\nvar decoder = require('qs-iconv/decoder')('shift_jis');\nvar obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder });\nassert.deepEqual(obj, { a: 'こんにちは!' });\n```\n\n### RFC 3986 and RFC 1738 space encoding\n\nRFC3986 used as default option and encodes ' ' to *%20* which is backward compatible.\nIn the same time, output can be stringified as per RFC1738 with ' ' equal to '+'.\n\n```\nassert.equal(qs.stringify({ a: 'b c' }), 'a=b%20c');\nassert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC3986' }), 'a=b%20c');\nassert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC1738' }), 'a=b+c');\n```\n\n[1]: https://npmjs.org/package/qs\n[2]: http://versionbadg.es/ljharb/qs.svg\n[3]: https://api.travis-ci.org/ljharb/qs.svg\n[4]: https://travis-ci.org/ljharb/qs\n[5]: https://david-dm.org/ljharb/qs.svg\n[6]: https://david-dm.org/ljharb/qs\n[7]: https://david-dm.org/ljharb/qs/dev-status.svg\n[8]: https://david-dm.org/ljharb/qs?type=dev\n[9]: https://ci.testling.com/ljharb/qs.png\n[10]: https://ci.testling.com/ljharb/qs\n[11]: https://nodei.co/npm/qs.png?downloads=true&stars=true\n[license-image]: http://img.shields.io/npm/l/qs.svg\n[license-url]: LICENSE\n[downloads-image]: http://img.shields.io/npm/dm/qs.svg\n[downloads-url]: http://npm-stat.com/charts.html?package=qs\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/ljharb/qs/issues" - }, - "_id": "qs@6.5.2", - "_requested": { - "type": "version", - "registry": true, - "raw": "qs@6.5.2", - "name": "qs", - "escapedName": "qs", - "rawSpec": "6.5.2", - "saveSpec": "[Circular]", - "fetchSpec": "6.5.2" - }, - "_spec": "6.5.2", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "qs@6.5.2", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/qs", - "error": "[Circular]", - "extraneous": false - }, - "readable-stream": { - "name": "readable-stream", - "version": "2.3.6", - "description": "Streams3, a user-land copy of the stream library from Node.js", - "main": "readable.js", - "dependencies": { - "core-util-is": { - "name": "core-util-is", - "version": "1.0.2", - "description": "The `util.is*` functions introduced in Node v0.12.", - "main": "lib/util.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/core-util-is.git" - }, - "keywords": [ - "util", - "isBuffer", - "isArray", - "isNumber", - "isString", - "isRegExp", - "isThis", - "isThat", - "polyfill" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/isaacs/core-util-is/issues" - }, - "scripts": { - "test": "tap test.js" - }, - "devDependencies": { - "tap": "^2.3.0" - }, - "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "_integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "_from": "core-util-is@1.0.2", - "readme": "# core-util-is\n\nThe `util.is*` functions introduced in Node v0.12.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/isaacs/core-util-is#readme", - "_id": "core-util-is@1.0.2", - "_requested": { - "type": "version", - "registry": true, - "raw": "core-util-is@1.0.2", - "name": "core-util-is", - "escapedName": "core-util-is", - "rawSpec": "1.0.2", - "saveSpec": "[Circular]", - "fetchSpec": "1.0.2" - }, - "_spec": "1.0.2", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "core-util-is@1.0.2", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/core-util-is", - "error": "[Circular]", - "extraneous": false - }, - "inherits": { - "name": "inherits", - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "version": "2.0.3", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "main": "./inherits.js", - "browser": "./inherits_browser.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inherits.git" - }, - "license": "ISC", - "scripts": { - "test": "node test" - }, - "devDependencies": { - "tap": "^7.1.0" - }, - "files": [ - "inherits.js", - "inherits_browser.js" - ], - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "_integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "_from": "inherits@2.0.3", - "readme": "Browser-friendly inheritance fully compatible with standard node.js\n[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).\n\nThis package exports standard `inherits` from node.js `util` module in\nnode environment, but also provides alternative browser-friendly\nimplementation through [browser\nfield](https://gist.github.com/shtylman/4339901). Alternative\nimplementation is a literal copy of standard one located in standalone\nmodule to avoid requiring of `util`. It also has a shim for old\nbrowsers with no `Object.create` support.\n\nWhile keeping you sure you are using standard `inherits`\nimplementation in node.js environment, it allows bundlers such as\n[browserify](https://github.com/substack/node-browserify) to not\ninclude full `util` package to your client code if all you need is\njust `inherits` function. It worth, because browser shim for `util`\npackage is large and `inherits` is often the single function you need\nfrom it.\n\nIt's recommended to use this package instead of\n`require('util').inherits` for any code that has chances to be used\nnot only in node.js but in browser too.\n\n## usage\n\n```js\nvar inherits = require('inherits');\n// then use exactly as the standard one\n```\n\n## note on version ~1.0\n\nVersion ~1.0 had completely different motivation and is not compatible\nneither with 2.0 nor with standard node.js `inherits`.\n\nIf you are using version ~1.0 and planning to switch to ~2.0, be\ncareful:\n\n* new version uses `super_` instead of `super` for referencing\n superclass\n* new version overwrites current prototype while old one preserves any\n existing fields on it\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "homepage": "https://github.com/isaacs/inherits#readme", - "_id": "inherits@2.0.3", - "_requested": { - "type": "version", - "registry": true, - "raw": "inherits@2.0.3", - "name": "inherits", - "escapedName": "inherits", - "rawSpec": "2.0.3", - "saveSpec": "[Circular]", - "fetchSpec": "2.0.3" - }, - "_spec": "2.0.3", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "inherits@2.0.3", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/inherits", - "error": "[Circular]", - "extraneous": false - }, - "isarray": { - "name": "isarray", - "description": "Array#isArray for older browsers", - "version": "1.0.0", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isarray.git" - }, - "homepage": "https://github.com/juliangruber/isarray", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tape": "~2.13.4" - }, - "keywords": [ - "browser", - "isarray", - "array" - ], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "testling": { - "files": "test.js", - "browsers": [ - "ie/8..latest", - "firefox/17..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "scripts": { - "test": "tape test.js" - }, - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "_integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "_from": "isarray@1.0.0", - "readme": "\n# isarray\n\n`Array#isArray` for older browsers.\n\n[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray)\n[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray)\n\n[![browser support](https://ci.testling.com/juliangruber/isarray.png)\n](https://ci.testling.com/juliangruber/isarray)\n\n## Usage\n\n```js\nvar isArray = require('isarray');\n\nconsole.log(isArray([])); // => true\nconsole.log(isArray({})); // => false\n```\n\n## Installation\n\nWith [npm](http://npmjs.org) do\n\n```bash\n$ npm install isarray\n```\n\nThen bundle for the browser with\n[browserify](https://github.com/substack/browserify).\n\nWith [component](http://component.io) do\n\n```bash\n$ component install juliangruber/isarray\n```\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber <julian@juliangruber.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/juliangruber/isarray/issues" - }, - "_id": "isarray@1.0.0", - "_requested": { - "type": "version", - "registry": true, - "raw": "isarray@1.0.0", - "name": "isarray", - "escapedName": "isarray", - "rawSpec": "1.0.0", - "saveSpec": "[Circular]", - "fetchSpec": "1.0.0" - }, - "_spec": "1.0.0", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "isarray@1.0.0", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/isarray", - "error": "[Circular]", - "extraneous": false - }, - "process-nextick-args": { - "name": "process-nextick-args", - "version": "2.0.0", - "description": "process.nextTick but always with args", - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/calvinmetcalf/process-nextick-args.git" - }, - "author": "", - "license": "MIT", - "bugs": { - "url": "https://github.com/calvinmetcalf/process-nextick-args/issues" - }, - "homepage": "https://github.com/calvinmetcalf/process-nextick-args", - "devDependencies": { - "tap": "~0.2.6" - }, - "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "_integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "_from": "process-nextick-args@2.0.0", - "readme": "process-nextick-args\n=====\n\n[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args)\n\n```bash\nnpm install --save process-nextick-args\n```\n\nAlways be able to pass arguments to process.nextTick, no matter the platform\n\n```js\nvar pna = require('process-nextick-args');\n\npna.nextTick(function (a, b, c) {\n console.log(a, b, c);\n}, 'step', 3, 'profit');\n```\n", - "readmeFilename": "readme.md", - "_id": "process-nextick-args@2.0.0", - "_requested": { - "type": "version", - "registry": true, - "raw": "process-nextick-args@2.0.0", - "name": "process-nextick-args", - "escapedName": "process-nextick-args", - "rawSpec": "2.0.0", - "saveSpec": "[Circular]", - "fetchSpec": "2.0.0" - }, - "_spec": "2.0.0", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "process-nextick-args@2.0.0", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/process-nextick-args", - "error": "[Circular]", - "extraneous": false - }, - "safe-buffer": { - "name": "safe-buffer", - "description": "Safer Node.js Buffer API", - "version": "5.1.2", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "devDependencies": { - "standard": "*", - "tape": "^4.0.0" - }, - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "_integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "_from": "safe-buffer@5.1.2", - "readme": "# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]\n\n[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg\n[travis-url]: https://travis-ci.org/feross/safe-buffer\n[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg\n[npm-url]: https://npmjs.org/package/safe-buffer\n[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg\n[downloads-url]: https://npmjs.org/package/safe-buffer\n[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg\n[standard-url]: https://standardjs.com\n\n#### Safer Node.js Buffer API\n\n**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`,\n`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.**\n\n**Uses the built-in implementation when available.**\n\n## install\n\n```\nnpm install safe-buffer\n```\n\n## usage\n\nThe goal of this package is to provide a safe replacement for the node.js `Buffer`.\n\nIt's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to\nthe top of your node.js modules:\n\n```js\nvar Buffer = require('safe-buffer').Buffer\n\n// Existing buffer code will continue to work without issues:\n\nnew Buffer('hey', 'utf8')\nnew Buffer([1, 2, 3], 'utf8')\nnew Buffer(obj)\nnew Buffer(16) // create an uninitialized buffer (potentially unsafe)\n\n// But you can use these new explicit APIs to make clear what you want:\n\nBuffer.from('hey', 'utf8') // convert from many types to a Buffer\nBuffer.alloc(16) // create a zero-filled buffer (safe)\nBuffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe)\n```\n\n## api\n\n### Class Method: Buffer.from(array)\n\n\n* `array` {Array}\n\nAllocates a new `Buffer` using an `array` of octets.\n\n```js\nconst buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]);\n // creates a new Buffer containing ASCII bytes\n // ['b','u','f','f','e','r']\n```\n\nA `TypeError` will be thrown if `array` is not an `Array`.\n\n### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]])\n\n\n* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or\n a `new ArrayBuffer()`\n* `byteOffset` {Number} Default: `0`\n* `length` {Number} Default: `arrayBuffer.length - byteOffset`\n\nWhen passed a reference to the `.buffer` property of a `TypedArray` instance,\nthe newly created `Buffer` will share the same allocated memory as the\nTypedArray.\n\n```js\nconst arr = new Uint16Array(2);\narr[0] = 5000;\narr[1] = 4000;\n\nconst buf = Buffer.from(arr.buffer); // shares the memory with arr;\n\nconsole.log(buf);\n // Prints: \n\n// changing the TypedArray changes the Buffer also\narr[1] = 6000;\n\nconsole.log(buf);\n // Prints: \n```\n\nThe optional `byteOffset` and `length` arguments specify a memory range within\nthe `arrayBuffer` that will be shared by the `Buffer`.\n\n```js\nconst ab = new ArrayBuffer(10);\nconst buf = Buffer.from(ab, 0, 2);\nconsole.log(buf.length);\n // Prints: 2\n```\n\nA `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`.\n\n### Class Method: Buffer.from(buffer)\n\n\n* `buffer` {Buffer}\n\nCopies the passed `buffer` data onto a new `Buffer` instance.\n\n```js\nconst buf1 = Buffer.from('buffer');\nconst buf2 = Buffer.from(buf1);\n\nbuf1[0] = 0x61;\nconsole.log(buf1.toString());\n // 'auffer'\nconsole.log(buf2.toString());\n // 'buffer' (copy is not changed)\n```\n\nA `TypeError` will be thrown if `buffer` is not a `Buffer`.\n\n### Class Method: Buffer.from(str[, encoding])\n\n\n* `str` {String} String to encode.\n* `encoding` {String} Encoding to use, Default: `'utf8'`\n\nCreates a new `Buffer` containing the given JavaScript string `str`. If\nprovided, the `encoding` parameter identifies the character encoding.\nIf not provided, `encoding` defaults to `'utf8'`.\n\n```js\nconst buf1 = Buffer.from('this is a tést');\nconsole.log(buf1.toString());\n // prints: this is a tést\nconsole.log(buf1.toString('ascii'));\n // prints: this is a tC)st\n\nconst buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');\nconsole.log(buf2.toString());\n // prints: this is a tést\n```\n\nA `TypeError` will be thrown if `str` is not a string.\n\n### Class Method: Buffer.alloc(size[, fill[, encoding]])\n\n\n* `size` {Number}\n* `fill` {Value} Default: `undefined`\n* `encoding` {String} Default: `utf8`\n\nAllocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the\n`Buffer` will be *zero-filled*.\n\n```js\nconst buf = Buffer.alloc(5);\nconsole.log(buf);\n // \n```\n\nThe `size` must be less than or equal to the value of\n`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is\n`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will\nbe created if a `size` less than or equal to 0 is specified.\n\nIf `fill` is specified, the allocated `Buffer` will be initialized by calling\n`buf.fill(fill)`. See [`buf.fill()`][] for more information.\n\n```js\nconst buf = Buffer.alloc(5, 'a');\nconsole.log(buf);\n // \n```\n\nIf both `fill` and `encoding` are specified, the allocated `Buffer` will be\ninitialized by calling `buf.fill(fill, encoding)`. For example:\n\n```js\nconst buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');\nconsole.log(buf);\n // \n```\n\nCalling `Buffer.alloc(size)` can be significantly slower than the alternative\n`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance\ncontents will *never contain sensitive data*.\n\nA `TypeError` will be thrown if `size` is not a number.\n\n### Class Method: Buffer.allocUnsafe(size)\n\n\n* `size` {Number}\n\nAllocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must\nbe less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit\narchitectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is\nthrown. A zero-length Buffer will be created if a `size` less than or equal to\n0 is specified.\n\nThe underlying memory for `Buffer` instances created in this way is *not\ninitialized*. The contents of the newly created `Buffer` are unknown and\n*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such\n`Buffer` instances to zeroes.\n\n```js\nconst buf = Buffer.allocUnsafe(5);\nconsole.log(buf);\n // \n // (octets will be different, every time)\nbuf.fill(0);\nconsole.log(buf);\n // \n```\n\nA `TypeError` will be thrown if `size` is not a number.\n\nNote that the `Buffer` module pre-allocates an internal `Buffer` instance of\nsize `Buffer.poolSize` that is used as a pool for the fast allocation of new\n`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated\n`new Buffer(size)` constructor) only when `size` is less than or equal to\n`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default\nvalue of `Buffer.poolSize` is `8192` but can be modified.\n\nUse of this pre-allocated internal memory pool is a key difference between\ncalling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.\nSpecifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer\npool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal\nBuffer pool if `size` is less than or equal to half `Buffer.poolSize`. The\ndifference is subtle but can be important when an application requires the\nadditional performance that `Buffer.allocUnsafe(size)` provides.\n\n### Class Method: Buffer.allocUnsafeSlow(size)\n\n\n* `size` {Number}\n\nAllocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The\n`size` must be less than or equal to the value of\n`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is\n`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will\nbe created if a `size` less than or equal to 0 is specified.\n\nThe underlying memory for `Buffer` instances created in this way is *not\ninitialized*. The contents of the newly created `Buffer` are unknown and\n*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such\n`Buffer` instances to zeroes.\n\nWhen using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,\nallocations under 4KB are, by default, sliced from a single pre-allocated\n`Buffer`. This allows applications to avoid the garbage collection overhead of\ncreating many individually allocated Buffers. This approach improves both\nperformance and memory usage by eliminating the need to track and cleanup as\nmany `Persistent` objects.\n\nHowever, in the case where a developer may need to retain a small chunk of\nmemory from a pool for an indeterminate amount of time, it may be appropriate\nto create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then\ncopy out the relevant bits.\n\n```js\n// need to keep around a few small chunks of memory\nconst store = [];\n\nsocket.on('readable', () => {\n const data = socket.read();\n // allocate for retained data\n const sb = Buffer.allocUnsafeSlow(10);\n // copy the data into the new allocation\n data.copy(sb, 0, 0, 10);\n store.push(sb);\n});\n```\n\nUse of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after*\na developer has observed undue memory retention in their applications.\n\nA `TypeError` will be thrown if `size` is not a number.\n\n### All the Rest\n\nThe rest of the `Buffer` API is exactly the same as in node.js.\n[See the docs](https://nodejs.org/api/buffer.html).\n\n\n## Related links\n\n- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660)\n- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4)\n\n## Why is `Buffer` unsafe?\n\nToday, the node.js `Buffer` constructor is overloaded to handle many different argument\ntypes like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.),\n`ArrayBuffer`, and also `Number`.\n\nThe API is optimized for convenience: you can throw any type at it, and it will try to do\nwhat you want.\n\nBecause the Buffer constructor is so powerful, you often see code like this:\n\n```js\n// Convert UTF-8 strings to hex\nfunction toHex (str) {\n return new Buffer(str).toString('hex')\n}\n```\n\n***But what happens if `toHex` is called with a `Number` argument?***\n\n### Remote Memory Disclosure\n\nIf an attacker can make your program call the `Buffer` constructor with a `Number`\nargument, then they can make it allocate uninitialized memory from the node.js process.\nThis could potentially disclose TLS private keys, user data, or database passwords.\n\nWhen the `Buffer` constructor is passed a `Number` argument, it returns an\n**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like\nthis, you **MUST** overwrite the contents before returning it to the user.\n\nFrom the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size):\n\n> `new Buffer(size)`\n>\n> - `size` Number\n>\n> The underlying memory for `Buffer` instances created in this way is not initialized.\n> **The contents of a newly created `Buffer` are unknown and could contain sensitive\n> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes.\n\n(Emphasis our own.)\n\nWhenever the programmer intended to create an uninitialized `Buffer` you often see code\nlike this:\n\n```js\nvar buf = new Buffer(16)\n\n// Immediately overwrite the uninitialized buffer with data from another buffer\nfor (var i = 0; i < buf.length; i++) {\n buf[i] = otherBuf[i]\n}\n```\n\n\n### Would this ever be a problem in real code?\n\nYes. It's surprisingly common to forget to check the type of your variables in a\ndynamically-typed language like JavaScript.\n\nUsually the consequences of assuming the wrong type is that your program crashes with an\nuncaught exception. But the failure mode for forgetting to check the type of arguments to\nthe `Buffer` constructor is more catastrophic.\n\nHere's an example of a vulnerable service that takes a JSON payload and converts it to\nhex:\n\n```js\n// Take a JSON payload {str: \"some string\"} and convert it to hex\nvar server = http.createServer(function (req, res) {\n var data = ''\n req.setEncoding('utf8')\n req.on('data', function (chunk) {\n data += chunk\n })\n req.on('end', function () {\n var body = JSON.parse(data)\n res.end(new Buffer(body.str).toString('hex'))\n })\n})\n\nserver.listen(8080)\n```\n\nIn this example, an http client just has to send:\n\n```json\n{\n \"str\": 1000\n}\n```\n\nand it will get back 1,000 bytes of uninitialized memory from the server.\n\nThis is a very serious bug. It's similar in severity to the\n[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process\nmemory by remote attackers.\n\n\n### Which real-world packages were vulnerable?\n\n#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht)\n\n[Mathias Buus](https://github.com/mafintosh) and I\n([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages,\n[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow\nanyone on the internet to send a series of messages to a user of `bittorrent-dht` and get\nthem to reveal 20 bytes at a time of uninitialized memory from the node.js process.\n\nHere's\n[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8)\nthat fixed it. We released a new fixed version, created a\n[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all\nvulnerable versions on npm so users will get a warning to upgrade to a newer version.\n\n#### [`ws`](https://www.npmjs.com/package/ws)\n\nThat got us wondering if there were other vulnerable packages. Sure enough, within a short\nperiod of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the\nmost popular WebSocket implementation in node.js.\n\nIf certain APIs were called with `Number` parameters instead of `String` or `Buffer` as\nexpected, then uninitialized server memory would be disclosed to the remote peer.\n\nThese were the vulnerable methods:\n\n```js\nsocket.send(number)\nsocket.ping(number)\nsocket.pong(number)\n```\n\nHere's a vulnerable socket server with some echo functionality:\n\n```js\nserver.on('connection', function (socket) {\n socket.on('message', function (message) {\n message = JSON.parse(message)\n if (message.type === 'echo') {\n socket.send(message.data) // send back the user's message\n }\n })\n})\n```\n\n`socket.send(number)` called on the server, will disclose server memory.\n\nHere's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue\nwas fixed, with a more detailed explanation. Props to\n[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the\n[Node Security Project disclosure](https://nodesecurity.io/advisories/67).\n\n\n### What's the solution?\n\nIt's important that node.js offers a fast way to get memory otherwise performance-critical\napplications would needlessly get a lot slower.\n\nBut we need a better way to *signal our intent* as programmers. **When we want\nuninitialized memory, we should request it explicitly.**\n\nSensitive functionality should not be packed into a developer-friendly API that loosely\naccepts many different types. This type of API encourages the lazy practice of passing\nvariables in without checking the type very carefully.\n\n#### A new API: `Buffer.allocUnsafe(number)`\n\nThe functionality of creating buffers with uninitialized memory should be part of another\nAPI. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that\nfrequently gets user input of all sorts of different types passed into it.\n\n```js\nvar buf = Buffer.allocUnsafe(16) // careful, uninitialized memory!\n\n// Immediately overwrite the uninitialized buffer with data from another buffer\nfor (var i = 0; i < buf.length; i++) {\n buf[i] = otherBuf[i]\n}\n```\n\n\n### How do we fix node.js core?\n\nWe sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as\n`semver-major`) which defends against one case:\n\n```js\nvar str = 16\nnew Buffer(str, 'utf8')\n```\n\nIn this situation, it's implied that the programmer intended the first argument to be a\nstring, since they passed an encoding as a second argument. Today, node.js will allocate\nuninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not\nwhat the programmer intended.\n\nBut this is only a partial solution, since if the programmer does `new Buffer(variable)`\n(without an `encoding` parameter) there's no way to know what they intended. If `variable`\nis sometimes a number, then uninitialized memory will sometimes be returned.\n\n### What's the real long-term fix?\n\nWe could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when\nwe need uninitialized memory. But that would break 1000s of packages.\n\n~~We believe the best solution is to:~~\n\n~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~\n\n~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~\n\n#### Update\n\nWe now support adding three new APIs:\n\n- `Buffer.from(value)` - convert from any type to a buffer\n- `Buffer.alloc(size)` - create a zero-filled buffer\n- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size\n\nThis solves the core problem that affected `ws` and `bittorrent-dht` which is\n`Buffer(variable)` getting tricked into taking a number argument.\n\nThis way, existing code continues working and the impact on the npm ecosystem will be\nminimal. Over time, npm maintainers can migrate performance-critical code to use\n`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`.\n\n\n### Conclusion\n\nWe think there's a serious design issue with the `Buffer` API as it exists today. It\npromotes insecure software by putting high-risk functionality into a convenient API\nwith friendly \"developer ergonomics\".\n\nThis wasn't merely a theoretical exercise because we found the issue in some of the\nmost popular npm packages.\n\nFortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of\n`buffer`.\n\n```js\nvar Buffer = require('safe-buffer').Buffer\n```\n\nEventually, we hope that node.js core can switch to this new, safer behavior. We believe\nthe impact on the ecosystem would be minimal since it's not a breaking change.\nWell-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while\nolder, insecure packages would magically become safe from this attack vector.\n\n\n## links\n\n- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514)\n- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67)\n- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68)\n\n\n## credit\n\nThe original issues in `bittorrent-dht`\n([disclosure](https://nodesecurity.io/advisories/68)) and\n`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by\n[Mathias Buus](https://github.com/mafintosh) and\n[Feross Aboukhadijeh](http://feross.org/).\n\nThanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues\nand for his work running the [Node Security Project](https://nodesecurity.io/).\n\nThanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and\nauditing the code.\n\n\n## license\n\nMIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org)\n", - "readmeFilename": "README.md", - "_id": "safe-buffer@5.1.2", - "_requested": { - "type": "version", - "registry": true, - "raw": "safe-buffer@5.1.2", - "name": "safe-buffer", - "escapedName": "safe-buffer", - "rawSpec": "5.1.2", - "saveSpec": "[Circular]", - "fetchSpec": "5.1.2" - }, - "_spec": "5.1.2", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "safe-buffer@5.1.2", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/safe-buffer", - "error": "[Circular]", - "extraneous": false - }, - "string_decoder": { - "name": "string_decoder", - "version": "1.1.1", - "description": "The string_decoder module from Node core", - "main": "lib/string_decoder.js", - "dependencies": { - "safe-buffer": { - "name": "safe-buffer", - "description": "Safer Node.js Buffer API", - "version": "5.1.2", - "author": "[Circular]", - "bugs": "[Circular]", - "devDependencies": "[Circular]", - "homepage": "https://github.com/feross/safe-buffer", - "keywords": "[Circular]", - "license": "MIT", - "main": "index.js", - "types": "index.d.ts", - "repository": "[Circular]", - "scripts": "[Circular]", - "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "_integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "_from": "safe-buffer@5.1.2", - "readme": "# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]\n\n[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg\n[travis-url]: https://travis-ci.org/feross/safe-buffer\n[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg\n[npm-url]: https://npmjs.org/package/safe-buffer\n[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg\n[downloads-url]: https://npmjs.org/package/safe-buffer\n[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg\n[standard-url]: https://standardjs.com\n\n#### Safer Node.js Buffer API\n\n**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`,\n`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.**\n\n**Uses the built-in implementation when available.**\n\n## install\n\n```\nnpm install safe-buffer\n```\n\n## usage\n\nThe goal of this package is to provide a safe replacement for the node.js `Buffer`.\n\nIt's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to\nthe top of your node.js modules:\n\n```js\nvar Buffer = require('safe-buffer').Buffer\n\n// Existing buffer code will continue to work without issues:\n\nnew Buffer('hey', 'utf8')\nnew Buffer([1, 2, 3], 'utf8')\nnew Buffer(obj)\nnew Buffer(16) // create an uninitialized buffer (potentially unsafe)\n\n// But you can use these new explicit APIs to make clear what you want:\n\nBuffer.from('hey', 'utf8') // convert from many types to a Buffer\nBuffer.alloc(16) // create a zero-filled buffer (safe)\nBuffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe)\n```\n\n## api\n\n### Class Method: Buffer.from(array)\n\n\n* `array` {Array}\n\nAllocates a new `Buffer` using an `array` of octets.\n\n```js\nconst buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]);\n // creates a new Buffer containing ASCII bytes\n // ['b','u','f','f','e','r']\n```\n\nA `TypeError` will be thrown if `array` is not an `Array`.\n\n### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]])\n\n\n* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or\n a `new ArrayBuffer()`\n* `byteOffset` {Number} Default: `0`\n* `length` {Number} Default: `arrayBuffer.length - byteOffset`\n\nWhen passed a reference to the `.buffer` property of a `TypedArray` instance,\nthe newly created `Buffer` will share the same allocated memory as the\nTypedArray.\n\n```js\nconst arr = new Uint16Array(2);\narr[0] = 5000;\narr[1] = 4000;\n\nconst buf = Buffer.from(arr.buffer); // shares the memory with arr;\n\nconsole.log(buf);\n // Prints: \n\n// changing the TypedArray changes the Buffer also\narr[1] = 6000;\n\nconsole.log(buf);\n // Prints: \n```\n\nThe optional `byteOffset` and `length` arguments specify a memory range within\nthe `arrayBuffer` that will be shared by the `Buffer`.\n\n```js\nconst ab = new ArrayBuffer(10);\nconst buf = Buffer.from(ab, 0, 2);\nconsole.log(buf.length);\n // Prints: 2\n```\n\nA `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`.\n\n### Class Method: Buffer.from(buffer)\n\n\n* `buffer` {Buffer}\n\nCopies the passed `buffer` data onto a new `Buffer` instance.\n\n```js\nconst buf1 = Buffer.from('buffer');\nconst buf2 = Buffer.from(buf1);\n\nbuf1[0] = 0x61;\nconsole.log(buf1.toString());\n // 'auffer'\nconsole.log(buf2.toString());\n // 'buffer' (copy is not changed)\n```\n\nA `TypeError` will be thrown if `buffer` is not a `Buffer`.\n\n### Class Method: Buffer.from(str[, encoding])\n\n\n* `str` {String} String to encode.\n* `encoding` {String} Encoding to use, Default: `'utf8'`\n\nCreates a new `Buffer` containing the given JavaScript string `str`. If\nprovided, the `encoding` parameter identifies the character encoding.\nIf not provided, `encoding` defaults to `'utf8'`.\n\n```js\nconst buf1 = Buffer.from('this is a tést');\nconsole.log(buf1.toString());\n // prints: this is a tést\nconsole.log(buf1.toString('ascii'));\n // prints: this is a tC)st\n\nconst buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');\nconsole.log(buf2.toString());\n // prints: this is a tést\n```\n\nA `TypeError` will be thrown if `str` is not a string.\n\n### Class Method: Buffer.alloc(size[, fill[, encoding]])\n\n\n* `size` {Number}\n* `fill` {Value} Default: `undefined`\n* `encoding` {String} Default: `utf8`\n\nAllocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the\n`Buffer` will be *zero-filled*.\n\n```js\nconst buf = Buffer.alloc(5);\nconsole.log(buf);\n // \n```\n\nThe `size` must be less than or equal to the value of\n`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is\n`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will\nbe created if a `size` less than or equal to 0 is specified.\n\nIf `fill` is specified, the allocated `Buffer` will be initialized by calling\n`buf.fill(fill)`. See [`buf.fill()`][] for more information.\n\n```js\nconst buf = Buffer.alloc(5, 'a');\nconsole.log(buf);\n // \n```\n\nIf both `fill` and `encoding` are specified, the allocated `Buffer` will be\ninitialized by calling `buf.fill(fill, encoding)`. For example:\n\n```js\nconst buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');\nconsole.log(buf);\n // \n```\n\nCalling `Buffer.alloc(size)` can be significantly slower than the alternative\n`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance\ncontents will *never contain sensitive data*.\n\nA `TypeError` will be thrown if `size` is not a number.\n\n### Class Method: Buffer.allocUnsafe(size)\n\n\n* `size` {Number}\n\nAllocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must\nbe less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit\narchitectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is\nthrown. A zero-length Buffer will be created if a `size` less than or equal to\n0 is specified.\n\nThe underlying memory for `Buffer` instances created in this way is *not\ninitialized*. The contents of the newly created `Buffer` are unknown and\n*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such\n`Buffer` instances to zeroes.\n\n```js\nconst buf = Buffer.allocUnsafe(5);\nconsole.log(buf);\n // \n // (octets will be different, every time)\nbuf.fill(0);\nconsole.log(buf);\n // \n```\n\nA `TypeError` will be thrown if `size` is not a number.\n\nNote that the `Buffer` module pre-allocates an internal `Buffer` instance of\nsize `Buffer.poolSize` that is used as a pool for the fast allocation of new\n`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated\n`new Buffer(size)` constructor) only when `size` is less than or equal to\n`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default\nvalue of `Buffer.poolSize` is `8192` but can be modified.\n\nUse of this pre-allocated internal memory pool is a key difference between\ncalling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.\nSpecifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer\npool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal\nBuffer pool if `size` is less than or equal to half `Buffer.poolSize`. The\ndifference is subtle but can be important when an application requires the\nadditional performance that `Buffer.allocUnsafe(size)` provides.\n\n### Class Method: Buffer.allocUnsafeSlow(size)\n\n\n* `size` {Number}\n\nAllocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The\n`size` must be less than or equal to the value of\n`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is\n`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will\nbe created if a `size` less than or equal to 0 is specified.\n\nThe underlying memory for `Buffer` instances created in this way is *not\ninitialized*. The contents of the newly created `Buffer` are unknown and\n*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such\n`Buffer` instances to zeroes.\n\nWhen using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,\nallocations under 4KB are, by default, sliced from a single pre-allocated\n`Buffer`. This allows applications to avoid the garbage collection overhead of\ncreating many individually allocated Buffers. This approach improves both\nperformance and memory usage by eliminating the need to track and cleanup as\nmany `Persistent` objects.\n\nHowever, in the case where a developer may need to retain a small chunk of\nmemory from a pool for an indeterminate amount of time, it may be appropriate\nto create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then\ncopy out the relevant bits.\n\n```js\n// need to keep around a few small chunks of memory\nconst store = [];\n\nsocket.on('readable', () => {\n const data = socket.read();\n // allocate for retained data\n const sb = Buffer.allocUnsafeSlow(10);\n // copy the data into the new allocation\n data.copy(sb, 0, 0, 10);\n store.push(sb);\n});\n```\n\nUse of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after*\na developer has observed undue memory retention in their applications.\n\nA `TypeError` will be thrown if `size` is not a number.\n\n### All the Rest\n\nThe rest of the `Buffer` API is exactly the same as in node.js.\n[See the docs](https://nodejs.org/api/buffer.html).\n\n\n## Related links\n\n- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660)\n- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4)\n\n## Why is `Buffer` unsafe?\n\nToday, the node.js `Buffer` constructor is overloaded to handle many different argument\ntypes like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.),\n`ArrayBuffer`, and also `Number`.\n\nThe API is optimized for convenience: you can throw any type at it, and it will try to do\nwhat you want.\n\nBecause the Buffer constructor is so powerful, you often see code like this:\n\n```js\n// Convert UTF-8 strings to hex\nfunction toHex (str) {\n return new Buffer(str).toString('hex')\n}\n```\n\n***But what happens if `toHex` is called with a `Number` argument?***\n\n### Remote Memory Disclosure\n\nIf an attacker can make your program call the `Buffer` constructor with a `Number`\nargument, then they can make it allocate uninitialized memory from the node.js process.\nThis could potentially disclose TLS private keys, user data, or database passwords.\n\nWhen the `Buffer` constructor is passed a `Number` argument, it returns an\n**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like\nthis, you **MUST** overwrite the contents before returning it to the user.\n\nFrom the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size):\n\n> `new Buffer(size)`\n>\n> - `size` Number\n>\n> The underlying memory for `Buffer` instances created in this way is not initialized.\n> **The contents of a newly created `Buffer` are unknown and could contain sensitive\n> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes.\n\n(Emphasis our own.)\n\nWhenever the programmer intended to create an uninitialized `Buffer` you often see code\nlike this:\n\n```js\nvar buf = new Buffer(16)\n\n// Immediately overwrite the uninitialized buffer with data from another buffer\nfor (var i = 0; i < buf.length; i++) {\n buf[i] = otherBuf[i]\n}\n```\n\n\n### Would this ever be a problem in real code?\n\nYes. It's surprisingly common to forget to check the type of your variables in a\ndynamically-typed language like JavaScript.\n\nUsually the consequences of assuming the wrong type is that your program crashes with an\nuncaught exception. But the failure mode for forgetting to check the type of arguments to\nthe `Buffer` constructor is more catastrophic.\n\nHere's an example of a vulnerable service that takes a JSON payload and converts it to\nhex:\n\n```js\n// Take a JSON payload {str: \"some string\"} and convert it to hex\nvar server = http.createServer(function (req, res) {\n var data = ''\n req.setEncoding('utf8')\n req.on('data', function (chunk) {\n data += chunk\n })\n req.on('end', function () {\n var body = JSON.parse(data)\n res.end(new Buffer(body.str).toString('hex'))\n })\n})\n\nserver.listen(8080)\n```\n\nIn this example, an http client just has to send:\n\n```json\n{\n \"str\": 1000\n}\n```\n\nand it will get back 1,000 bytes of uninitialized memory from the server.\n\nThis is a very serious bug. It's similar in severity to the\n[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process\nmemory by remote attackers.\n\n\n### Which real-world packages were vulnerable?\n\n#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht)\n\n[Mathias Buus](https://github.com/mafintosh) and I\n([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages,\n[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow\nanyone on the internet to send a series of messages to a user of `bittorrent-dht` and get\nthem to reveal 20 bytes at a time of uninitialized memory from the node.js process.\n\nHere's\n[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8)\nthat fixed it. We released a new fixed version, created a\n[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all\nvulnerable versions on npm so users will get a warning to upgrade to a newer version.\n\n#### [`ws`](https://www.npmjs.com/package/ws)\n\nThat got us wondering if there were other vulnerable packages. Sure enough, within a short\nperiod of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the\nmost popular WebSocket implementation in node.js.\n\nIf certain APIs were called with `Number` parameters instead of `String` or `Buffer` as\nexpected, then uninitialized server memory would be disclosed to the remote peer.\n\nThese were the vulnerable methods:\n\n```js\nsocket.send(number)\nsocket.ping(number)\nsocket.pong(number)\n```\n\nHere's a vulnerable socket server with some echo functionality:\n\n```js\nserver.on('connection', function (socket) {\n socket.on('message', function (message) {\n message = JSON.parse(message)\n if (message.type === 'echo') {\n socket.send(message.data) // send back the user's message\n }\n })\n})\n```\n\n`socket.send(number)` called on the server, will disclose server memory.\n\nHere's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue\nwas fixed, with a more detailed explanation. Props to\n[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the\n[Node Security Project disclosure](https://nodesecurity.io/advisories/67).\n\n\n### What's the solution?\n\nIt's important that node.js offers a fast way to get memory otherwise performance-critical\napplications would needlessly get a lot slower.\n\nBut we need a better way to *signal our intent* as programmers. **When we want\nuninitialized memory, we should request it explicitly.**\n\nSensitive functionality should not be packed into a developer-friendly API that loosely\naccepts many different types. This type of API encourages the lazy practice of passing\nvariables in without checking the type very carefully.\n\n#### A new API: `Buffer.allocUnsafe(number)`\n\nThe functionality of creating buffers with uninitialized memory should be part of another\nAPI. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that\nfrequently gets user input of all sorts of different types passed into it.\n\n```js\nvar buf = Buffer.allocUnsafe(16) // careful, uninitialized memory!\n\n// Immediately overwrite the uninitialized buffer with data from another buffer\nfor (var i = 0; i < buf.length; i++) {\n buf[i] = otherBuf[i]\n}\n```\n\n\n### How do we fix node.js core?\n\nWe sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as\n`semver-major`) which defends against one case:\n\n```js\nvar str = 16\nnew Buffer(str, 'utf8')\n```\n\nIn this situation, it's implied that the programmer intended the first argument to be a\nstring, since they passed an encoding as a second argument. Today, node.js will allocate\nuninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not\nwhat the programmer intended.\n\nBut this is only a partial solution, since if the programmer does `new Buffer(variable)`\n(without an `encoding` parameter) there's no way to know what they intended. If `variable`\nis sometimes a number, then uninitialized memory will sometimes be returned.\n\n### What's the real long-term fix?\n\nWe could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when\nwe need uninitialized memory. But that would break 1000s of packages.\n\n~~We believe the best solution is to:~~\n\n~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~\n\n~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~\n\n#### Update\n\nWe now support adding three new APIs:\n\n- `Buffer.from(value)` - convert from any type to a buffer\n- `Buffer.alloc(size)` - create a zero-filled buffer\n- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size\n\nThis solves the core problem that affected `ws` and `bittorrent-dht` which is\n`Buffer(variable)` getting tricked into taking a number argument.\n\nThis way, existing code continues working and the impact on the npm ecosystem will be\nminimal. Over time, npm maintainers can migrate performance-critical code to use\n`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`.\n\n\n### Conclusion\n\nWe think there's a serious design issue with the `Buffer` API as it exists today. It\npromotes insecure software by putting high-risk functionality into a convenient API\nwith friendly \"developer ergonomics\".\n\nThis wasn't merely a theoretical exercise because we found the issue in some of the\nmost popular npm packages.\n\nFortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of\n`buffer`.\n\n```js\nvar Buffer = require('safe-buffer').Buffer\n```\n\nEventually, we hope that node.js core can switch to this new, safer behavior. We believe\nthe impact on the ecosystem would be minimal since it's not a breaking change.\nWell-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while\nolder, insecure packages would magically become safe from this attack vector.\n\n\n## links\n\n- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514)\n- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67)\n- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68)\n\n\n## credit\n\nThe original issues in `bittorrent-dht`\n([disclosure](https://nodesecurity.io/advisories/68)) and\n`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by\n[Mathias Buus](https://github.com/mafintosh) and\n[Feross Aboukhadijeh](http://feross.org/).\n\nThanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues\nand for his work running the [Node Security Project](https://nodesecurity.io/).\n\nThanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and\nauditing the code.\n\n\n## license\n\nMIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org)\n", - "readmeFilename": "README.md", - "_id": "safe-buffer@5.1.2", - "_requested": { - "type": "version", - "registry": true, - "raw": "safe-buffer@5.1.2", - "name": "safe-buffer", - "escapedName": "safe-buffer", - "rawSpec": "5.1.2", - "saveSpec": "[Circular]", - "fetchSpec": "5.1.2" - }, - "_spec": "5.1.2", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": "[Circular]", - "dependencies": {}, - "optionalDependencies": "[Circular]", - "_dependencies": "[Circular]", - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/safe-buffer", - "error": "[Circular]", - "extraneous": false, - "_deduped": "safe-buffer" - } - }, - "devDependencies": { - "babel-polyfill": "^6.23.0", - "core-util-is": "^1.0.2", - "inherits": "^2.0.3", - "tap": "~0.4.8" - }, - "scripts": { - "test": "tap test/parallel/*.js && node test/verify-dependencies", - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/string_decoder.git" - }, - "homepage": "https://github.com/nodejs/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "_from": "string_decoder@1.1.1", - "readme": "# string_decoder\n\n***Node-core v8.9.4 string_decoder for userland***\n\n\n[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/)\n[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/)\n\n\n```bash\nnpm install --save string_decoder\n```\n\n***Node-core string_decoder for userland***\n\nThis package is a mirror of the string_decoder implementation in Node-core.\n\nFull documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/).\n\nAs of version 1.0.0 **string_decoder** uses semantic versioning.\n\n## Previous versions\n\nPrevious version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10.\n\n## Update\n\nThe *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version.\n\n## Streams Working Group\n\n`string_decoder` is maintained by the Streams Working Group, which\noversees the development and maintenance of the Streams API within\nNode.js. The responsibilities of the Streams Working Group include:\n\n* Addressing stream issues on the Node.js issue tracker.\n* Authoring and editing stream documentation within the Node.js project.\n* Reviewing changes to stream subclasses within the Node.js project.\n* Redirecting changes to streams from the Node.js project to this\n project.\n* Assisting in the implementation of stream providers within Node.js.\n* Recommending versions of `readable-stream` to be included in Node.js.\n* Messaging about the future of streams to give the community advance\n notice of changes.\n\nSee [readable-stream](https://github.com/nodejs/readable-stream) for\nmore details.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/nodejs/string_decoder/issues" - }, - "_id": "string_decoder@1.1.1", - "_requested": { - "type": "version", - "registry": true, - "raw": "string_decoder@1.1.1", - "name": "string_decoder", - "escapedName": "string_decoder", - "rawSpec": "1.1.1", - "saveSpec": "[Circular]", - "fetchSpec": "1.1.1" - }, - "_spec": "1.1.1", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "string_decoder@1.1.1", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": { - "safe-buffer": "~5.1.0" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/string_decoder", - "error": "[Circular]", - "extraneous": false - }, - "util-deprecate": { - "name": "util-deprecate", - "version": "1.0.2", - "description": "The Node.js `util.deprecate()` function with browser support", - "main": "node.js", - "browser": "browser.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/util-deprecate.git" - }, - "keywords": [ - "util", - "deprecate", - "browserify", - "browser", - "node" - ], - "author": { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io/" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/TooTallNate/util-deprecate/issues" - }, - "homepage": "https://github.com/TooTallNate/util-deprecate", - "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "_integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "_from": "util-deprecate@1.0.2", - "readme": "util-deprecate\n==============\n### The Node.js `util.deprecate()` function with browser support\n\nIn Node.js, this module simply re-exports the `util.deprecate()` function.\n\nIn the web browser (i.e. via browserify), a browser-specific implementation\nof the `util.deprecate()` function is used.\n\n\n## API\n\nA `deprecate()` function is the only thing exposed by this module.\n\n``` javascript\n// setup:\nexports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead');\n\n\n// users see:\nfoo();\n// foo() is deprecated, use bar() instead\nfoo();\nfoo();\n```\n\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2014 Nathan Rajlich \n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "README.md", - "_id": "util-deprecate@1.0.2", - "_requested": { - "type": "version", - "registry": true, - "raw": "util-deprecate@1.0.2", - "name": "util-deprecate", - "escapedName": "util-deprecate", - "rawSpec": "1.0.2", - "saveSpec": "[Circular]", - "fetchSpec": "1.0.2" - }, - "_spec": "1.0.2", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "util-deprecate@1.0.2", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/util-deprecate", - "error": "[Circular]", - "extraneous": false - } - }, - "devDependencies": { - "assert": "^1.4.0", - "babel-polyfill": "^6.9.1", - "buffer": "^4.9.0", - "lolex": "^2.3.2", - "nyc": "^6.4.0", - "tap": "^0.7.0", - "tape": "^4.8.0" - }, - "scripts": { - "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js", - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "cover": "nyc npm test", - "report": "nyc report --reporter=lcov" - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "keywords": [ - "readable", - "stream", - "pipe" - ], - "browser": { - "util": false, - "./readable.js": "./readable-browser.js", - "./writable.js": "./writable-browser.js", - "./duplex.js": "./duplex-browser.js", - "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" - }, - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "license": "MIT", - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "_integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "_from": "readable-stream@2.3.6", - "readme": "# readable-stream\n\n***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)\n\n\n[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)\n[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)\n\n\n[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)\n\n```bash\nnpm install --save readable-stream\n```\n\n***Node-core streams for userland***\n\nThis package is a mirror of the Streams2 and Streams3 implementations in\nNode-core.\n\nFull documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html).\n\nIf you want to guarantee a stable streams base, regardless of what version of\nNode you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *\"stream\"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).\n\nAs of version 2.0.0 **readable-stream** uses semantic versioning.\n\n# Streams Working Group\n\n`readable-stream` is maintained by the Streams Working Group, which\noversees the development and maintenance of the Streams API within\nNode.js. The responsibilities of the Streams Working Group include:\n\n* Addressing stream issues on the Node.js issue tracker.\n* Authoring and editing stream documentation within the Node.js project.\n* Reviewing changes to stream subclasses within the Node.js project.\n* Redirecting changes to streams from the Node.js project to this\n project.\n* Assisting in the implementation of stream providers within Node.js.\n* Recommending versions of `readable-stream` to be included in Node.js.\n* Messaging about the future of streams to give the community advance\n notice of changes.\n\n\n## Team Members\n\n* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com>\n - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B\n* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com>\n - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242\n* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org>\n - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D\n* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com>\n* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com>\n* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me>\n* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com>\n - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E\n* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com>\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "homepage": "https://github.com/nodejs/readable-stream#readme", - "_id": "readable-stream@2.3.6", - "_requested": { - "type": "version", - "registry": true, - "raw": "readable-stream@2.3.6", - "name": "readable-stream", - "escapedName": "readable-stream", - "rawSpec": "2.3.6", - "saveSpec": "[Circular]", - "fetchSpec": "2.3.6" - }, - "_spec": "2.3.6", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "readable-stream@2.3.6", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/readable-stream", - "error": "[Circular]", - "extraneous": false - } - }, - "devDependencies": { - "Base64": "^1.0.1", - "basic-auth-connect": "^1.0.0", - "body-parser": "^1.18.2", - "browserify": "^14.1.0", - "cookie-parser": "^1.4.3", - "express": "^4.16.0", - "express-session": "^1.15.6", - "marked": "^0.3.6", - "mocha": "^3.5.3", - "multer": "^1.3.0", - "should": "^11.2.0", - "should-http": "^0.1.1", - "zuul": "^3.11.1" - }, - "browser": { - "./lib/node/index.js": "./lib/client.js", - "./test/support/server.js": "./test/support/blank.js" - }, - "component": { - "scripts": { - "superagent": "lib/client.js" - } - }, - "main": "./lib/node/index.js", - "engines": { - "node": ">= 4.0" - }, - "_resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.2.tgz", - "_integrity": "sha512-gVH4QfYHcY3P0f/BZzavLreHW3T1v7hG9B+hpMQotGQqurOvhv87GcMCd6LWySmBuf+BDR44TQd0aISjVHLeNQ==", - "_from": "superagent@3.8.2", - "readme": "# SuperAgent [![Build Status](https://travis-ci.org/visionmedia/superagent.svg?branch=master)](https://travis-ci.org/visionmedia/superagent)\n\n[![Sauce Test Status](https://saucelabs.com/browser-matrix/shtylman-superagent.svg)](https://saucelabs.com/u/shtylman-superagent)\n\nSuperAgent is a small progressive __client-side__ HTTP request library, and __Node.js__ module with the same API, sporting many high-level HTTP client features. View the [docs](http://visionmedia.github.io/superagent/).\n\n![super agent](http://f.cl.ly/items/3d282n3A0h0Z0K2w0q2a/Screenshot.png)\n\n## Installation\n\nnode:\n\n```\n$ npm install superagent\n```\n\nWorks with [browserify](https://github.com/substack/node-browserify) and [webpack](https://github.com/visionmedia/superagent/wiki/SuperAgent-for-Webpack).\n\n```js\nrequest\n .post('/api/pet')\n .send({ name: 'Manny', species: 'cat' }) // sends a JSON post body\n .set('X-API-Key', 'foobar')\n .set('accept', 'json')\n .end((err, res) => {\n // Calling the end function will send the request\n });\n```\n\n## Supported browsers and Node versions\n\nTested browsers:\n\n- Latest Firefox, Chrome, Safari\n- Latest Android, iPhone\n- IE10 through latest. IE9 with polyfills. Even though IE9 is supported, a polyfill for `window.FormData` is required for `.field()`.\n\nNode 4 or later is required.\n\n## Plugins\n\nSuperAgent is easily extended via plugins.\n\n```js\nconst nocache = require('superagent-no-cache');\nconst request = require('superagent');\nconst prefix = require('superagent-prefix')('/static');\n\nrequest\n .get('/some-url')\n .query({ action: 'edit', city: 'London' }) // query string\n .use(prefix) // Prefixes *only* this request\n .use(nocache) // Prevents caching of *only* this request\n .end((err, res) => {\n // Do something\n });\n```\n\nExisting plugins:\n * [superagent-no-cache](https://github.com/johntron/superagent-no-cache) - prevents caching by including Cache-Control header\n * [superagent-prefix](https://github.com/johntron/superagent-prefix) - prefixes absolute URLs (useful in test environment)\n * [superagent-suffix](https://github.com/timneutkens1/superagent-suffix) - suffix URLs with a given path\n * [superagent-mock](https://github.com/M6Web/superagent-mock) - simulate HTTP calls by returning data fixtures based on the requested URL\n * [superagent-mocker](https://github.com/shuvalov-anton/superagent-mocker) — simulate REST API\n * [superagent-cache](https://github.com/jpodwys/superagent-cache) - A global SuperAgent patch with built-in, flexible caching\n * [superagent-cache-plugin](https://github.com/jpodwys/superagent-cache-plugin) - A SuperAgent plugin with built-in, flexible caching\n * [superagent-jsonapify](https://github.com/alex94puchades/superagent-jsonapify) - A lightweight [json-api](http://jsonapi.org/format/) client addon for superagent\n * [superagent-serializer](https://github.com/zzarcon/superagent-serializer) - Converts server payload into different cases\n * [superagent-use](https://github.com/koenpunt/superagent-use) - A client addon to apply plugins to all requests.\n * [superagent-httpbackend](https://www.npmjs.com/package/superagent-httpbackend) - stub out requests using AngularJS' $httpBackend syntax\n * [superagent-throttle](https://github.com/leviwheatcroft/superagent-throttle) - queues and intelligently throttles requests\n * [superagent-charset](https://github.com/magicdawn/superagent-charset) - add charset support for node's SuperAgent\n\nPlease prefix your plugin with `superagent-*` so that it can easily be found by others.\n\nFor SuperAgent extensions such as couchdb and oauth visit the [wiki](https://github.com/visionmedia/superagent/wiki).\n\n## Upgrading from previous versions:\n\nOur breaking changes are mostly in rarely used functionality and from stricter error handling.\n\n* [2.x to 3.x](https://github.com/visionmedia/superagent/releases/tag/v3.0.0):\n - Ensure you're running Node 4 or later. We dropped support for Node 0.x.\n - Test code that calls `.send()` multiple times. Invalid calls to `.send()` will now throw instead of sending garbage.\n* [1.x to 2.x](https://github.com/visionmedia/superagent/releases/tag/v2.0.0):\n - If you use `.parse()` in the *browser* version, rename it to `.serialize()`.\n - If you rely on `undefined` in query-string values being sent literally as the text \"undefined\", switch to checking for missing value instead. `?key=undefined` is now `?key` (without a value).\n - If you use `.then()` in Internet Explorer, ensure that you have a polyfill that adds a global `Promise` object.\n* 0.x to 1.x:\n - Use `.end(function(err, res){})`. 1-argument version is no longer supported.\n\n## Running node tests\n\nInstall dependencies:\n\n```shell\n$ npm install\n```\nRun em!\n\n```shell\n$ make test\n```\n\n## Running browser tests\n\nInstall dependencies:\n\n```shell\n$ npm install\n```\n\nStart the test runner:\n\n```shell\n$ make test-browser-local\n```\n\nVisit `http://localhost:4000/__zuul` in your browser.\n\nEdit tests and refresh your browser. You do not have to restart the test runner.\n\n\n## Packaging Notes for Developers\n\n**npm (for node)** is configured via the `package.json` file and the `.npmignore` file. Key metadata in the `package.json` file is the `version` field which should be changed according to semantic versioning and have a 1-1 correspondence with git tags. So for example, if you were to `git show v1.5.0:package.json | grep version`, you should see `\"version\": \"1.5.0\",` and this should hold true for every release. This can be handled via the `npm version` command. Be aware that when publishing, npm will presume the version being published should also be tagged in npm as `latest`, which is OK for normal incremental releases. For betas and minor/patch releases to older versions, be sure to include `--tag` appropriately to avoid an older release getting tagged as `latest`.\n\n**npm (for browser standalone)** When we publish versions to npm, we run `make superagent.js` which generates the standalone `superagent.js` file via `browserify`, and this file is included in the package published to npm (but this file is never checked into the git repository). If users want to install via npm but serve a single `.js` file directly to the browser, the `node_modules/superagent/superagent.js` is a standalone browserified file ready to go for that purpose. It is not minified.\n\n**npm (for browserify)** is handled via the `package.json` `browser` field which allows users to install SuperAgent via npm, reference it from their browser code with `require('superagent')`, and then build their own application bundle via `browserify`, which will use `lib/client.js` as the SuperAgent entrypoint.\n\n**bower** is configured via the `bower.json` file. Bower installs files directly from git/github without any transformation, so you *must* use Browserify or Webpack (or use npm).\n\n## License\n\nMIT\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/superagent/issues" - }, - "homepage": "https://github.com/visionmedia/superagent#readme", - "_id": "superagent@3.8.2", - "_requested": { - "type": "version", - "registry": true, - "raw": "superagent@3.8.2", - "name": "superagent", - "escapedName": "superagent", - "rawSpec": "3.8.2", - "saveSpec": "[Circular]", - "fetchSpec": "3.8.2" - }, - "_spec": "3.8.2", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "superagent@3.8.2", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": { - "component-emitter": "^1.2.0", - "cookiejar": "^2.1.0", - "debug": "^3.1.0", - "extend": "^3.0.0", - "form-data": "^2.3.1", - "formidable": "^1.1.1", - "methods": "^1.1.1", - "mime": "^1.4.1", - "qs": "^6.5.1", - "readable-stream": "^2.0.5" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/superagent", - "error": "[Circular]", - "extraneous": false - } - }, - "description": "JavaScript client library for the Alfresco REST API", - "devDependencies": { - "babel-loader": "^7.0.0", - "babel-plugin-transform-proto-to-assign": "^6.9.0", - "babel-preset-es2015": "^6.24.1", - "babel-preset-es2015-loose": "^8.0.0", - "babel-preset-es2015-rollup": "^3.0.0", - "babelify": "^7.3.0", - "chai": "^3.5.0", - "chai-datetime": "^1.4.1", - "expect.js": "~0.3.1", - "grunt": "~0.4.0", - "grunt-cli": "^1.1.0", - "grunt-contrib-jshint": "^1.0.0", - "grunt-coveralls": "^1.0.0", - "grunt-istanbul": "^0.7.0", - "grunt-jscs": "^2.8.0", - "grunt-mocha-istanbul": "^3.0.1", - "grunt-mocha-test": "0.13.3", - "grunt-open": "^0.2.3", - "load-grunt-tasks": "^3.4.1", - "markdown-toc": "^0.12.14", - "mocha": "5.2.0", - "mocha-lcov-reporter": "^1.2.0", - "nock": "8.1.0", - "remove-comments-loader": "0.1.2", - "rimraf": "^2.5.2", - "sinon": "^1.17.3", - "sinon-chai": "^2.8.0", - "tsd-jsdoc": "^2.0.0-beta.3", - "tslint": "5.7.0", - "typescript": "^2.4.0", - "uglifyjs-webpack-plugin": "^1.2.3", - "watchify": "^3.7.0", - "webpack": "4.1.1", - "webpack-cli": "2.0.12" - }, - "homepage": "https://github.com/Alfresco/alfresco-js-api#readme", - "keywords": [ - "alfresco" - ], - "license": "Apache-2.0", - "main": "dist/alfresco-js-api.js", - "name": "alfresco-js-api", - "repository": { - "type": "git", - "url": "git+https://github.com/Alfresco/alfresco-js-api.git" - }, - "scripts": { - "build": "npm run clean-build && grunt && npm run tslint && npm run test && npm run webpack && npm run toc", - "clean": "rimraf node_modules && npm run clean-build", - "clean-build": "rimraf dist", - "coverage": "grunt coverage", - "generate": "mvn clean generate-sources", - "generate-api": "mvn install", - "generate-ts": "jsdoc -c config.json .", - "prepublish": "npm run webpack", - "test": "grunt test", - "toc": "markdown-toc -i README.md && markdown-toc -i test/mockObjects/README.md", - "tslint": "tslint --type-check -c tslint.json index.d.ts --project tsconfig.json ", - "watchify": "watchify -s AlfrescoApi main.js -o dist/alfresco-js-api.js", - "webpack": "webpack" - }, - "sideEffects": false, - "typings": "index.d.ts", - "version": "2.6.1", - "readme": "# Alfresco JavaScript API Client\n\n\n

\n \n Gitter chat\n \n \n travis Status\n \n \n Coverage Status\n \n \n license\n \n\n

\n\n

\n alfresco\n

\n\nThis project provides a JavaScript client API into the Alfresco REST API and Activiti REST API.\n\n\n\n\n\n- [Full documentation of all the methods of each API](#full-documentation-of-all-the-methods-of-each-api)\n- [Prerequisites](#prerequisites)\n- [Node](#node)\n- [Api Modules complete methods list](#api-modules-complete-methods-list)\n- [Install](#install)\n- [Use](#use)\n + [Import library for node projects](#import-library-for-node-projects)\n + [Import library for browser projects](#import-library-for-browser-projects)\n- [Authentication JS-API](#authentication-js-api)\n * [Login](#login)\n + [Login with Username and Password BPM and ECM](#login-with-username-and-password-bpm-and-ecm)\n - [Example](#example)\n + [Login with Username and Password ECM](#login-with-username-and-password-ecm)\n - [Example](#example-1)\n + [Login with ticket](#login-with-ticket)\n - [Login with ticket ECM](#login-with-ticket-ecm)\n - [Example](#example-2)\n - [Login with ticket ECM/BPM as parameter in the constructor](#login-with-ticket-ecmbpm-as-parameter-in-the-constructor)\n * [Example](#example-3)\n + [Login with Username and Password BPM](#login-with-username-and-password-bpm)\n + [Example](#example-4)\n + [Login with OAUTH2 Alfresco authorization server](#login-with-oauth2-alfresco-authorization-server)\n * [Implicit Flow](#implicit-flow)\n - [oauth2 properties](#oauth2-properties)\n - [Events](#events)\n + [Example](#example-5)\n + [Example skip login form](#example-skip-login-form)\n * [Password Flow](#password-flow)\n + [Example](#example-6)\n + [Example](#example-7)\n * [Logout](#logout)\n + [Example](#example-8)\n * [isLoggedIn](#isloggedin)\n + [Example](#example-9)\n * [Get tickets](#get-tickets)\n * [Events login/logout](#events-loginlogout)\n + [Example](#example-10)\n- [Custom Endpoint](#custom-endpoint)\n * [Example](#example-11)\n- [ECM](#ecm)\n * [Get Node content](#get-node--content)\n + [Example](#example-12)\n * [Get File or Folder Info](#get-file-or-folder-info)\n + [Example](#example-13)\n * [Get Folder Children Info](#get-folder-children-info)\n + [Example](#example-14)\n * [Create Folder](#create-folder)\n + [Example](#example-15)\n + [Example](#example-16)\n * [Upload File](#upload-file)\n + [Example](#example-17)\n * [Events Upload File](#events-upload-file)\n + [Example](#example-18)\n * [Delete File or Folder](#delete-file-or-folder)\n + [Example](#example-19)\n * [Delete File or Folder Permanent](#delete-file-or-folder-permanent)\n + [Example](#example-20)\n * [Get thumbnail Url](#get-thumbnail-url)\n + [Example](#example-21)\n * [Get preview Url](#get-preview-url)\n + [Example](#example-22)\n * [Get content Url](#get-content-url)\n + [Example](#example-23)\n * [Custom web scripts call](#custom-web-scripts-call)\n + [Parameters](#parameters)\n- [BPM](#bpm)\n * [Task Api](#task-api)\n + [List Task](#list-task)\n - [Parameters](#parameters-1)\n - [Example](#example-24)\n + [Get Task](#get-task)\n - [Parameters](#parameters-2)\n - [Example](#example-25)\n + [Filter Task](#filter-task)\n - [Parameters](#parameters-3)\n - [Example](#example-26)\n + [Complete Task](#complete-task)\n - [Parameters](#parameters-4)\n - [Example](#example-27)\n + [Get Task Form](#get-task-form)\n - [Parameters](#parameters-5)\n - [Example](#example-28)\n + [Complete Task Form](#complete-task-form)\n - [Parameters](#parameters-6)\n - [Example](#example-29)\n * [Process Api](#process-api)\n + [Get Process Instances](#get-process-instances)\n - [Parameters](#parameters-7)\n - [Example](#example-30)\n * [Models Api](#models-api)\n + [Get Model](#get-model)\n - [Parameters](#parameters-8)\n - [Example](#example-31)\n * [Report Api](#report-api)\n + [Create default Reports](#create-default-reports)\n - [Parameters](#parameters-9)\n - [Example](#example-32)\n + [Get Reports](#get-reports)\n - [Parameters](#parameters-10)\n - [Example](#example-33)\n + [Report Params](#report-params)\n - [Parameters](#parameters-11)\n - [Example](#example-34)\n * [Report Process Definitions](#report-process-definitions)\n - [Parameters](#parameters-12)\n - [Example](#example-35)\n * [Tasks of process definition](#tasks-of-process-definition)\n - [Parameters](#parameters-13)\n - [Example](#example-36)\n * [Generate reports](#generate-reports)\n - [Parameters](#parameters-14)\n - [Example](#example-37)\n * [Update report details](#update-report-details)\n - [Parameters](#parameters-15)\n - [Example](#example-38)\n * [Export to csv](#export-to-csv)\n - [Parameters](#parameters-16)\n - [Example](#example-39)\n * [Save Report](#save-report)\n - [Parameters](#parameters-17)\n - [Example](#example-40)\n * [Delete report](#delete-report)\n - [Parameters](#parameters-18)\n - [Example](#example-41)\n- [Error Events](#error-events)\n * [Example](#example-42)\n- [Development](#development)\n- [Release History](#release-history)\n\n\n\n\n\n# Full documentation of all the methods of each API\n\n- [Authentication Services](/src/alfresco-auth-rest-api)\n- [Content Services](/src/alfresco-core-rest-api)\n- [Process Services](/src/alfresco-activiti-rest-api)\n- [ContentCMN](/src/alfresco-private-rest-api)\n- [Content Search](/src/alfresco-search-rest-api)\n\n# Prerequisites\n\nTo correctly use the alfresco js api the minimal supported version are:\n\n- 5.2.a-EA Alfresco Platform Repository (version [5.2.a-EA](https://wiki.alfresco.com/wiki/Community_file_list_201606-EA) or newer)\n- 1.5 Activiti\n\n# Node\nTo correctly use the alfresco-js-api in node check that on your machine is running Node version 5.0.0 or higher.\n\n# Api Modules complete methods list\n\n- [Authentication API](/src/alfresco-auth-rest-api)\n- [Core API](/src/alfresco-core-rest-api)\n- [Governance core API](/src/alfresco-gs-core-rest-api)\n- [Governance classification API](/src/alfresco-gs-classification-rest-api)\n- [Discovery API](/src/alfresco-discovery-rest-api)\n- [Search API](/src/alfresco-search-rest-api)\n- [Activiti API](/src/alfresco-activiti-rest-api)\n- [Mock API](/test/mockObjects)\n\n# Install\n\n\nInstaller for browser versions:\n\n```sh\nnpm install --save alfresco-js-api\n```\n\nInstaller for node versions:\n\n```sh\nnpm install --save alfresco-js-api-node\n```\n\n\n# Use\n\n### Import library for node projects\n\n```javascript\nvar AlfrescoApi = require('alfresco-js-api-node');\n```\n\n### Import library for browser projects\n\n```html\n \n\n or for not minify version\n\n \n```\n\n\n# Authentication JS-API\n\n## Login\n\nAlfrescoApi({alfrescoHost, activitiHost, contextRoot, ticket});\n\nProperty | Description | default value|\n------------- | ------------- | -------------|\nhostEcm| (Optional value The Ip or Name of the host where your Alfresco instance is running )|http://127.0.0.1:8080 |\nhostBpm| (Optional value The Ip or Name of the host where your Activiti instance is running )|http://127.0.0.1:9999 |\nauthType| (Optional value can be 'BASIC' or 'OAUTH') | 'BASIC'|\noauth2| (Optional configuration for SSO) ||\ncontextRoot| (Optional value that define the context Root of the Alfresco ECM API default value is alfresco )|alfresco |\ncontextRootBpm| (Optional value that define the context Root of the Activiti API default value is activiti-app )|alfresco |\nprovider| (Optional value default value is ECM. This parameter can accept as value ECM BPM or ALL to use the API and Login in the ECM, Activiti BPM or Both )|alfresco |\nticket| (Optional only if you want login with the ticket see example below)| |\ndisableCsrf| To disable CSRF Token to be submitted. Only for Activiti call.| false |\n\n### Login with Username and Password BPM and ECM\n\n#### Example\n```javascript\nthis.alfrescoJsApi = new AlfrescoApi({ provider:'ALL' });\n\nthis.alfrescoJsApi.login('admin', 'admin').then(function (data) {\n console.log('API called successfully Login in BPM and ECM performed ');\n}, function (error) {\n console.error(error);\n});\n```\n\n\n### Login with Username and Password ECM\n\n#### Example\n```javascript\nthis.alfrescoJsApi = new AlfrescoApi();\n\nthis.alfrescoJsApi.login('admin', 'admin').then(function (data) {\n console.log('API called successfully Login ticket:' + data);\n}, function (error) {\n console.error(error);\n});\n\n//The output will be: API called successfully Login ticket: TICKET_4479f4d3bb155195879bfbb8d5206f433488a1b1\n\n```\n\n### Login with ticket\n\nIf you already know thw ticket when you invoke the constructor you can pass it as parameter in the constructor otherwise you can call the login with ticket that will validate the ticket against the server\n\n\n#### Login with ticket ECM\n\nThis authentication validate also the ticket against the server\n\n#### Example\n```javascript\nvar ticket = 'TICKET_4479f4d3bb155195879bfbb8d5206f433488a1b1';\n\nthis.alfrescoJsApi.loginTicket(ticket).then(function (data) {\n console.log('valid ticket you are logged in');\n }, function (error) {\n console.error(error);\n });\n```\n\n#### Login with ticket ECM/BPM as parameter in the constructor\n\nWith this authentication the ticket is not validated against the server\n\n##### Example\n```javascript\n\n//Login ticket ECM\nthis.alfrescoJsApi = new AlfrescoApi({ ticketEcm:'TICKET_4479f4d3bb155195879bfbb8d5206f433488a1b1', hostEcm:'http://127.0.0.1:8080'});\n\n//Login ticket BPM\nthis.alfrescoJsApi = new AlfrescoApi({ ticketBpm: 'Basic YWRtaW46YWRtaW4=', hostBpm:'http://127.0.0.1:9999'});\n\n//Login ticket ECM and BPM\nthis.alfrescoJsApi = new AlfrescoApi({ ticketEcm:'TICKET_4479f4d3bb155195879bfbb8d5206f433488a1b1', ticketBpm: 'Basic YWRtaW46YWRtaW4=', hostEcm:'http://127.0.0.1:8080', hostBpm:'http://127.0.0.1:9999'});\n```\n\n### Login with Username and Password BPM\n\n### Example\n```javascript\nthis.alfrescoJsApi = new AlfrescoApi({ provider:'BPM' });\n\nthis.alfrescoJsApi.login('admin', 'admin').then(function (data) {\n console.log('API called successfully Login in Activiti BPM performed ');\n}, function (error) {\n console.error(error);\n});\n\n```\n### Login with OAUTH2 Alfresco authorization server\n\n## Implicit Flow\n\nIf your want to be redirect to the authorization server and login there you can use the implicit flow to login\n\n#### oauth2 properties\n\nProperty | Description | default value|\n------------- | ------------- | -------------|\nhost| Your oauth2 server URL| null |\nclientId| Your clientId oauth2 | null |\nsecret| Your secret oauth2| null |\nscope| Your scope | null |\nimplicitFlow| true/false | false |\nredirectUri| url to be redirect after login| null|\nredirectLogout| url to be redirect after logout optional, if is nor present the redirectUri will be used| null|\nrefreshTokenTimeout| millisecond value, after how many millisecond youw ant refresh the token| 40000|\nredirectSilentIframeUri| url to be redirect after silent refresh login| /assets/silent-refresh.html |\nsilentLogin| direct execute the implicit login without the need od call this.alfrescoJsApi.implicitLogin() method| false|\n\n\nThe alfresco-js-api will automatically redirect you to the login page anf refresh the token if necessary\n\n#### Events\n\nProperty | Description | default value|\n------------- | ------------- | -------------|\nimplicit_redirect| triggered when the user is redirect to the auth server return url parameter of the redirect | |\ndiscovery| triggered when all the openId discovery url phase is terminated returnl an object with all the discovered url | |\ntoken_issued| triggered when a new token is issued| |\n\nThe alfresco-js-api will automatically redirect you to the login page anf refresh the token if necessary\n\n\n### Example\n\n```javascript\nthis.alfrescoJsApi = new AlfrescoApi({\n oauth2: {\n host: 'HOST_OAUTH2_SERVER',\n clientId: 'YOUR_CLIENT_ID',\n secret: 'SECRET',\n scope: 'openid',\n implicitFlow: true,\n redirectUri: 'YOUR_HOME_APP_URL',\n silentRefreshTimeout: '600000' //Optional parameter 10 minutes default value\n },\n authType: 'OAUTH',\n provider: 'ALL'\n});\n\nthis.alfrescoJsApi.implicitLogin();\n\n```\n\n### Example skip login form\n\n```javascript\nthis.alfrescoJsApi = new AlfrescoApi({\n oauth2: {\n host: 'HOST_OAUTH2_SERVER',\n clientId: 'YOUR_CLIENT_ID',\n secret: 'SECRET',\n scope: 'openid',\n implicitFlow: true,\n redirectUri: 'YOUR_HOME_APP_URL',\n silentRefreshTimeout: '600000' //Optional parameter 10 minutes default value,\n silentLogin: true\n },\n authType: 'OAUTH',\n provider: 'ALL'\n});\n\n```\n\n\n## Password Flow\n\nIf your auth endpoint is different from the standard one \"/oauth/token\" you can override it through the property authPath\n\n### Example\n```javascript\nthis.alfrescoJsApi = new AlfrescoApi({\n oauth2: {\n host: 'HOST_OAUTH2_SERVER',\n clientId: 'YOUR_CLIENT_ID',\n secret: 'SECRET',\n authPath:'my-custom-auth-endpoint/token'\n },\n authType: 'OAUTH',\n provider: 'ALL'\n });\n\nthis.alfrescoJsApi.login('admin', 'admin').then(function (data) {\n console.log('API called successfully Login in with authorization server performed ');\n}, function (error) {\n console.error(error);\n});\n\n```\n\nAfter the login if you want refresh your token you can use this call\n\n### Example\n\n```javascript\nthis.alfrescoJsApi.refreshToken()then(function (data) {\n console.log('Your token has been refreshed');\n }, function (error) {\n console.error(error);\n });\n```\n\n## Logout\n\nlogout()\n\n### Example\n\n```javascript\n\nthis.alfrescoJsApi.logout().then(function (data) {\n console.log('Successfully Logout');\n}, function (error) {\n console.error('Possible ticket already expired');\n});\n\n```\n\n## isLoggedIn\n\nisLoggedIn()\n\n> return true if you are logged in false if you are not.\n\n### Example\n\n```javascript\n\nvar isLoggedIn = this.alfrescoJsApi.isLoggedIn();\n\nif (isLoggedIn) {\n console.log('You are logged in');\n} else {\n console.log('You are not logged in');\n}\n\n```\n## Get tickets\n\ngetTicketEcm()\n\n>After the log in you can retrieve you ECM ticket\n\n```javascript\n var ecmTicket = this.alfrescoJsApi.getTicketEcm() ;\n console.log('This is your ECM ticket ' + ecmTicket);\n\n```\n\ngetTicketBpm()\n\n>After the log in you can retrieve you BPM ticket\n\n```javascript\n\n var bpmTicket = this.alfrescoJsApi.getTicketBpm();\n console.log('This is your BPM ticket ' + bpmTicket);\n```\n\n## Events login/logout\n\n> The login/logout are also an EventEmitter which you can register to listen to any of the following event types:\n* unauthorized (If this event is triggered a call to the Api was unauthorized)\n* success (If this event is triggered the login was success you can use this event instead the login promise)\n* logout (If this event is triggered the client is successfully logout)\n\n### Example\n\n```javascript\n\nthis.alfrescoJsApi.login('admin', 'admin').on('unauthorized', function(){\n console.log('You are unauthorized you can use this event to redirect to login');\n});\n\nthis.alfrescoJsApi.login('admin', 'admin').on('success', function(){\n console.log('Success Login');\n});\n\nthis.alfrescoJsApi.logout().on('logout', function(){\n console.log('Successfully Logout');\n});\n```\n\n# Custom Endpoint\n\nContent service and process service has two different clients:\n\n- this.alfrescoJsApi.bpmClient\n- this.alfrescoJsApi.ecmClient\n\nBoth client expose a method ***callApi**\n\n\n```javascript\n callApi(path: string, httpMethod: string, pathParams?: any, queryParams?: any, headerParams?: any, formParams?: any, bodyParam?: any, authNames?: string[], contentTypes?: string[], accepts?: string[], returnType?: any, contextRoot?: string, responseType?: string): Promise;\n```\n\nIf you want call your custom rest point in one of those two service use the corrispondin client. \n\n## Example\n\n```javascript\n\n this.alfrescoJsApi.bpmClient.callApi(\n '/api/enterprise/app-version', 'GET',\n {}, {}, {}, {}, {},\n [], ['application/json'], ['application/json'], {'String': 'String'}\n )\n\n ```\n \n\n# ECM\n\nA complete list of all the ECM methods is available here : [Core API](/src/alfresco-core-rest-api).\nBelow you can find some common examples.\n\n## Get Node content\n\ngetFileContent(nodeId, opts)\n\n>Returns the file content of the node with identifier **nodeId**.\n\n ### Example\n```javascript\n\nvar nodeId = '80a94ac8-3ece-47ad-864e-5d939424c47c';\n\nthis.alfrescoJsApi.core.nodesApi.getFileContent(nodeId).then(function(data) {\n fs.writeFile('./test/grass.jpg', data, function(error) {\n if (error) {\n console.error(error);\n return;\n }\n console.log('The file was saved!');\n });\n}, function(error) {\n console.error(error);\n});\n```\n\n## Get File or Folder Info\n\ngetNodeInfo(fileOrFolderId, opts)\n\n>Get information for the File/Folder with the identifier nodeId. The identifier of a node. You can also use one of these well-known aliases: -my- , -shared- or -root- as NodeId\n\n### Example\n\n```javascript\n\nvar fileOrFolderId = '80a94ac8-3ece-47ad-864e-5d939424c47c';\n\nthis.alfrescoJsApi.nodes.getNodeInfo(fileOrFolderId).then(function (data) {\n console.log('This is the name' + data.name );\n}, function (error) {\n console.log('This node does not exist');\n});\n\n```\n## Get Folder Children Info\n\ngetNodeChildren(fileOrFolderId, opts)\n\n>Minimal information for each child is returned by default.\nYou can use the include parameter to return additional information.\nreturns a promise with the Info about the children of the node if resolved and {error} if rejected.\nYou can also use one of these well-known aliases: -my- , -shared- or -root- as NodeId\n\n### Example\n\n```javascript\n\nvar folderNodeId = '80a94ac8-3ece-47ad-864e-5d939424c47c';\n\nthis.alfrescoJsApi.nodes.getNodeChildren(folderNodeId).then(function (data) {\n console.log('The number of children in this folder are ' + data.list.pagination.count );\n}, function (error) {\n console.log('This node does not exist');\n});\n\n```\n## Create Folder\n\ncreateFolder(name, relativePath, nodeIdParentFolder, opts)\n\n>createFolder return a promise that is resolved if the folder is created and {error} if rejected.\nYou can also use one of these well-known aliases: -my- , -shared- or -root- as nodeIdParentFolder\n\n### Example\n\n```javascript\n\nthis.alfrescoJsApi.nodes.createFolder('newFolderName').then(function (data) {\n console.log('The folder is created in root');\n}, function (error) {\n console.log('Error in creation of this folder or folder already exist' + error);\n});\n\n\nthis.alfrescoJsApi.nodes.createFolder('newFolderName', 'folderA/folderB').then(function (data) {\n console.log('The folder is created in folderA/folderB from root');\n}, function (error) {\n console.log('Error in creation of this folder or folder already exist' + error);\n});\n\n\nvar parentFolder = '80a94ac8-3ece-47ad-864e-5d939424c47c'\n\nthis.alfrescoJsApi.nodes.createFolder('newFolderName', 'folderA/folderB', parentFolder).then(function (data) {\n console.log('The folder is created in folderA/folderB from parentFolder:' + parentFolder);\n}, function (error) {\n console.log('Error in creation of this folder or folder already exist' + error);\n});\n\n```\n\n**CreateFolder With Auto Rename**\n\ncreateFolderAutoRename(name, relativePath, nodeIdParentFolder, opts)\n>is the same of createFolder(name, relativePath, nodeId, {autoRename: true}) is just syntactic sugar\n You can also use one of these well-known aliases: -my- , -shared- or -root- as nodeIdParentFolder\n\n### Example\n\n```javascript\n\nthis.alfrescoJsApi.nodes.createFolderAutoRename('newFolderName').then(function (data) {\n console.log('The folder is created in root');\n}, function (error) {\n console.log('Error in creation of this folder' + error);\n});\n```\n\n## Upload File\n\nuploadFile(fileDefinition, relativePath, nodeId, nodeBody, opts)\n>uploadFile return a promise that is resolved if the file is successful uploaded and {error} if rejected.\n\nThe fileDefinition provides information about files and allows JavaScript to access their content.\n\n*Web File Definition\nFile Definition are generally retrieved from a FileList object returned as a result of a user selecting files using the element\n\n*Node File Definition\nFile Definition are generally retrieved from a read Stram\n\n### Example\n\n```javascript\n\nvar fs = require('fs');\n\nvar fileToUpload = fs.createReadStream('./folderA/folderB/newFile.txt');\n\nthis.alfrescoJsApi.upload.uploadFile(fileToUpload)\n .then(function () {\n console.log('File Uploaded in the root');\n }, function (error) {\n console.log('Error during the upload' + error);\n });\n\n\nthis.alfrescoJsApi.upload.uploadFile(fileToUpload, null, null, null, {autoRename: true})\n .then(function () {\n console.log('File Uploaded in the root');\n }, function (error) {\n console.log('Error during the upload' + error);\n });\n\n\nthis.alfrescoJsApi.upload.uploadFile(fileToUpload, 'folderX/folderY/folderZ')\n .then(function () {\n console.log('File Uploaded in the from root folderX/folderY/folderZ');\n }, function (error) {\n console.log('Error during the upload' + error);\n });\n\n\nvar parentFolder = '80a94ac8-3ece-47ad-864e-5d939424c47c';\n\nthis.alfrescoJsApi.upload.uploadFile(fileToUpload, 'folderX/folderY/folderZ', parentFolder )\n .then(function () {\n console.log('File Uploaded in the from parentFolder ' + parentFolder + ' n folderX/folderY/folderZ');\n }, function (error) {\n console.log('Error during the upload' + error);\n });\n\n```\n\nThe default behaviour of the Upload API will not create any thumbnail.\nIn order to create a thumbnail you have to perform to pass the parameter ```javascript{renditions: 'doclib'}``` as in the example below.\nThis parameter will basically perform also a call to the Rendition API.\nFor more information about the Rendition API :\n* [Rendition API](/src/alfresco-core-rest-api/docs/Rendition.md)\n* [Rendition service Wiki](https://wiki.alfresco.com/wiki/Rendition_Service)\n\n```javascript\n\nvar fs = require('fs');\n\nvar fileToUpload = fs.createReadStream('./folderA/folderB/newFile.txt');\n\nthis.alfrescoJsApi.upload.uploadFile(fileToUpload, null, null, null, {renditions: 'doclib'})\n .then(function () {\n console.log('File Uploaded in the root');\n }, function (error) {\n console.log('Error during the upload' + error);\n });\n\n```\n\n* To abort a file uploading\n\n\n```javascript\n\nvar fs = require('fs');\n\nvar fileToUpload = fs.createReadStream('./folderA/folderB/newFile.txt');\n\nvar promiseUpload = this.alfrescoJsApi.upload.uploadFile(fileToUpload)\n .once('abort', function () {\n console.log('File Uploaded aborted');\n });\n\npromiseUpload.abort();\n```\n\n\n## Events Upload File\n\n> The uploadFile is also an EventEmitter which you can register to listen to any of the following event types:\n* progress\n* success\n* abort\n* error\n* unauthorized\n\n### Example\n\n```javascript\nvar fs = require('fs');\n\nvar fileToUpload = fs.createReadStream('./folderA/folderB/newFile.txt');\n\nthis.alfrescoJsApi.upload.uploadFile(fileToUpload)\n .on('progress', (progress) => {\n console.log( 'Total :' + progress.total );\n console.log( 'Loaded :' + progress.loaded );\n console.log( 'Percent :' + progress.percent );\n })\n .on('success', () => {\n console.log( 'Your File is uploaded');\n });\n .on('abort', () => {\n console.log( 'Upload Aborted');\n })\n .on('error', () => {\n console.log( 'Error during the upload');\n })\n .on('unauthorized', () => {\n console.log('You are unauthorized');\n })\n```\n\n## Delete File or Folder\n\ndeleteNode(fileOrFolderId)\n\n>Delete File/Folder with the identifier nodeId, if the nodeId is a folder, then its children are also deleted\nDeleted nodes move to the trash bin is still possible to recover it\n\n### Example\n\n```javascript\n\nvar fileOrFolderId = '80a94ac8-3ece-47ad-864e-5d939424c47c';\n\nthis.alfrescoJsApi.nodes.deleteNode(fileOrFolderId).then(function (data) {\n console.log('The file/folder is deleted');\n}, function (error) {\n console.log('This node does not exist');\n});\n\n```\n\n## Delete File or Folder Permanent\n\ndeleteNodePermanent(fileOrFolderId)\n\n>Delete File/Folder with the identifier nodeId, if the nodeId is a folder, then its children are also deleted\nIf Deleted Permanent is used will not be possible recover the files\n\n### Example\n\n```javascript\n\nvar fileOrFolderId = '80a94ac8-3ece-47ad-864e-5d939424c47c';\n\nthis.alfrescoJsApi.nodes.deleteNodePermanent(fileOrFolderId).then(function (data) {\n console.log('The file/folder is deleted');\n}, function (error) {\n console.log('This node does not exist');\n});\n\n```\n\n## Get thumbnail Url\n\ngetDocumentThumbnailUrl(documentId)\n\n### Example\n\n```javascript\n\nvar thumbnailUrl = this.alfrescoJsApi.content.getDocumentThumbnailUrl('1a0b110f-1e09-4ca2-b367-fe25e4964a4');\n\n```\n\n## Get preview Url\n\ngetDocumentPreviewUrl(documentId)\n\n### Example\n\n```javascript\n\nvar previewUrl = this.alfrescoJsApi.content.getDocumentPreviewUrl('1a0b110f-1e09-4ca2-b367-fe25e4964a4');\n\n```\n\n## Get content Url\n\ngetContentUrl(documentId)\n\n### Example\n\n```javascript\n\nvar contentUrl = this.alfrescoJsApi.content.getContentUrl('1a0b110f-1e09-4ca2-b367-fe25e4964a4');\n\n```\n\n## Custom web scripts call\n\nFor mor information about web scripts read the [Wiki](https://wiki.alfresco.com/wiki/Web_Scripts) and the [Wiki with Web ScriptsExamples](https://wiki.alfresco.com/wiki/Web_Scripts_Examples)\n\nexecuteWebScript(httpMethod, scriptPath, scriptArgs, contextRoot, servicePath)\n\n> Anatomy of a Web Script URI **http(s)://(host):(port)/(contextPath)/(servicePath)/(scriptPath)?(scriptArgs)**\nA Web Script is simply a service bound to a URI which responds to HTTP methods such as GET, POST, PUT and DELETE. While using the same underlying code, there are broadly two kinds of Web Scripts.\n\n### Parameters\nName | Description\n------------- | -------------\n**httpMethod** | possible value GET, POST, PUT and DELETE\n**scriptPath** |path to Web Script (as defined by Web Script)\n**scriptArgs** |arguments to pass to Web Script\n**contextRoot** |path where application is deployed default value 'alfresco'\n**servicePath** |path where Web Script service is mapped default value 'service'\n**postBody** | post body\n\n```javascript\n\n//Call a GET on a Web Scripts available at the following URIs: http://127.0.01:8080/alfresco/service/mytasks\n\nthis.alfrescoJsApi.core.webscriptApi.executeWebScript('GET', 'mytasks').then(function (data) {\n console.log('Data received form http://127.0.01:8080/alfresco/service/mytasks' + data);\n}, function (error) {\n console.log('Error' + error);\n});\n\n//Call a GET on a Web Scripts available at the following URIs: http://127.0.01:8080/share/service/mytasks\n\nthis.alfrescoJsApi.core.webscriptApi.executeWebScript('GET', 'mytasks', null, 'share').then(function (data) {\n console.log('Data received form http://127.0.01:8080/share/service/mytasks' + data);\n}, function (error) {\n console.log('Error' + error);\n});\n\n//Call a GET on a Web Scripts available at the following URIs: http://127.0.01:8080/share/differentServiceSlug/mytasks\n\nthis.alfrescoJsApi.core.webscriptApi.executeWebScript('GET', 'mytasks', null, 'share', 'differentServiceSlug').then(function (data) {\n console.log('Data received form http://127.0.01:8080/share/differentServiceSlug/mytasks' + data);\n}, function (error) {\n console.log('Error' + error);\n});\n\n```\n\n# BPM\n\nA complete list of all the BPM methods is available her[Activiti API](/src/alfresco-activiti-rest-api).\nBelow you can find some common examples.\n\n## Task Api\n\nBelow you can find some example relative to the Activiti process api for all the possible method go to [Task Api documentation](/src/alfresco-activiti-rest-api/docs/TaskApi.md)\n\n### List Task\n\nlistTasks(requestNode)\n\n>return a list of task based on the requestNode query\n\n#### Parameters\n\nName | Type | Description\n------------- | ------------- | -------------\n **requestNode** | [**Representation**](/src/alfresco-activiti-rest-api/docs/TaskQueryRequestRepresentation.md)| requestNode\n\n#### Example\n\n```javascript\nvar requestTasks = new this.alfrescoJsApi.activiti.TaskQueryRequestRepresentation();\n\nthis.alfrescoJsApi.activiti.taskApi.listTasks(requestTasks).then(function (data) {\n console.log('listTasks ' + data);\n}, function (error) {\n console.log('Error' + error);\n});\n```\n\n### Get Task\n\ngetTask(taskId)\n\n>return the [**TaskRepresentation**](/src/alfresco-activiti-rest-api/docs/TaskRepresentation.md) of single task by id\n\n#### Parameters\n\nName | Type | Description\n------------- | ------------- | -------------\n **taskId** | **String**| taskId\n\n#### Example\n\n```javascript\n\nvar taskId = '10'; // String | taskId\n\nthis.alfrescoJsApi.activiti.taskApi.getTask(taskId).then(function (data) {\n console.log('Task representation ' + data);\n}, function (error) {\n console.log('Error' + error);\n});\n```\n\n### Filter Task\n\nfilterTasks(requestTasks)\n\n>return the [**ResultListDataRepresentation**](/src/alfresco-activiti-rest-api/docs/ResultListDataRepresentation.md) that is a list of all the task filered\n\n#### Parameters\n\nName | Type | Description\n------------- | ------------- | -------------\n **requestTasks** | [**TaskFilterRequestRepresentation**](/src/alfresco-activiti-rest-api/docs/TaskFilterRequestRepresentation.md)| requestTasks\n\n\n#### Example\n\n```javascript\n\nvar requestTasks = new this.alfrescoJsApi.activiti.TaskFilterRequestRepresentation();\nrequestTasks.appDefinitionId = 1;\n\nthis.alfrescoJsApi.activiti.taskApi.filterTasks(requestTasks).then(function (data) {\n console.log('Task filter list ' + data);\n}, function (error) {\n console.log('Error' + error);\n});\n```\n\n### Complete Task\n\ncompleteTask(taskId)\n\n>To complete a task (standalone or without a task form) :\n\n#### Parameters\n\nName | Type | Description\n------------- | ------------- | -------------\n **taskId** | **String**| taskId\n\n#### Example\n\n```javascript\n\nvar taskId = '10'; // String | taskId\n\nthis.alfrescoJsApi.activiti.taskApi.completeTask(taskId).then(function () {\n console.log('Task completed');\n}, function (error) {\n console.log('Error' + error);\n});\n```\n### Get Task Form\n\ngetTaskForm(taskId)\n\n>Retrieve the Task Form representation. [**FormDefinitionRepresentation**](/src/alfresco-activiti-rest-api/docs/FormDefinitionRepresentation.md)\n\n#### Parameters\n\nName | Type | Description\n------------- | ------------- | -------------\n **taskId** | **String**| taskId\n\n#### Example\n\n```javascript\n\nvar taskId = '10'; // String | taskId\n\nthis.alfrescoJsApi.activiti.taskApi.getTaskForm(taskId).then(function (data) {\n console.log('Task form representation' + data);\n}, function (error) {\n console.log('Error' + error);\n});\n```\n\n### Complete Task Form\n\ncompleteTaskForm(taskId, completeTaskFormRepresentation)\n\n>Complete a Task Form\n\n#### Parameters\n\nName | Type | Description\n------------- | ------------- | -------------\n **taskId** | **String**| taskId\n **completeTaskFormRepresentation** | [**CompleteFormRepresentation**](/src/alfresco-activiti-rest-api/docs/CompleteFormRepresentation.md)| completeTaskFormRepresentation\n\n#### Example\n\n```javascript\n\nvar taskId = '10'; // String | taskId\n\nthis.alfrescoJsApi.activiti.taskApi.completeTaskForm(taskId, completeTaskFormRepresentation).then(function () {\n console.log('Task completed');\n}, function (error) {\n console.log('Error' + error);\n});\n```\n\n## Process Api\n\nBelow you can find some example relative to the Activiti process api for all the possible method go to [Process Api documentation](/src/alfresco-activiti-rest-api/docs/ProcessApi.md)\n\n\n### Get Process Instances\n\ngetProcessInstances(requestNode)\n\n>Retrieve a list of process instances [**ResultListDataRepresentation**](/src/alfresco-activiti-rest-api/docs/ResultListDataRepresentation.md)\n\n#### Parameters\n\nName | Type | Description\n------------- | ------------- | -------------\n **requestNode** | [**ProcessFilterRequestRepresentation**](/src/alfresco-activiti-rest-api/docs/ProcessFilterRequestRepresentation.md)| requestNode\n\n#### Example\n\n```javascript\nvar requestNode = new this.alfrescoJsApi.activiti.ProcessFilterRequestRepresentation();\n\nthis.alfrescoJsApi.activiti.processApi.getProcessInstances(requestNode).then(function (data) {\n console.log('All processes' + data);\n}, function (error) {\n console.log('Error' + error);\n});\n```\n\nFiltered process:\n\n```javascript\n var requestNode = new this.alfrescoJsApi.activiti.ProcessFilterRequestRepresentation();\n\nrequestNode.page = 0;\nrequestNode.sort = 'created-desc';\nrequestNode.state = 'completed';\n\nthis.alfrescoJsApi.activiti.processApi.getProcessInstances(requestNode).then(function (data) {\n console.log('All processes completed' + data);\n}, function (error) {\n console.log('Error' + error);\n});\n```\n\n## Models Api\n\nBelow you can find some example relative to the Activiti process api for all the possible method go to [Task Api documentation](/src/alfresco-activiti-rest-api/docs/ModelsApi.md)\n\n### Get Model\n\ngetModel(modelId, opts)\n\n>To retrieve details about a particular model (process, form, decision rule or app) return a [**ModelRepresentation**](ModelRepresentation.md)\n\n#### Parameters\n\nName | Type | Description | Notes\n------------- | ------------- | ------------- | -------------\n **modelId** | **Integer**| modelId |\n **includePermissions** | **Boolean**| includePermissions | [optional]\n\n#### Example\n```javascript\n\nvar opts = {\n 'filter': 'myReusableForms',\n 'modelType': 2\n};\n\nthis.alfrescoJsApi.activiti.modelsApi.getModels(opts).then(function (data) {\n console.log('All your reusable forms' + data);\n }, function (error) {\n console.log('Error' + error);\n });\n```\n\n## Report Api\n\nBelow you can find some example relative to the Activiti report api for all the possible method go to [Report Api documentation](/src/alfresco-activiti-rest-api/docs/ReportApi.md)\n\n### Create default Reports\n\ncreateDefaultReports()\n\n>Create the default reports\n\n#### Parameters\n\nNo parameters required.\n\n#### Example\n\n```javascript\n\nthis.alfrescoJsApi.activiti.reportApi.createDefaultReports();\n```\n\n### Get Reports\n\ngetReportList()\n\n> Retrieve the available report list\n\n#### Parameters\n\nNo parameters required.\n\n#### Example\n\n```javascript\n\nthis.alfrescoJsApi.activiti.reportApi.getReportList();\n```\n\n### Report Params\n\ngetReportParams(reportId)\n\n> Retrieve the parameters referring to the reportId.\n\n#### Parameters\n\nName | Type | Description | Notes|\n------------- | ------------- | ------------- | -------------|\n **reportId** | **String**| reportId ||\n\n#### Example\n\n```javascript\n\nvar reportId = \"1\"; // String | reportId\n\nthis.alfrescoJsApi.activiti.reportApi.getReportParams(reportId);\n```\n\n## Report Process Definitions\n\ngetProcessDefinitions()\n\n> Retrieve the process definition list for all the apps.\n\n#### Parameters\n\nNo parameters required.\n\n#### Example\n\n```javascript\n\nthis.alfrescoJsApi.activiti.reportApi.getProcessDefinitions();\n```\n\n## Tasks of process definition\n\ngetTasksByProcessDefinitionId(reportId, processDefinitionId)\n\n> Retrieves all tasks that refer to the processDefinitionId\n\n#### Parameters\nName | Type | Description | Notes|\n------------- | ------------- | ------------- | -------------|\n **reportId** | **String**| reportId ||\n **processDefinitionId** | **String**| process definition id ||\n\n#### Example\n\n```javascript\n\nvar reportId = \"1\"; // String | reportId\nvar processDefinitionId = \"1\"; // String | processDefinitionId\n\nthis.alfrescoJsApi.activiti.reportApi.getTasksByProcessDefinitionId(reportId, processDefinitionId);\n```\n\n## Generate reports\n\ngetReportsByParams(reportId, paramsQuery)\n\n> Generate the reports based on the input parameters\n\n#### Parameters\nName | Type | Description | Notes|\n------------- | ------------- | ------------- | -------------|\n **reportId** | **String**| reportId ||\n **paramsQuery** | **Object**| Query parameters ||\n\n#### Example\n\n```javascript\n\nvar reportId = \"1\"; // String | reportId\nvar paramsQuery = {status: 'ALL'}; // Object | paramsQuery\n\nthis.alfrescoJsApi.activiti.reportApi.getReportsByParams(reportId, paramsQuery);\n```\n## Update report details\n\nupdateReport(reportId, name)\n\n> Update the report details\n\n#### Parameters\nName | Type | Description | Notes\n------------- | ------------- | ------------- | -------------|\n **reportId** | **String**| reportId ||\n **name** | **String**| The report name ||\n\n#### Example\n\n```javascript\n\nvar reportId = \"1\"; // String | reportId\nvar name = \"new Fake name\"; // String | reportId\n\nthis.alfrescoJsApi.activiti.reportApi.updateReport(reportId, name);\n```\n\n## Export to csv\nexportToCsv(reportId, queryParms)\n\n> Export a report as csv\n\n#### Parameters\nName | Type | Description | Notes\n------------- | ------------- | ------------- | -------------|\n **reportId** | **String**| reportId ||\n **queryParms** | **Object**| Query parameters ||\n\n#### Example\n```javascript\n\nvar reportId = \"1\"; // String | reportId\nvar queryParms = {\n 'processDefinitionId': 'TEST:99:999',\n 'dateRange': {\n 'startDate': '2017-01-01T00:00:00.000Z',\n 'endDate': '2017-01-24T23:59:59.999Z',\n 'rangeId': 'currentYear'\n },\n 'slowProcessInstanceInteger': 10,\n 'status': 'All',\n '__reportName': 'FAKE_REPORT_NAME'\n };\n\nthis.alfrescoJsApi.activiti.reportApi.exportToCsv(reportId, queryParms);\n```\n\n## Save Report\n\nsaveReport(reportId, queryParams)\n\n> Save a report\n\n#### Parameters\nName | Type | Description | Notes\n------------- | ------------- | ------------- | -------------|\n **reportId** | **String**| reportId ||\n **queryParms** | **Object**| Query parameters ||\n\n#### Example\n```javascript\n\nvar reportId = \"1\"; // String | reportId\nvar queryParms = {\n 'processDefinitionId': 'TEST:99:999',\n 'dateRange': {\n 'startDate': '2017-01-01T00:00:00.000Z',\n 'endDate': '2017-01-24T23:59:59.999Z',\n 'rangeId': 'currentYear'\n },\n 'slowProcessInstanceInteger': 10,\n 'status': 'All',\n '__reportName': 'FAKE_REPORT_NAME'\n };\n\nthis.alfrescoJsApi.activiti.reportApi.saveReport(reportId, queryParms);\n```\n\n## Delete report\ndeleteReport(reportId)\n\n> Delete a report\n\n#### Parameters\nName | Type | Description | Notes |\n------------- | ------------- | ------------- | ------------- |\n **reportId** | **String**| reportId | |\n\n#### Example\n```javascript\n\nvar reportId = \"1\"; // String | reportId\n\nthis.alfrescoJsApi.activiti.reportApi.deleteReport(reportId);\n```\n\n# Error Events\n\nThe alfresco-js-api has an error handler event where you can subscribe\n\n## Example\n```javascript\n this.alfrescoJsApi.on('error', (error) => {\n console.log(error)\n })\n```\n\n# Development\n\n* To run the build\n\n ```$ npm run build```\n\n* To run the build in watch mode\n\n ```$ npm run watchify```\n\n* To run the test\n\n ```$ npm run test```\n\n* To run the test coverage\n\n ```$ npm run coverage```\n\n\n# Release History\n\nRead the [Changelog] (./CHANGELOG.md)\n\n", - "readmeFilename": "README.md", - "optionalDependencies": {}, - "_dependencies": { - "event-emitter": "0.3.4", - "superagent": "3.8.2" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/alfresco-js-api", - "error": "[Circular]", - "extraneous": false, - "peerMissing": [ - { - "requiredBy": "@alfresco/adf-extensions@3.0.0-383b74151a47e188020249aea7ec0dfb586bd0b6", - "requires": "alfresco-js-api@2.7.0-2a84d662e8134ada8923742adad17351a4a2f777" - } - ] - }, - "peerMissing": true - }, - "core-js": { - "required": { - "name": "core-js", - "description": "Standard library", - "version": "2.5.7", - "repository": { - "type": "git", - "url": "git+https://github.com/zloirock/core-js.git" - }, - "main": "index.js", - "devDependencies": { - "LiveScript": "1.3.x", - "es-observable-tests": "0.2.x", - "eslint": "4.19.x", - "eslint-plugin-import": "2.12.x", - "grunt": "^1.0.2", - "grunt-cli": "^1.2.0", - "grunt-contrib-clean": "^1.1.0", - "grunt-contrib-copy": "^1.0.0", - "grunt-contrib-uglify": "3.3.x", - "grunt-contrib-watch": "^1.0.0", - "grunt-karma": "^2.0.0", - "grunt-livescript": "0.6.x", - "karma": "^2.0.0", - "karma-qunit": "^2.1.0", - "karma-chrome-launcher": "^2.2.0", - "karma-firefox-launcher": "^1.0.1", - "karma-ie-launcher": "^1.0.0", - "karma-phantomjs-launcher": "1.0.x", - "phantomjs-prebuilt": "2.1.x", - "promises-aplus-tests": "^2.1.2", - "qunit": "2.6.x", - "temp": "^0.8.3", - "webpack": "^3.11.0" - }, - "scripts": { - "grunt": "grunt", - "lint": "eslint ./", - "promises-tests": "promises-aplus-tests tests/promises-aplus/adapter", - "observables-tests": "node tests/observables/adapter && node tests/observables/adapter-library", - "test": "npm run grunt clean copy && npm run lint && npm run grunt livescript client karma:default && npm run grunt library karma:library && npm run promises-tests && npm run observables-tests && lsc tests/commonjs" - }, - "license": "MIT", - "keywords": [ - "ES3", - "ES5", - "ES6", - "ES7", - "ES2015", - "ES2016", - "ES2017", - "ECMAScript 3", - "ECMAScript 5", - "ECMAScript 6", - "ECMAScript 7", - "ECMAScript 2015", - "ECMAScript 2016", - "ECMAScript 2017", - "Harmony", - "Strawman", - "Map", - "Set", - "WeakMap", - "WeakSet", - "Promise", - "Symbol", - "TypedArray", - "setImmediate", - "Dict", - "polyfill", - "shim" - ], - "_resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "_integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", - "_from": "core-js@2.5.7", - "readme": "# core-js\n\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/zloirock/core-js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![version](https://img.shields.io/npm/v/core-js.svg)](https://www.npmjs.com/package/core-js) [![npm downloads](https://img.shields.io/npm/dm/core-js.svg)](http://npm-stat.com/charts.html?package=core-js&author=&from=2014-11-18) [![Build Status](https://travis-ci.org/zloirock/core-js.svg)](https://travis-ci.org/zloirock/core-js) [![devDependency status](https://david-dm.org/zloirock/core-js/dev-status.svg)](https://david-dm.org/zloirock/core-js?type=dev)\n#### As advertising: the author is looking for a good job :)\n\nModular standard library for JavaScript. Includes polyfills for [ECMAScript 5](#ecmascript-5), [ECMAScript 6](#ecmascript-6): [promises](#ecmascript-6-promise), [symbols](#ecmascript-6-symbol), [collections](#ecmascript-6-collections), iterators, [typed arrays](#ecmascript-6-typed-arrays), [ECMAScript 7+ proposals](#ecmascript-7-proposals), [setImmediate](#setimmediate), etc. Some additional features such as [dictionaries](#dict) or [extended partial application](#partial-application). You can require only needed features or use it without global namespace pollution.\n\n[*Example*](http://goo.gl/a2xexl):\n```js\nArray.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\n'*'.repeat(10); // => '**********'\nPromise.resolve(32).then(x => console.log(x)); // => 32\nsetImmediate(x => console.log(x), 42); // => 42\n```\n\n[*Without global namespace pollution*](http://goo.gl/paOHb0):\n```js\nvar core = require('core-js/library'); // With a modular system, otherwise use global `core`\ncore.Array.from(new core.Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\ncore.String.repeat('*', 10); // => '**********'\ncore.Promise.resolve(32).then(x => console.log(x)); // => 32\ncore.setImmediate(x => console.log(x), 42); // => 42\n```\n\n### Index\n- [Usage](#usage)\n - [Basic](#basic)\n - [CommonJS](#commonjs)\n - [Custom build](#custom-build-from-the-command-line)\n- [Supported engines](#supported-engines)\n- [Features](#features)\n - [ECMAScript 5](#ecmascript-5)\n - [ECMAScript 6](#ecmascript-6)\n - [ECMAScript 6: Object](#ecmascript-6-object)\n - [ECMAScript 6: Function](#ecmascript-6-function)\n - [ECMAScript 6: Array](#ecmascript-6-array)\n - [ECMAScript 6: String](#ecmascript-6-string)\n - [ECMAScript 6: RegExp](#ecmascript-6-regexp)\n - [ECMAScript 6: Number](#ecmascript-6-number)\n - [ECMAScript 6: Math](#ecmascript-6-math)\n - [ECMAScript 6: Date](#ecmascript-6-date)\n - [ECMAScript 6: Promise](#ecmascript-6-promise)\n - [ECMAScript 6: Symbol](#ecmascript-6-symbol)\n - [ECMAScript 6: Collections](#ecmascript-6-collections)\n - [ECMAScript 6: Typed Arrays](#ecmascript-6-typed-arrays)\n - [ECMAScript 6: Reflect](#ecmascript-6-reflect)\n - [ECMAScript 7+ proposals](#ecmascript-7-proposals)\n - [stage 4 proposals](#stage-4-proposals)\n - [stage 3 proposals](#stage-3-proposals)\n - [stage 2 proposals](#stage-2-proposals)\n - [stage 1 proposals](#stage-1-proposals)\n - [stage 0 proposals](#stage-0-proposals)\n - [pre-stage 0 proposals](#pre-stage-0-proposals)\n - [Web standards](#web-standards)\n - [setTimeout / setInterval](#settimeout--setinterval)\n - [setImmediate](#setimmediate)\n - [iterable DOM collections](#iterable-dom-collections)\n - [Non-standard](#non-standard)\n - [Object](#object)\n - [Dict](#dict)\n - [partial application](#partial-application)\n - [Number Iterator](#number-iterator)\n - [escaping strings](#escaping-strings)\n - [delay](#delay)\n - [helpers for iterators](#helpers-for-iterators)\n- [Missing polyfills](#missing-polyfills)\n- [Changelog](./CHANGELOG.md)\n\n## Usage\n### Basic\n```\nnpm i core-js\nbower install core.js\n```\n\n```js\n// Default\nrequire('core-js');\n// Without global namespace pollution\nvar core = require('core-js/library');\n// Shim only\nrequire('core-js/shim');\n```\nIf you need complete build for browser, use builds from `core-js/client` path: \n\n* [default](https://raw.githack.com/zloirock/core-js/v2.5.7/client/core.min.js): Includes all features, standard and non-standard.\n* [as a library](https://raw.githack.com/zloirock/core-js/v2.5.7/client/library.min.js): Like \"default\", but does not pollute the global namespace (see [2nd example at the top](#core-js)).\n* [shim only](https://raw.githack.com/zloirock/core-js/v2.5.7/client/shim.min.js): Only includes the standard methods.\n\nWarning: if you use `core-js` with the extension of native objects, require all needed `core-js` modules at the beginning of entry point of your application, otherwise, conflicts may occur.\n\n### CommonJS\nYou can require only needed modules.\n\n```js\nrequire('core-js/fn/set');\nrequire('core-js/fn/array/from');\nrequire('core-js/fn/array/find-index');\nArray.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\n[1, 2, NaN, 3, 4].findIndex(isNaN); // => 2\n\n// or, w/o global namespace pollution:\n\nvar Set = require('core-js/library/fn/set');\nvar from = require('core-js/library/fn/array/from');\nvar findIndex = require('core-js/library/fn/array/find-index');\nfrom(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\nfindIndex([1, 2, NaN, 3, 4], isNaN); // => 2\n```\nAvailable entry points for methods / constructors, as above examples, and namespaces: for example, `core-js/es6/array` (`core-js/library/es6/array`) contains all [ES6 `Array` features](#ecmascript-6-array), `core-js/es6` (`core-js/library/es6`) contains all ES6 features.\n\n##### Caveats when using CommonJS API:\n\n* `modules` path is internal API, does not inject all required dependencies and can be changed in minor or patch releases. Use it only for a custom build and / or if you know what are you doing.\n* `core-js` is extremely modular and uses a lot of very tiny modules, because of that for usage in browsers bundle up `core-js` instead of usage loader for each file, otherwise, you will have hundreds of requests.\n\n#### CommonJS and prototype methods without global namespace pollution\nIn the `library` version, we can't pollute prototypes of native constructors. Because of that, prototype methods transformed to static methods like in examples above. `babel` `runtime` transformer also can't transform them. But with transpilers we can use one more trick - [bind operator and virtual methods](https://github.com/zenparsing/es-function-bind). Special for that, available `/virtual/` entry points. Example:\n```js\nimport fill from 'core-js/library/fn/array/virtual/fill';\nimport findIndex from 'core-js/library/fn/array/virtual/find-index';\n\nArray(10)::fill(0).map((a, b) => b * b)::findIndex(it => it && !(it % 8)); // => 4\n\n// or\n\nimport {fill, findIndex} from 'core-js/library/fn/array/virtual';\n\nArray(10)::fill(0).map((a, b) => b * b)::findIndex(it => it && !(it % 8)); // => 4\n\n```\n\n### Custom build (from the command-line)\n```\nnpm i core-js && cd node_modules/core-js && npm i\nnpm run grunt build:core.dict,es6 -- --blacklist=es6.promise,es6.math --library=on --path=custom uglify\n```\nWhere `core.dict` and `es6` are modules (namespaces) names, which will be added to the build, `es6.promise` and `es6.math` are modules (namespaces) names, which will be excluded from the build, `--library=on` is flag for build without global namespace pollution and `custom` is target file name.\n\nAvailable namespaces: for example, `es6.array` contains [ES6 `Array` features](#ecmascript-6-array), `es6` contains all modules whose names start with `es6`.\n\n### Custom build (from external scripts)\n\n[`core-js-builder`](https://www.npmjs.com/package/core-js-builder) package exports a function that takes the same parameters as the `build` target from the previous section. This will conditionally include or exclude certain parts of `core-js`:\n\n```js\nrequire('core-js-builder')({\n modules: ['es6', 'core.dict'], // modules / namespaces\n blacklist: ['es6.reflect'], // blacklist of modules / namespaces, by default - empty list\n library: false, // flag for build without global namespace pollution, by default - false\n umd: true // use UMD wrapper for export `core` object, by default - true\n}).then(code => {\n // ...\n}).catch(error => {\n // ...\n});\n```\n## Supported engines\n**Tested in:**\n- Chrome 26+\n- Firefox 4+\n- Safari 5+\n- Opera 12+\n- Internet Explorer 6+ (sure, IE8- with ES3 limitations)\n- Edge\n- Android Browser 2.3+\n- iOS Safari 5.1+\n- PhantomJS 1.9 / 2.1\n- NodeJS 0.8+\n\n...and it doesn't mean `core-js` will not work in other engines, they just have not been tested.\n\n## Features:\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js(/library) <- all features\ncore-js(/library)/shim <- only polyfills\n```\n### ECMAScript 5\nAll features moved to the [`es6` namespace](#ecmascript-6), here just a list of features:\n```js\nObject\n .create(proto | null, descriptors?) -> object\n .getPrototypeOf(object) -> proto | null\n .defineProperty(target, key, desc) -> target, cap for ie8-\n .defineProperties(target, descriptors) -> target, cap for ie8-\n .getOwnPropertyDescriptor(object, key) -> desc\n .getOwnPropertyNames(object) -> array\n .keys(object) -> array\n .seal(object) -> object, cap for ie8-\n .freeze(object) -> object, cap for ie8-\n .preventExtensions(object) -> object, cap for ie8-\n .isSealed(object) -> bool, cap for ie8-\n .isFrozen(object) -> bool, cap for ie8-\n .isExtensible(object) -> bool, cap for ie8-\nArray\n .isArray(var) -> bool\n #slice(start?, end?) -> array, fix for ie7-\n #join(string = ',') -> string, fix for ie7-\n #indexOf(var, from?) -> int\n #lastIndexOf(var, from?) -> int\n #every(fn(val, index, @), that) -> bool\n #some(fn(val, index, @), that) -> bool\n #forEach(fn(val, index, @), that) -> void\n #map(fn(val, index, @), that) -> array\n #filter(fn(val, index, @), that) -> array\n #reduce(fn(memo, val, index, @), memo?) -> var\n #reduceRight(fn(memo, val, index, @), memo?) -> var\n #sort(fn?) -> @, fixes for some engines\nFunction\n #bind(object, ...args) -> boundFn(...args)\nString\n #split(separator, limit) -> array\n #trim() -> str\nRegExp\n #toString() -> str\nNumber\n #toFixed(digits) -> string\n #toPrecision(precision) -> string\nparseInt(str, radix) -> int\nparseFloat(str) -> num\nDate\n .now() -> int\n #toISOString() -> string\n #toJSON() -> string\n```\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js(/library)/es5\n```\n\n### ECMAScript 6\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js(/library)/es6\n```\n#### ECMAScript 6: Object\nModules [`es6.object.assign`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.object.assign.js), [`es6.object.is`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.object.is.js), [`es6.object.set-prototype-of`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.object.set-prototype-of.js) and [`es6.object.to-string`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.object.to-string.js).\n\nIn ES6 most `Object` static methods should work with primitives. Modules [`es6.object.freeze`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.object.freeze.js), [`es6.object.seal`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.object.seal.js), [`es6.object.prevent-extensions`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.object.prevent-extensions.js), [`es6.object.is-frozen`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.object.is-frozen.js), [`es6.object.is-sealed`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.object.is-sealed.js), [`es6.object.is-extensible`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.object.is-extensible.js), [`es6.object.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.object.get-own-property-descriptor.js), [`es6.object.get-prototype-of`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.object.get-prototype-of.js), [`es6.object.keys`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.object.keys.js) and [`es6.object.get-own-property-names`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.object.get-own-property-names.js).\n\nJust ES5 features: [`es6.object.create`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.object.create.js), [`es6.object.define-property`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.object.define-property.js) and [`es6.object.define-properties`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.object.es6.object.define-properties.js).\n```js\nObject\n .assign(target, ...src) -> target\n .is(a, b) -> bool\n .setPrototypeOf(target, proto | null) -> target (required __proto__ - IE11+)\n .create(object | null, descriptors?) -> object\n .getPrototypeOf(var) -> object | null\n .defineProperty(object, key, desc) -> target\n .defineProperties(object, descriptors) -> target\n .getOwnPropertyDescriptor(var, key) -> desc | undefined\n .keys(var) -> array\n .getOwnPropertyNames(var) -> array\n .freeze(var) -> var\n .seal(var) -> var\n .preventExtensions(var) -> var\n .isFrozen(var) -> bool\n .isSealed(var) -> bool\n .isExtensible(var) -> bool\n #toString() -> string, ES6 fix: @@toStringTag support\n```\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js(/library)/es6/object\ncore-js(/library)/fn/object/assign\ncore-js(/library)/fn/object/is\ncore-js(/library)/fn/object/set-prototype-of\ncore-js(/library)/fn/object/get-prototype-of\ncore-js(/library)/fn/object/create\ncore-js(/library)/fn/object/define-property\ncore-js(/library)/fn/object/define-properties\ncore-js(/library)/fn/object/get-own-property-descriptor\ncore-js(/library)/fn/object/keys\ncore-js(/library)/fn/object/get-own-property-names\ncore-js(/library)/fn/object/freeze\ncore-js(/library)/fn/object/seal\ncore-js(/library)/fn/object/prevent-extensions\ncore-js(/library)/fn/object/is-frozen\ncore-js(/library)/fn/object/is-sealed\ncore-js(/library)/fn/object/is-extensible\ncore-js/fn/object/to-string\n```\n[*Examples*](http://goo.gl/ywdwPz):\n```js\nvar foo = {q: 1, w: 2}\n , bar = {e: 3, r: 4}\n , baz = {t: 5, y: 6};\nObject.assign(foo, bar, baz); // => foo = {q: 1, w: 2, e: 3, r: 4, t: 5, y: 6}\n\nObject.is(NaN, NaN); // => true\nObject.is(0, -0); // => false\nObject.is(42, 42); // => true\nObject.is(42, '42'); // => false\n\nfunction Parent(){}\nfunction Child(){}\nObject.setPrototypeOf(Child.prototype, Parent.prototype);\nnew Child instanceof Child; // => true\nnew Child instanceof Parent; // => true\n\nvar O = {};\nO[Symbol.toStringTag] = 'Foo';\n'' + O; // => '[object Foo]'\n\nObject.keys('qwe'); // => ['0', '1', '2']\nObject.getPrototypeOf('qwe') === String.prototype; // => true\n```\n#### ECMAScript 6: Function\nModules [`es6.function.name`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.function.name.js), [`es6.function.has-instance`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.function.has-instance.js). Just ES5: [`es6.function.bind`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.function.bind.js).\n```js\nFunction\n #bind(object, ...args) -> boundFn(...args)\n #name -> string (IE9+)\n #@@hasInstance(var) -> bool\n```\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js/es6/function\ncore-js/fn/function/name\ncore-js/fn/function/has-instance\ncore-js/fn/function/bind\ncore-js/fn/function/virtual/bind\n```\n[*Example*](http://goo.gl/zqu3Wp):\n```js\n(function foo(){}).name // => 'foo'\n\nconsole.log.bind(console, 42)(43); // => 42 43\n```\n#### ECMAScript 6: Array\nModules [`es6.array.from`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.from.js), [`es6.array.of`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.of.js), [`es6.array.copy-within`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.copy-within.js), [`es6.array.fill`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.fill.js), [`es6.array.find`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.find.js), [`es6.array.find-index`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.find-index.js), [`es6.array.iterator`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.iterator.js). ES5 features with fixes: [`es6.array.is-array`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.is-array.js), [`es6.array.slice`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.slice.js), [`es6.array.join`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.join.js), [`es6.array.index-of`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.index-of.js), [`es6.array.last-index-of`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.last-index-of.js), [`es6.array.every`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.every.js), [`es6.array.some`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.some.js), [`es6.array.for-each`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.for-each.js), [`es6.array.map`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.map.js), [`es6.array.filter`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.filter.js), [`es6.array.reduce`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.reduce.js), [`es6.array.reduce-right`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.reduce-right.js), [`es6.array.sort`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.array.sort.js).\n```js\nArray\n .from(iterable | array-like, mapFn(val, index)?, that) -> array\n .of(...args) -> array\n .isArray(var) -> bool\n #copyWithin(target = 0, start = 0, end = @length) -> @\n #fill(val, start = 0, end = @length) -> @\n #find(fn(val, index, @), that) -> val\n #findIndex(fn(val, index, @), that) -> index | -1\n #values() -> iterator\n #keys() -> iterator\n #entries() -> iterator\n #join(string = ',') -> string, fix for ie7-\n #slice(start?, end?) -> array, fix for ie7-\n #indexOf(var, from?) -> index | -1\n #lastIndexOf(var, from?) -> index | -1\n #every(fn(val, index, @), that) -> bool\n #some(fn(val, index, @), that) -> bool\n #forEach(fn(val, index, @), that) -> void\n #map(fn(val, index, @), that) -> array\n #filter(fn(val, index, @), that) -> array\n #reduce(fn(memo, val, index, @), memo?) -> var\n #reduceRight(fn(memo, val, index, @), memo?) -> var\n #sort(fn?) -> @, invalid arguments fix\n #@@iterator() -> iterator (values)\n #@@unscopables -> object (cap)\nArguments\n #@@iterator() -> iterator (values, available only in core-js methods)\n```\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js(/library)/es6/array\ncore-js(/library)/fn/array/from\ncore-js(/library)/fn/array/of\ncore-js(/library)/fn/array/is-array\ncore-js(/library)/fn/array/iterator\ncore-js(/library)/fn/array/copy-within\ncore-js(/library)/fn/array/fill\ncore-js(/library)/fn/array/find\ncore-js(/library)/fn/array/find-index\ncore-js(/library)/fn/array/values\ncore-js(/library)/fn/array/keys\ncore-js(/library)/fn/array/entries\ncore-js(/library)/fn/array/slice\ncore-js(/library)/fn/array/join\ncore-js(/library)/fn/array/index-of\ncore-js(/library)/fn/array/last-index-of\ncore-js(/library)/fn/array/every\ncore-js(/library)/fn/array/some\ncore-js(/library)/fn/array/for-each\ncore-js(/library)/fn/array/map\ncore-js(/library)/fn/array/filter\ncore-js(/library)/fn/array/reduce\ncore-js(/library)/fn/array/reduce-right\ncore-js(/library)/fn/array/sort\ncore-js(/library)/fn/array/virtual/iterator\ncore-js(/library)/fn/array/virtual/copy-within\ncore-js(/library)/fn/array/virtual/fill\ncore-js(/library)/fn/array/virtual/find\ncore-js(/library)/fn/array/virtual/find-index\ncore-js(/library)/fn/array/virtual/values\ncore-js(/library)/fn/array/virtual/keys\ncore-js(/library)/fn/array/virtual/entries\ncore-js(/library)/fn/array/virtual/slice\ncore-js(/library)/fn/array/virtual/join\ncore-js(/library)/fn/array/virtual/index-of\ncore-js(/library)/fn/array/virtual/last-index-of\ncore-js(/library)/fn/array/virtual/every\ncore-js(/library)/fn/array/virtual/some\ncore-js(/library)/fn/array/virtual/for-each\ncore-js(/library)/fn/array/virtual/map\ncore-js(/library)/fn/array/virtual/filter\ncore-js(/library)/fn/array/virtual/reduce\ncore-js(/library)/fn/array/virtual/reduce-right\ncore-js(/library)/fn/array/virtual/sort\n```\n[*Examples*](http://goo.gl/oaUFUf):\n```js\nArray.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\nArray.from({0: 1, 1: 2, 2: 3, length: 3}); // => [1, 2, 3]\nArray.from('123', Number); // => [1, 2, 3]\nArray.from('123', function(it){\n return it * it;\n}); // => [1, 4, 9]\n\nArray.of(1); // => [1]\nArray.of(1, 2, 3); // => [1, 2, 3]\n\nvar array = ['a', 'b', 'c'];\n\nfor(var val of array)console.log(val); // => 'a', 'b', 'c'\nfor(var val of array.values())console.log(val); // => 'a', 'b', 'c'\nfor(var key of array.keys())console.log(key); // => 0, 1, 2\nfor(var [key, val] of array.entries()){\n console.log(key); // => 0, 1, 2\n console.log(val); // => 'a', 'b', 'c'\n}\n\nfunction isOdd(val){\n return val % 2;\n}\n[4, 8, 15, 16, 23, 42].find(isOdd); // => 15\n[4, 8, 15, 16, 23, 42].findIndex(isOdd); // => 2\n[4, 8, 15, 16, 23, 42].find(isNaN); // => undefined\n[4, 8, 15, 16, 23, 42].findIndex(isNaN); // => -1\n\nArray(5).fill(42); // => [42, 42, 42, 42, 42]\n\n[1, 2, 3, 4, 5].copyWithin(0, 3); // => [4, 5, 3, 4, 5]\n```\n#### ECMAScript 6: String\nModules [`es6.string.from-code-point`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.from-code-point.js), [`es6.string.raw`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.raw.js), [`es6.string.iterator`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.iterator.js), [`es6.string.code-point-at`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.code-point-at.js), [`es6.string.ends-with`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.ends-with.js), [`es6.string.includes`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.includes.js), [`es6.string.repeat`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.repeat.js), [`es6.string.starts-with`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.starts-with.js) and [`es6.string.trim`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.trim.js).\n\nAnnex B HTML methods. Ugly, but it's also the part of the spec. Modules [`es6.string.anchor`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.anchor.js), [`es6.string.big`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.big.js), [`es6.string.blink`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.blink.js), [`es6.string.bold`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.bold.js), [`es6.string.fixed`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.fixed.js), [`es6.string.fontcolor`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.fontcolor.js), [`es6.string.fontsize`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.fontsize.js), [`es6.string.italics`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.italics.js), [`es6.string.link`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.link.js), [`es6.string.small`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.small.js), [`es6.string.strike`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.strike.js), [`es6.string.sub`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.sub.js) and [`es6.string.sup`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.string.sup.js).\n```js\nString\n .fromCodePoint(...codePoints) -> str\n .raw({raw}, ...substitutions) -> str\n #includes(str, from?) -> bool\n #startsWith(str, from?) -> bool\n #endsWith(str, from?) -> bool\n #repeat(num) -> str\n #codePointAt(pos) -> uint\n #trim() -> str, ES6 fix\n #anchor(name) -> str\n #big() -> str\n #blink() -> str\n #bold() -> str\n #fixed() -> str\n #fontcolor(color) -> str\n #fontsize(size) -> str\n #italics() -> str\n #link(url) -> str\n #small() -> str\n #strike() -> str\n #sub() -> str\n #sup() -> str\n #@@iterator() -> iterator (code points)\n```\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js(/library)/es6/string\ncore-js(/library)/fn/string/from-code-point\ncore-js(/library)/fn/string/raw\ncore-js(/library)/fn/string/includes\ncore-js(/library)/fn/string/starts-with\ncore-js(/library)/fn/string/ends-with\ncore-js(/library)/fn/string/repeat\ncore-js(/library)/fn/string/code-point-at\ncore-js(/library)/fn/string/trim\ncore-js(/library)/fn/string/anchor\ncore-js(/library)/fn/string/big\ncore-js(/library)/fn/string/blink\ncore-js(/library)/fn/string/bold\ncore-js(/library)/fn/string/fixed\ncore-js(/library)/fn/string/fontcolor\ncore-js(/library)/fn/string/fontsize\ncore-js(/library)/fn/string/italics\ncore-js(/library)/fn/string/link\ncore-js(/library)/fn/string/small\ncore-js(/library)/fn/string/strike\ncore-js(/library)/fn/string/sub\ncore-js(/library)/fn/string/sup\ncore-js(/library)/fn/string/iterator\ncore-js(/library)/fn/string/virtual/includes\ncore-js(/library)/fn/string/virtual/starts-with\ncore-js(/library)/fn/string/virtual/ends-with\ncore-js(/library)/fn/string/virtual/repeat\ncore-js(/library)/fn/string/virtual/code-point-at\ncore-js(/library)/fn/string/virtual/trim\ncore-js(/library)/fn/string/virtual/anchor\ncore-js(/library)/fn/string/virtual/big\ncore-js(/library)/fn/string/virtual/blink\ncore-js(/library)/fn/string/virtual/bold\ncore-js(/library)/fn/string/virtual/fixed\ncore-js(/library)/fn/string/virtual/fontcolor\ncore-js(/library)/fn/string/virtual/fontsize\ncore-js(/library)/fn/string/virtual/italics\ncore-js(/library)/fn/string/virtual/link\ncore-js(/library)/fn/string/virtual/small\ncore-js(/library)/fn/string/virtual/strike\ncore-js(/library)/fn/string/virtual/sub\ncore-js(/library)/fn/string/virtual/sup\ncore-js(/library)/fn/string/virtual/iterator\n```\n[*Examples*](http://goo.gl/3UaQ93):\n```js\nfor(var val of 'a𠮷b'){\n console.log(val); // => 'a', '𠮷', 'b'\n}\n\n'foobarbaz'.includes('bar'); // => true\n'foobarbaz'.includes('bar', 4); // => false\n'foobarbaz'.startsWith('foo'); // => true\n'foobarbaz'.startsWith('bar', 3); // => true\n'foobarbaz'.endsWith('baz'); // => true\n'foobarbaz'.endsWith('bar', 6); // => true\n\n'string'.repeat(3); // => 'stringstringstring'\n\n'𠮷'.codePointAt(0); // => 134071\nString.fromCodePoint(97, 134071, 98); // => 'a𠮷b'\n\nvar name = 'Bob';\nString.raw`Hi\\n${name}!`; // => 'Hi\\\\nBob!' (ES6 template string syntax)\nString.raw({raw: 'test'}, 0, 1, 2); // => 't0e1s2t'\n\n'foo'.bold(); // => 'foo'\n'bar'.anchor('a\"b'); // => 'bar'\n'baz'.link('http://example.com'); // => 'baz'\n```\n#### ECMAScript 6: RegExp\nModules [`es6.regexp.constructor`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.regexp.constructor.js) and [`es6.regexp.flags`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.regexp.flags.js).\n\nSupport well-known [symbols](#ecmascript-6-symbol) `@@match`, `@@replace`, `@@search` and `@@split`, modules [`es6.regexp.match`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.regexp.match.js), [`es6.regexp.replace`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.regexp.replace.js), [`es6.regexp.search`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.regexp.search.js) and [`es6.regexp.split`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.regexp.split.js).\n```\n[new] RegExp(pattern, flags?) -> regexp, ES6 fix: can alter flags (IE9+)\n #flags -> str (IE9+)\n #toString() -> str, ES6 fixes\n #@@match(str) -> array | null\n #@@replace(str, replacer) -> string\n #@@search(str) -> index\n #@@split(str, limit) -> array\nString\n #match(tpl) -> var, ES6 fix for support @@match\n #replace(tpl, replacer) -> var, ES6 fix for support @@replace\n #search(tpl) -> var, ES6 fix for support @@search\n #split(tpl, limit) -> var, ES6 fix for support @@split, some fixes for old engines\n```\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js/es6/regexp\ncore-js/fn/regexp/constructor\ncore-js(/library)/fn/regexp/flags\ncore-js/fn/regexp/to-string\ncore-js/fn/regexp/match\ncore-js/fn/regexp/replace\ncore-js/fn/regexp/search\ncore-js/fn/regexp/split\n```\n[*Examples*](http://goo.gl/PiJxBD):\n```js\nRegExp(/./g, 'm'); // => /./m\n\n/foo/.flags; // => ''\n/foo/gim.flags; // => 'gim'\n\n'foo'.match({[Symbol.match]: _ => 1}); // => 1\n'foo'.replace({[Symbol.replace]: _ => 2}); // => 2\n'foo'.search({[Symbol.search]: _ => 3}); // => 3\n'foo'.split({[Symbol.split]: _ => 4}); // => 4\n\nRegExp.prototype.toString.call({source: 'foo', flags: 'bar'}); // => '/foo/bar'\n```\n#### ECMAScript 6: Number\nModule [`es6.number.constructor`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.number.constructor.js). `Number` constructor support binary and octal literals, [*example*](http://goo.gl/jRd6b3):\n```js\nNumber('0b1010101'); // => 85\nNumber('0o7654321'); // => 2054353\n```\nModules [`es6.number.epsilon`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.number.epsilon.js), [`es6.number.is-finite`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.number.is-finite.js), [`es6.number.is-integer`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.number.is-integer.js), [`es6.number.is-nan`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.number.is-nan.js), [`es6.number.is-safe-integer`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.number.is-safe-integer.js), [`es6.number.max-safe-integer`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.number.max-safe-integer.js), [`es6.number.min-safe-integer`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.number.min-safe-integer.js), [`es6.number.parse-float`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.number.parse-float.js), [`es6.number.parse-int`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.number.parse-int.js), [`es6.number.to-fixed`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.number.to-fixed.js), [`es6.number.to-precision`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.number.to-precision.js), [`es6.parse-int`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.parse-int.js), [`es6.parse-float`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.parse-float.js).\n```js\n[new] Number(var) -> number | number object\n .isFinite(num) -> bool\n .isNaN(num) -> bool\n .isInteger(num) -> bool\n .isSafeInteger(num) -> bool\n .parseFloat(str) -> num\n .parseInt(str) -> int\n .EPSILON -> num\n .MAX_SAFE_INTEGER -> int\n .MIN_SAFE_INTEGER -> int\n #toFixed(digits) -> string, fixes\n #toPrecision(precision) -> string, fixes\nparseFloat(str) -> num, fixes\nparseInt(str) -> int, fixes\n```\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js(/library)/es6/number\ncore-js/es6/number/constructor\ncore-js(/library)/fn/number/is-finite\ncore-js(/library)/fn/number/is-nan\ncore-js(/library)/fn/number/is-integer\ncore-js(/library)/fn/number/is-safe-integer\ncore-js(/library)/fn/number/parse-float\ncore-js(/library)/fn/number/parse-int\ncore-js(/library)/fn/number/epsilon\ncore-js(/library)/fn/number/max-safe-integer\ncore-js(/library)/fn/number/min-safe-integer\ncore-js(/library)/fn/number/to-fixed\ncore-js(/library)/fn/number/to-precision\ncore-js(/library)/fn/parse-float\ncore-js(/library)/fn/parse-int\n```\n#### ECMAScript 6: Math\nModules [`es6.math.acosh`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.math.acosh.js), [`es6.math.asinh`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.math.asinh.js), [`es6.math.atanh`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.math.atanh.js), [`es6.math.cbrt`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.math.cbrt.js), [`es6.math.clz32`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.math.clz32.js), [`es6.math.cosh`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.math.cosh.js), [`es6.math.expm1`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.math.expm1.js), [`es6.math.fround`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.math.fround.js), [`es6.math.hypot`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.math.hypot.js), [`es6.math.imul`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.math.imul.js), [`es6.math.log10`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.math.log10.js), [`es6.math.log1p`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.math.log1p.js), [`es6.math.log2`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.math.log2.js), [`es6.math.sign`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.math.sign.js), [`es6.math.sinh`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.math.sinh.js), [`es6.math.tanh`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.math.tanh.js), [`es6.math.trunc`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.math.trunc.js).\n```js\nMath\n .acosh(num) -> num\n .asinh(num) -> num\n .atanh(num) -> num\n .cbrt(num) -> num\n .clz32(num) -> uint\n .cosh(num) -> num\n .expm1(num) -> num\n .fround(num) -> num\n .hypot(...args) -> num\n .imul(num, num) -> int\n .log1p(num) -> num\n .log10(num) -> num\n .log2(num) -> num\n .sign(num) -> 1 | -1 | 0 | -0 | NaN\n .sinh(num) -> num\n .tanh(num) -> num\n .trunc(num) -> num\n```\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js(/library)/es6/math\ncore-js(/library)/fn/math/acosh\ncore-js(/library)/fn/math/asinh\ncore-js(/library)/fn/math/atanh\ncore-js(/library)/fn/math/cbrt\ncore-js(/library)/fn/math/clz32\ncore-js(/library)/fn/math/cosh\ncore-js(/library)/fn/math/expm1\ncore-js(/library)/fn/math/fround\ncore-js(/library)/fn/math/hypot\ncore-js(/library)/fn/math/imul\ncore-js(/library)/fn/math/log1p\ncore-js(/library)/fn/math/log10\ncore-js(/library)/fn/math/log2\ncore-js(/library)/fn/math/sign\ncore-js(/library)/fn/math/sinh\ncore-js(/library)/fn/math/tanh\ncore-js(/library)/fn/math/trunc\n```\n#### ECMAScript 6: Date\nModules [`es6.date.to-string`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.date.to-string.js), ES5 features with fixes: [`es6.date.now`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.date.now.js), [`es6.date.to-iso-string`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.date.to-iso-string.js), [`es6.date.to-json`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.date.to-json.js) and [`es6.date.to-primitive`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.date.to-primitive.js).\n```js\nDate\n .now() -> int\n #toISOString() -> string\n #toJSON() -> string\n #toString() -> string\n #@@toPrimitive(hint) -> primitive\n```\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js/es6/date\ncore-js/fn/date/to-string\ncore-js(/library)/fn/date/now\ncore-js(/library)/fn/date/to-iso-string\ncore-js(/library)/fn/date/to-json\ncore-js(/library)/fn/date/to-primitive\n```\n[*Example*](http://goo.gl/haeHLR):\n```js\nnew Date(NaN).toString(); // => 'Invalid Date'\n```\n\n#### ECMAScript 6: Promise\nModule [`es6.promise`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.promise.js).\n```js\nnew Promise(executor(resolve(var), reject(var))) -> promise\n #then(resolved(var), rejected(var)) -> promise\n #catch(rejected(var)) -> promise\n .resolve(promise | var) -> promise\n .reject(var) -> promise\n .all(iterable) -> promise\n .race(iterable) -> promise\n```\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js(/library)/es6/promise\ncore-js(/library)/fn/promise\n```\nBasic [*example*](http://goo.gl/vGrtUC):\n```js\nfunction sleepRandom(time){\n return new Promise(function(resolve, reject){\n setTimeout(resolve, time * 1e3, 0 | Math.random() * 1e3);\n });\n}\n\nconsole.log('Run'); // => Run\nsleepRandom(5).then(function(result){\n console.log(result); // => 869, after 5 sec.\n return sleepRandom(10);\n}).then(function(result){\n console.log(result); // => 202, after 10 sec.\n}).then(function(){\n console.log('immediately after'); // => immediately after\n throw Error('Irror!');\n}).then(function(){\n console.log('will not be displayed');\n}).catch(x => console.log(x)); // => => Error: Irror!\n```\n`Promise.resolve` and `Promise.reject` [*example*](http://goo.gl/vr8TN3):\n```js\nPromise.resolve(42).then(x => console.log(x)); // => 42\nPromise.reject(42).catch(x => console.log(x)); // => 42\n\nPromise.resolve($.getJSON('/data.json')); // => ES6 promise\n```\n`Promise.all` [*example*](http://goo.gl/RdoDBZ):\n```js\nPromise.all([\n 'foo',\n sleepRandom(5),\n sleepRandom(15),\n sleepRandom(10) // after 15 sec:\n]).then(x => console.log(x)); // => ['foo', 956, 85, 382]\n```\n`Promise.race` [*example*](http://goo.gl/L8ovkJ):\n```js\nfunction timeLimit(promise, time){\n return Promise.race([promise, new Promise(function(resolve, reject){\n setTimeout(reject, time * 1e3, Error('Await > ' + time + ' sec'));\n })]);\n}\n\ntimeLimit(sleepRandom(5), 10).then(x => console.log(x)); // => 853, after 5 sec.\ntimeLimit(sleepRandom(15), 10).catch(x => console.log(x)); // Error: Await > 10 sec\n```\nECMAScript 7 [async functions](https://tc39.github.io/ecmascript-asyncawait) [example](http://goo.gl/wnQS4j):\n```js\nvar delay = time => new Promise(resolve => setTimeout(resolve, time))\n\nasync function sleepRandom(time){\n await delay(time * 1e3);\n return 0 | Math.random() * 1e3;\n};\nasync function sleepError(time, msg){\n await delay(time * 1e3);\n throw Error(msg);\n};\n\n(async () => {\n try {\n console.log('Run'); // => Run\n console.log(await sleepRandom(5)); // => 936, after 5 sec.\n var [a, b, c] = await Promise.all([\n sleepRandom(5),\n sleepRandom(15),\n sleepRandom(10)\n ]);\n console.log(a, b, c); // => 210 445 71, after 15 sec.\n await sleepError(5, 'Irror!');\n console.log('Will not be displayed');\n } catch(e){\n console.log(e); // => Error: 'Irror!', after 5 sec.\n }\n})();\n```\n\n##### Unhandled rejection tracking\n\nIn Node.js, like in native implementation, available events [`unhandledRejection`](https://nodejs.org/api/process.html#process_event_unhandledrejection) and [`rejectionHandled`](https://nodejs.org/api/process.html#process_event_rejectionhandled):\n```js\nprocess.on('unhandledRejection', (reason, promise) => console.log('unhandled', reason, promise));\nprocess.on('rejectionHandled', (promise) => console.log('handled', promise));\n\nvar p = Promise.reject(42);\n// unhandled 42 [object Promise]\n\nsetTimeout(() => p.catch(_ => _), 1e3);\n// handled [object Promise]\n```\nIn a browser on rejection, by default, you will see notify in the console, or you can add a custom handler and a handler on handling unhandled, [*example*](http://goo.gl/Wozskl):\n```js\nwindow.onunhandledrejection = e => console.log('unhandled', e.reason, e.promise);\nwindow.onrejectionhandled = e => console.log('handled', e.reason, e.promise);\n\nvar p = Promise.reject(42);\n// unhandled 42 [object Promise]\n\nsetTimeout(() => p.catch(_ => _), 1e3);\n// handled 42 [object Promise]\n```\n\n#### ECMAScript 6: Symbol\nModule [`es6.symbol`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.symbol.js).\n```js\nSymbol(description?) -> symbol\n .hasInstance -> @@hasInstance\n .isConcatSpreadable -> @@isConcatSpreadable\n .iterator -> @@iterator\n .match -> @@match\n .replace -> @@replace\n .search -> @@search\n .species -> @@species\n .split -> @@split\n .toPrimitive -> @@toPrimitive\n .toStringTag -> @@toStringTag\n .unscopables -> @@unscopables\n .for(key) -> symbol\n .keyFor(symbol) -> key\n .useSimple() -> void\n .useSetter() -> void\nObject\n .getOwnPropertySymbols(object) -> array\n```\nAlso wrapped some methods for correct work with `Symbol` polyfill.\n```js\nObject\n .create(proto | null, descriptors?) -> object\n .defineProperty(target, key, desc) -> target\n .defineProperties(target, descriptors) -> target\n .getOwnPropertyDescriptor(var, key) -> desc | undefined\n .getOwnPropertyNames(var) -> array\n #propertyIsEnumerable(key) -> bool\nJSON\n .stringify(target, replacer?, space?) -> string | undefined\n```\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js(/library)/es6/symbol\ncore-js(/library)/fn/symbol\ncore-js(/library)/fn/symbol/has-instance\ncore-js(/library)/fn/symbol/is-concat-spreadable\ncore-js(/library)/fn/symbol/iterator\ncore-js(/library)/fn/symbol/match\ncore-js(/library)/fn/symbol/replace\ncore-js(/library)/fn/symbol/search\ncore-js(/library)/fn/symbol/species\ncore-js(/library)/fn/symbol/split\ncore-js(/library)/fn/symbol/to-primitive\ncore-js(/library)/fn/symbol/to-string-tag\ncore-js(/library)/fn/symbol/unscopables\ncore-js(/library)/fn/symbol/for\ncore-js(/library)/fn/symbol/key-for\n```\n[*Basic example*](http://goo.gl/BbvWFc):\n```js\nvar Person = (function(){\n var NAME = Symbol('name');\n function Person(name){\n this[NAME] = name;\n }\n Person.prototype.getName = function(){\n return this[NAME];\n };\n return Person;\n})();\n\nvar person = new Person('Vasya');\nconsole.log(person.getName()); // => 'Vasya'\nconsole.log(person['name']); // => undefined\nconsole.log(person[Symbol('name')]); // => undefined, symbols are uniq\nfor(var key in person)console.log(key); // => only 'getName', symbols are not enumerable\n```\n`Symbol.for` & `Symbol.keyFor` [*example*](http://goo.gl/0pdJjX):\n```js\nvar symbol = Symbol.for('key');\nsymbol === Symbol.for('key'); // true\nSymbol.keyFor(symbol); // 'key'\n```\n[*Example*](http://goo.gl/mKVOQJ) with methods for getting own object keys:\n```js\nvar O = {a: 1};\nObject.defineProperty(O, 'b', {value: 2});\nO[Symbol('c')] = 3;\nObject.keys(O); // => ['a']\nObject.getOwnPropertyNames(O); // => ['a', 'b']\nObject.getOwnPropertySymbols(O); // => [Symbol(c)]\nReflect.ownKeys(O); // => ['a', 'b', Symbol(c)]\n```\n##### Caveats when using `Symbol` polyfill:\n\n* We can't add new primitive type, `Symbol` returns object.\n* `Symbol.for` and `Symbol.keyFor` can't be shimmed cross-realm.\n* By default, to hide the keys, `Symbol` polyfill defines setter in `Object.prototype`. For this reason, uncontrolled creation of symbols can cause memory leak and the `in` operator is not working correctly with `Symbol` polyfill: `Symbol() in {} // => true`.\n\nYou can disable defining setters in `Object.prototype`. [Example](http://goo.gl/N5UD7J):\n```js\nSymbol.useSimple();\nvar s1 = Symbol('s1')\n , o1 = {};\no1[s1] = true;\nfor(var key in o1)console.log(key); // => 'Symbol(s1)_t.qamkg9f3q', w/o native Symbol\n\nSymbol.useSetter();\nvar s2 = Symbol('s2')\n , o2 = {};\no2[s2] = true;\nfor(var key in o2)console.log(key); // nothing\n```\n* Currently, `core-js` not adds setters to `Object.prototype` for well-known symbols for correct work something like `Symbol.iterator in foo`. It can cause problems with their enumerability.\n* Some problems possible with environment exotic objects (for example, IE `localStorage`).\n\n#### ECMAScript 6: Collections\n`core-js` uses native collections in most case, just fixes methods / constructor, if it's required, and in old environment uses fast polyfill (O(1) lookup).\n#### Map\nModule [`es6.map`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.map.js).\n```js\nnew Map(iterable (entries) ?) -> map\n #clear() -> void\n #delete(key) -> bool\n #forEach(fn(val, key, @), that) -> void\n #get(key) -> val\n #has(key) -> bool\n #set(key, val) -> @\n #size -> uint\n #values() -> iterator\n #keys() -> iterator\n #entries() -> iterator\n #@@iterator() -> iterator (entries)\n```\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js(/library)/es6/map\ncore-js(/library)/fn/map\n```\n[*Examples*](http://goo.gl/GWR7NI):\n```js\nvar a = [1];\n\nvar map = new Map([['a', 1], [42, 2]]);\nmap.set(a, 3).set(true, 4);\n\nconsole.log(map.size); // => 4\nconsole.log(map.has(a)); // => true\nconsole.log(map.has([1])); // => false\nconsole.log(map.get(a)); // => 3\nmap.forEach(function(val, key){\n console.log(val); // => 1, 2, 3, 4\n console.log(key); // => 'a', 42, [1], true\n});\nmap.delete(a);\nconsole.log(map.size); // => 3\nconsole.log(map.get(a)); // => undefined\nconsole.log(Array.from(map)); // => [['a', 1], [42, 2], [true, 4]]\n\nvar map = new Map([['a', 1], ['b', 2], ['c', 3]]);\n\nfor(var [key, val] of map){\n console.log(key); // => 'a', 'b', 'c'\n console.log(val); // => 1, 2, 3\n}\nfor(var val of map.values())console.log(val); // => 1, 2, 3\nfor(var key of map.keys())console.log(key); // => 'a', 'b', 'c'\nfor(var [key, val] of map.entries()){\n console.log(key); // => 'a', 'b', 'c'\n console.log(val); // => 1, 2, 3\n}\n```\n#### Set\nModule [`es6.set`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.set.js).\n```js\nnew Set(iterable?) -> set\n #add(key) -> @\n #clear() -> void\n #delete(key) -> bool\n #forEach(fn(el, el, @), that) -> void\n #has(key) -> bool\n #size -> uint\n #values() -> iterator\n #keys() -> iterator\n #entries() -> iterator\n #@@iterator() -> iterator (values)\n```\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js(/library)/es6/set\ncore-js(/library)/fn/set\n```\n[*Examples*](http://goo.gl/bmhLwg):\n```js\nvar set = new Set(['a', 'b', 'a', 'c']);\nset.add('d').add('b').add('e');\nconsole.log(set.size); // => 5\nconsole.log(set.has('b')); // => true\nset.forEach(function(it){\n console.log(it); // => 'a', 'b', 'c', 'd', 'e'\n});\nset.delete('b');\nconsole.log(set.size); // => 4\nconsole.log(set.has('b')); // => false\nconsole.log(Array.from(set)); // => ['a', 'c', 'd', 'e']\n\nvar set = new Set([1, 2, 3, 2, 1]);\n\nfor(var val of set)console.log(val); // => 1, 2, 3\nfor(var val of set.values())console.log(val); // => 1, 2, 3\nfor(var key of set.keys())console.log(key); // => 1, 2, 3\nfor(var [key, val] of set.entries()){\n console.log(key); // => 1, 2, 3\n console.log(val); // => 1, 2, 3\n}\n```\n#### WeakMap\nModule [`es6.weak-map`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.weak-map.js).\n```js\nnew WeakMap(iterable (entries) ?) -> weakmap\n #delete(key) -> bool\n #get(key) -> val\n #has(key) -> bool\n #set(key, val) -> @\n```\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js(/library)/es6/weak-map\ncore-js(/library)/fn/weak-map\n```\n[*Examples*](http://goo.gl/SILXyw):\n```js\nvar a = [1]\n , b = [2]\n , c = [3];\n\nvar wmap = new WeakMap([[a, 1], [b, 2]]);\nwmap.set(c, 3).set(b, 4);\nconsole.log(wmap.has(a)); // => true\nconsole.log(wmap.has([1])); // => false\nconsole.log(wmap.get(a)); // => 1\nwmap.delete(a);\nconsole.log(wmap.get(a)); // => undefined\n\n// Private properties store:\nvar Person = (function(){\n var names = new WeakMap;\n function Person(name){\n names.set(this, name);\n }\n Person.prototype.getName = function(){\n return names.get(this);\n };\n return Person;\n})();\n\nvar person = new Person('Vasya');\nconsole.log(person.getName()); // => 'Vasya'\nfor(var key in person)console.log(key); // => only 'getName'\n```\n#### WeakSet\nModule [`es6.weak-set`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.weak-set.js).\n```js\nnew WeakSet(iterable?) -> weakset\n #add(key) -> @\n #delete(key) -> bool\n #has(key) -> bool\n```\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js(/library)/es6/weak-set\ncore-js(/library)/fn/weak-set\n```\n[*Examples*](http://goo.gl/TdFbEx):\n```js\nvar a = [1]\n , b = [2]\n , c = [3];\n\nvar wset = new WeakSet([a, b, a]);\nwset.add(c).add(b).add(c);\nconsole.log(wset.has(b)); // => true\nconsole.log(wset.has([2])); // => false\nwset.delete(b);\nconsole.log(wset.has(b)); // => false\n```\n##### Caveats when using collections polyfill:\n\n* Weak-collections polyfill stores values as hidden properties of keys. It works correct and not leak in most cases. However, it is desirable to store a collection longer than its keys.\n\n#### ECMAScript 6: Typed Arrays\nImplementations and fixes `ArrayBuffer`, `DataView`, typed arrays constructors, static and prototype methods. Typed Arrays work only in environments with support descriptors (IE9+), `ArrayBuffer` and `DataView` should work anywhere.\n\nModules [`es6.typed.array-buffer`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.typed.array-buffer.js), [`es6.typed.data-view`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.typed.data-view.js), [`es6.typed.int8-array`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.typed.int8-array.js), [`es6.typed.uint8-array`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.typed.uint8-array.js), [`es6.typed.uint8-clamped-array`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.typed.uint8-clamped-array.js), [`es6.typed.int16-array`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.typed.int16-array.js), [`es6.typed.uint16-array`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.typed.uint16-array.js), [`es6.typed.int32-array`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.typed.int32-array.js), [`es6.typed.uint32-array`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.typed.uint32-array.js), [`es6.typed.float32-array`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.typed.float32-array.js) and [`es6.typed.float64-array`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.typed.float64-array.js).\n```js\nnew ArrayBuffer(length) -> buffer\n .isView(var) -> bool\n #slice(start = 0, end = @length) -> buffer\n #byteLength -> uint\n\nnew DataView(buffer, byteOffset = 0, byteLength = buffer.byteLength - byteOffset) -> view\n #getInt8(offset) -> int8\n #getUint8(offset) -> uint8\n #getInt16(offset, littleEndian = false) -> int16\n #getUint16(offset, littleEndian = false) -> uint16\n #getInt32(offset, littleEndian = false) -> int32\n #getUint32(offset, littleEndian = false) -> uint32\n #getFloat32(offset, littleEndian = false) -> float32\n #getFloat64(offset, littleEndian = false) -> float64\n #setInt8(offset, value) -> void\n #setUint8(offset, value) -> void\n #setInt16(offset, value, littleEndian = false) -> void\n #setUint16(offset, value, littleEndian = false) -> void\n #setInt32(offset, value, littleEndian = false) -> void\n #setUint32(offset, value, littleEndian = false) -> void\n #setFloat32(offset, value, littleEndian = false) -> void\n #setFloat64(offset, value, littleEndian = false) -> void\n #buffer -> buffer\n #byteLength -> uint\n #byteOffset -> uint\n\n{\n Int8Array,\n Uint8Array,\n Uint8ClampedArray,\n Int16Array,\n Uint16Array,\n Int32Array,\n Uint32Array,\n Float32Array,\n Float64Array\n}\n new %TypedArray%(length) -> typed\n new %TypedArray%(typed) -> typed\n new %TypedArray%(arrayLike) -> typed\n new %TypedArray%(iterable) -> typed\n new %TypedArray%(buffer, byteOffset = 0, length = (buffer.byteLength - byteOffset) / @BYTES_PER_ELEMENT) -> typed\n .BYTES_PER_ELEMENT -> uint\n .from(arrayLike | iterable, mapFn(val, index)?, that) -> typed\n .of(...args) -> typed\n #BYTES_PER_ELEMENT -> uint\n #copyWithin(target = 0, start = 0, end = @length) -> @\n #every(fn(val, index, @), that) -> bool\n #fill(val, start = 0, end = @length) -> @\n #filter(fn(val, index, @), that) -> typed\n #find(fn(val, index, @), that) -> val\n #findIndex(fn(val, index, @), that) -> index\n #forEach(fn(val, index, @), that) -> void\n #indexOf(var, from?) -> int\n #join(string = ',') -> string\n #lastIndexOf(var, from?) -> int\n #map(fn(val, index, @), that) -> typed\n #reduce(fn(memo, val, index, @), memo?) -> var\n #reduceRight(fn(memo, val, index, @), memo?) -> var\n #reverse() -> @\n #set(arrayLike, offset = 0) -> void\n #slice(start = 0, end = @length) -> typed\n #some(fn(val, index, @), that) -> bool\n #sort(fn(a, b)?) -> @\n #subarray(start = 0, end = @length) -> typed\n #toString() -> string\n #toLocaleString() -> string\n #values() -> iterator\n #keys() -> iterator\n #entries() -> iterator\n #@@iterator() -> iterator (values)\n #buffer -> buffer\n #byteLength -> uint\n #byteOffset -> uint\n #length -> uint\n```\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js(/library)/es6/typed\ncore-js(/library)/fn/typed\ncore-js(/library)/fn/typed/array-buffer\ncore-js(/library)/fn/typed/data-view\ncore-js(/library)/fn/typed/int8-array\ncore-js(/library)/fn/typed/uint8-array\ncore-js(/library)/fn/typed/uint8-clamped-array\ncore-js(/library)/fn/typed/int16-array\ncore-js(/library)/fn/typed/uint16-array\ncore-js(/library)/fn/typed/int32-array\ncore-js(/library)/fn/typed/uint32-array\ncore-js(/library)/fn/typed/float32-array\ncore-js(/library)/fn/typed/float64-array\n```\n[*Examples*](http://goo.gl/yla75z):\n```js\nnew Int32Array(4); // => [0, 0, 0, 0]\nnew Uint8ClampedArray([1, 2, 3, 666]); // => [1, 2, 3, 255]\nnew Float32Array(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\n\nvar buffer = new ArrayBuffer(8);\nvar view = new DataView(buffer);\nview.setFloat64(0, 123.456, true);\nnew Uint8Array(buffer.slice(4)); // => [47, 221, 94, 64]\n\nInt8Array.of(1, 1.5, 5.7, 745); // => [1, 1, 5, -23]\nUint8Array.from([1, 1.5, 5.7, 745]); // => [1, 1, 5, 233]\n\nvar typed = new Uint8Array([1, 2, 3]);\n\nvar a = typed.slice(1); // => [2, 3]\ntyped.buffer === a.buffer; // => false\nvar b = typed.subarray(1); // => [2, 3]\ntyped.buffer === b.buffer; // => true\n\ntyped.filter(it => it % 2); // => [1, 3]\ntyped.map(it => it * 1.5); // => [1, 3, 4]\n\nfor(var val of typed)console.log(val); // => 1, 2, 3\nfor(var val of typed.values())console.log(val); // => 1, 2, 3\nfor(var key of typed.keys())console.log(key); // => 0, 1, 2\nfor(var [key, val] of typed.entries()){\n console.log(key); // => 0, 1, 2\n console.log(val); // => 1, 2, 3\n}\n```\n##### Caveats when using typed arrays:\n\n* Typed Arrays polyfills works completely how should work by the spec, but because of internal use getter / setters on each instance, is slow and consumes significant memory. However, typed arrays polyfills required mainly for IE9 (and for `Uint8ClampedArray` in IE10 and early IE11), all modern engines have native typed arrays and requires only constructors fixes and methods.\n* The current version hasn't special entry points for methods, they can be added only with constructors. It can be added in the future.\n* In the `library` version we can't pollute native prototypes, so prototype methods available as constructors static.\n\n#### ECMAScript 6: Reflect\nModules [`es6.reflect.apply`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.reflect.apply.js), [`es6.reflect.construct`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.reflect.construct.js), [`es6.reflect.define-property`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.reflect.define-property.js), [`es6.reflect.delete-property`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.reflect.delete-property.js), [`es6.reflect.enumerate`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.reflect.enumerate.js), [`es6.reflect.get`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.reflect.get.js), [`es6.reflect.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.reflect.get-own-property-descriptor.js), [`es6.reflect.get-prototype-of`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.reflect.get-prototype-of.js), [`es6.reflect.has`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.reflect.has.js), [`es6.reflect.is-extensible`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.reflect.is-extensible.js), [`es6.reflect.own-keys`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.reflect.own-keys.js), [`es6.reflect.prevent-extensions`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.reflect.prevent-extensions.js), [`es6.reflect.set`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.reflect.set.js), [`es6.reflect.set-prototype-of`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.reflect.set-prototype-of.js).\n```js\nReflect\n .apply(target, thisArgument, argumentsList) -> var\n .construct(target, argumentsList, newTarget?) -> object\n .defineProperty(target, propertyKey, attributes) -> bool\n .deleteProperty(target, propertyKey) -> bool\n .enumerate(target) -> iterator (removed from the spec and will be removed from core-js@3)\n .get(target, propertyKey, receiver?) -> var\n .getOwnPropertyDescriptor(target, propertyKey) -> desc\n .getPrototypeOf(target) -> object | null\n .has(target, propertyKey) -> bool\n .isExtensible(target) -> bool\n .ownKeys(target) -> array\n .preventExtensions(target) -> bool\n .set(target, propertyKey, V, receiver?) -> bool\n .setPrototypeOf(target, proto) -> bool (required __proto__ - IE11+)\n```\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js(/library)/es6/reflect\ncore-js(/library)/fn/reflect\ncore-js(/library)/fn/reflect/apply\ncore-js(/library)/fn/reflect/construct\ncore-js(/library)/fn/reflect/define-property\ncore-js(/library)/fn/reflect/delete-property\ncore-js(/library)/fn/reflect/enumerate (deprecated and will be removed from the next major release)\ncore-js(/library)/fn/reflect/get\ncore-js(/library)/fn/reflect/get-own-property-descriptor\ncore-js(/library)/fn/reflect/get-prototype-of\ncore-js(/library)/fn/reflect/has\ncore-js(/library)/fn/reflect/is-extensible\ncore-js(/library)/fn/reflect/own-keys\ncore-js(/library)/fn/reflect/prevent-extensions\ncore-js(/library)/fn/reflect/set\ncore-js(/library)/fn/reflect/set-prototype-of\n```\n[*Examples*](http://goo.gl/gVT0cH):\n```js\nvar O = {a: 1};\nObject.defineProperty(O, 'b', {value: 2});\nO[Symbol('c')] = 3;\nReflect.ownKeys(O); // => ['a', 'b', Symbol(c)]\n\nfunction C(a, b){\n this.c = a + b;\n}\n\nvar instance = Reflect.construct(C, [20, 22]);\ninstance.c; // => 42\n```\n\n### ECMAScript 7+ proposals\n[The TC39 process.](https://tc39.github.io/process-document/)\n\n[*CommonJS entry points:*](#commonjs)\n```\ncore-js(/library)/es7\ncore-js(/library)/es7/array\ncore-js(/library)/es7/global\ncore-js(/library)/es7/string\ncore-js(/library)/es7/map\ncore-js(/library)/es7/set\ncore-js(/library)/es7/error\ncore-js(/library)/es7/math\ncore-js(/library)/es7/system\ncore-js(/library)/es7/symbol\ncore-js(/library)/es7/reflect\ncore-js(/library)/es7/observable\n```\n`core-js/stage/4` entry point contains only stage 4 proposals, `core-js/stage/3` - stage 3 and stage 4, etc.\n#### Stage 4 proposals\n\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/stage/4\n```\n* `{Array, %TypedArray%}#includes` [proposal](https://github.com/tc39/Array.prototype.includes) - module [`es7.array.includes`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.array.includes.js), `%TypedArray%` version in modules from [this section](#ecmascript-6-typed-arrays).\n```js\nArray\n #includes(var, from?) -> bool\n{\n Int8Array,\n Uint8Array,\n Uint8ClampedArray,\n Int16Array,\n Uint16Array,\n Int32Array,\n Uint32Array,\n Float32Array,\n Float64Array\n}\n #includes(var, from?) -> bool\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/array/includes\n```\n[*Examples*](http://goo.gl/2Gq4ma):\n```js\n[1, 2, 3].includes(2); // => true\n[1, 2, 3].includes(4); // => false\n[1, 2, 3].includes(2, 2); // => false\n\n[NaN].indexOf(NaN); // => -1\n[NaN].includes(NaN); // => true\nArray(1).indexOf(undefined); // => -1\nArray(1).includes(undefined); // => true\n```\n* `Object.values`, `Object.entries` [proposal](https://github.com/tc39/proposal-object-values-entries) - modules [`es7.object.values`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.object.values.js), [`es7.object.entries`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.object.entries.js)\n```js\nObject\n .values(object) -> array\n .entries(object) -> array\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/object/values\ncore-js(/library)/fn/object/entries\n```\n[*Examples*](http://goo.gl/6kuGOn):\n```js\nObject.values({a: 1, b: 2, c: 3}); // => [1, 2, 3]\nObject.entries({a: 1, b: 2, c: 3}); // => [['a', 1], ['b', 2], ['c', 3]]\n\nfor(let [key, value] of Object.entries({a: 1, b: 2, c: 3})){\n console.log(key); // => 'a', 'b', 'c'\n console.log(value); // => 1, 2, 3\n}\n```\n* `Object.getOwnPropertyDescriptors` [proposal](https://github.com/tc39/proposal-object-getownpropertydescriptors) - module [`es7.object.get-own-property-descriptors`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.object.get-own-property-descriptors.js)\n```js\nObject\n .getOwnPropertyDescriptors(object) -> object\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/object/get-own-property-descriptors\n```\n*Examples*:\n```js\n// Shallow object cloning with prototype and descriptors:\nvar copy = Object.create(Object.getPrototypeOf(O), Object.getOwnPropertyDescriptors(O));\n// Mixin:\nObject.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n```\n* `String#padStart`, `String#padEnd` [proposal](https://github.com/tc39/proposal-string-pad-start-end) - modules [`es7.string.pad-start`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.string.pad-start.js), [`es7.string.pad-end`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.string.pad-end.js)\n```js\nString\n #padStart(length, fillStr = ' ') -> string\n #padEnd(length, fillStr = ' ') -> string\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/string/pad-start\ncore-js(/library)/fn/string/pad-end\ncore-js(/library)/fn/string/virtual/pad-start\ncore-js(/library)/fn/string/virtual/pad-end\n```\n[*Examples*](http://goo.gl/hK5ccv):\n```js\n'hello'.padStart(10); // => ' hello'\n'hello'.padStart(10, '1234'); // => '12341hello'\n'hello'.padEnd(10); // => 'hello '\n'hello'.padEnd(10, '1234'); // => 'hello12341'\n```\n* `Object#__(define|lookup)[GS]etter__`, [annex B ES2017](https://github.com/tc39/ecma262/pull/381), but we haven't special namespace for that - modules [`es7.object.define-setter`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.object.define-setter.js), [`es7.object.define-getter`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.object.define-getter.js), [`es7.object.lookup-setter`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.object.lookup-setter.js) and [`es7.object.lookup-getter`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.object.lookup-getter.js).\n```js\nObject\n #__defineSetter__(key, fn) -> void\n #__defineGetter__(key, fn) -> void\n #__lookupSetter__(key) -> fn | void\n #__lookupGetter__(key) -> fn | void\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/object/define-getter\ncore-js(/library)/fn/object/define-setter\ncore-js(/library)/fn/object/lookup-getter\ncore-js(/library)/fn/object/lookup-setter\n```\n\n#### Stage 3 proposals\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/stage/3\n```\n* `global` [proposal](https://github.com/tc39/proposal-global) - modules [`es7.global`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.global.js) and [`es7.system.global`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.system.global.js) (obsolete)\n```js\nglobal -> object\nSystem\n .global -> object (obsolete)\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/global\ncore-js(/library)/fn/system/global (obsolete)\n```\n[*Examples*](http://goo.gl/gEqMl7):\n```js\nglobal.Array === Array; // => true\n```\n* `Promise#finally` [proposal](https://github.com/tc39/proposal-promise-finally) - module [`es7.promise.finally`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.promise.finally.js)\n```js\nPromise\n #finally(onFinally()) -> promise\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/promise/finally\n```\n[*Examples*](https://goo.gl/AhyBbJ):\n```js\nPromise.resolve(42).finally(() => console.log('You will see it anyway'));\n\nPromise.reject(42).finally(() => console.log('You will see it anyway'));\n\n#### Stage 2 proposals\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/stage/2\n```\n* `String#trimLeft`, `String#trimRight` / `String#trimStart`, `String#trimEnd` [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim) - modules [`es7.string.trim-left`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.string.trim-right.js), [`es7.string.trim-right`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.string.trim-right.js)\n```js\nString\n #trimLeft() -> string\n #trimRight() -> string\n #trimStart() -> string\n #trimEnd() -> string\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/string/trim-start\ncore-js(/library)/fn/string/trim-end\ncore-js(/library)/fn/string/trim-left\ncore-js(/library)/fn/string/trim-right\ncore-js(/library)/fn/string/virtual/trim-start\ncore-js(/library)/fn/string/virtual/trim-end\ncore-js(/library)/fn/string/virtual/trim-left\ncore-js(/library)/fn/string/virtual/trim-right\n```\n[*Examples*](http://goo.gl/Er5lMJ):\n```js\n' hello '.trimLeft(); // => 'hello '\n' hello '.trimRight(); // => ' hello'\n```\n```\n* `Symbol.asyncIterator` for [async iteration proposal](https://github.com/tc39/proposal-async-iteration) - module [`es7.symbol.async-iterator`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.symbol.async-iterator.js)\n```js\nSymbol\n .asyncIterator -> @@asyncIterator\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/symbol/async-iterator\n```\n\n#### Stage 1 proposals\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/stage/1\n```\n* `Promise.try` [proposal](https://github.com/tc39/proposal-promise-try) - module [`es7.promise.try`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.promise.try.js)\n```js\nPromise\n .try(function()) -> promise\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/promise/try\n```\n[*Examples*](https://goo.gl/k5GGRo):\n```js\nPromise.try(() => 42).then(it => console.log(`Promise, resolved as ${it}`));\n\nPromise.try(() => { throw 42; }).catch(it => console.log(`Promise, rejected as ${it}`));\n```\n* `Array#flatten` and `Array#flatMap` [proposal](https://tc39.github.io/proposal-flatMap) - modules [`es7.array.flatten`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.array.flatten.js) and [`es7.array.flat-map`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.array.flat-map.js)\n```js\nArray\n #flatten(depthArg = 1) -> array\n #flatMap(fn(val, key, @), that) -> array\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/array/flatten\ncore-js(/library)/fn/array/flat-map\ncore-js(/library)/fn/array/virtual/flatten\ncore-js(/library)/fn/array/virtual/flat-map\n```\n[*Examples*](https://goo.gl/jTXsZi):\n```js\n[1, [2, 3], [4, 5]].flatten(); // => [1, 2, 3, 4, 5]\n[1, [2, [3, [4]]], 5].flatten(); // => [1, 2, [3, [4]], 5]\n[1, [2, [3, [4]]], 5].flatten(3); // => [1, 2, 3, 4, 5]\n\n[{a: 1, b: 2}, {a: 3, b: 4}, {a: 5, b: 6}].flatMap(it => [it.a, it.b]); // => [1, 2, 3, 4, 5, 6]\n```\n* `.of` and `.from` methods on collection constructors [proposal](https://github.com/tc39/proposal-setmap-offrom) - modules [`es7.set.of`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.set.of.js), [`es7.set.from`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.set.from.js), [`es7.map.of`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.map.of.js), [`es7.map.from`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.map.from.js), [`es7.weak-set.of`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.weak-set.of.js), [`es7.weak-set.from`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.weak-set.from.js), [`es7.weak-map.of`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.weak-map.of.js), [`es7.weak-map.from`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.weak-map.from.js)\n```js\nSet\n .of(...args) -> set\n .from(iterable, mapFn(val, index)?, that?) -> set\nMap\n .of(...args) -> map\n .from(iterable, mapFn(val, index)?, that?) -> map\nWeakSet\n .of(...args) -> weakset\n .from(iterable, mapFn(val, index)?, that?) -> weakset\nWeakMap\n .of(...args) -> weakmap\n .from(iterable, mapFn(val, index)?, that?) -> weakmap\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/set/of\ncore-js(/library)/fn/set/from\ncore-js(/library)/fn/map/of\ncore-js(/library)/fn/map/from\ncore-js(/library)/fn/weak-set/of\ncore-js(/library)/fn/weak-set/from\ncore-js(/library)/fn/weak-map/of\ncore-js(/library)/fn/weak-map/from\n```\n[*Examples*](https://goo.gl/mSC7eU):\n```js\nSet.of(1, 2, 3, 2, 1); // => Set {1, 2, 3}\n\nMap.from([[1, 2], [3, 4]], ([key, val]) => [key ** 2, val ** 2]); // => Map {1: 4, 9: 16}\n```\n* `String#matchAll` [proposal](https://github.com/tc39/String.prototype.matchAll) - module [`es7.string.match-all`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.string.match-all.js)\n```js\nString\n #matchAll(regexp) -> iterator\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/string/match-all\ncore-js(/library)/fn/string/virtual/match-all\n```\n[*Examples*](http://goo.gl/6kp9EB):\n```js\nfor(let [_, d, D] of '1111a2b3cccc'.matchAll(/(\\d)(\\D)/)){\n console.log(d, D); // => 1 a, 2 b, 3 c\n}\n```\n* `Observable` [proposal](https://github.com/zenparsing/es-observable) - modules [`es7.observable`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.observable.js) and [`es7.symbol.observable`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.symbol.observable.js)\n```js\nnew Observable(fn) -> observable\n #subscribe(observer) -> subscription\n #forEach(fn) -> promise\n #@@observable() -> @\n .of(...items) -> observable\n .from(observable | iterable) -> observable\n .@@species -> @\nSymbol\n .observable -> @@observable\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/observable\ncore-js(/library)/fn/symbol/observable\n```\n[*Examples*](http://goo.gl/1LDywi):\n```js\nnew Observable(observer => {\n observer.next('hello');\n observer.next('world');\n observer.complete();\n}).forEach(it => console.log(it))\n .then(_ => console.log('!'));\n```\n* `Math.{clamp, DEG_PER_RAD, degrees, fscale, rad-per-deg, radians, scale}` \n [proposal](https://github.com/rwaldron/proposal-math-extensions) - modules \n [`es7.math.clamp`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.math.clamp.js), \n [`es7.math.DEG_PER_RAD`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.math.DEG_PER_RAD.js), \n [`es7.math.degrees`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.math.degrees.js),\n [`es7.math.fscale`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.math.fscale.js), \n [`es7.math.RAD_PER_DEG`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.math.RAD_PER_DEG.js), \n [`es7.math.radians`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.math.radians.js) and\n [`es7.math.scale`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.math.scale.js)\n```js\nMath\n .DEG_PER_RAD -> number\n .RAD_PER_DEG -> number\n .clamp(x, lower, upper) -> number\n .degrees(radians) -> number\n .fscale(x, inLow, inHigh, outLow, outHigh) -> number\n .radians(degrees) -> number\n .scale(x, inLow, inHigh, outLow, outHigh) -> number\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/math/clamp\ncore-js(/library)/fn/math/deg-per-rad\ncore-js(/library)/fn/math/degrees\ncore-js(/library)/fn/math/fscale\ncore-js(/library)/fn/math/rad-per-deg\ncore-js(/library)/fn/math/radians\ncore-js(/library)/fn/math/scale\n```\n* `Math.signbit` [proposal](http://jfbastien.github.io/papers/Math.signbit.html) - module [`es7.math.signbit`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.math.signbit.js)\n```js\nMath\n .signbit(x) -> bool\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/math/signbit\n```\n[*Examples*](http://es6.zloirock.ru/):\n```js\nMath.signbit(NaN); // => NaN\nMath.signbit(1); // => true\nMath.signbit(-1); // => false\nMath.signbit(0); // => true\nMath.signbit(-0); // => false\n```\n\n#### Stage 0 proposals\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/stage/0\n```\n* `String#at` [proposal](https://github.com/mathiasbynens/String.prototype.at) - module [`es7.string.at`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.string.at.js)\n```js\nString\n #at(index) -> string\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/string/at\ncore-js(/library)/fn/string/virtual/at\n```\n[*Examples*](http://goo.gl/XluXI8):\n```js\n'a𠮷b'.at(1); // => '𠮷'\n'a𠮷b'.at(1).length; // => 2\n```\n* `Map#toJSON`, `Set#toJSON` [proposal](https://github.com/DavidBruant/Map-Set.prototype.toJSON) - modules [`es7.map.to-json`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.map.to-json.js), [`es7.set.to-json`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.set.to-json.js) (rejected and will be removed from `core-js@3`)\n```js\nMap\n #toJSON() -> array (rejected and will be removed from core-js@3)\nSet\n #toJSON() -> array (rejected and will be removed from core-js@3)\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/map\ncore-js(/library)/fn/set\n```\n* `Error.isError` [proposal](https://github.com/ljharb/proposal-is-error) - module [`es7.error.is-error`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.error.is-error.js) (withdrawn and will be removed from `core-js@3`)\n```js\nError\n .isError(it) -> bool (withdrawn and will be removed from core-js@3)\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/error/is-error\n```\n* `Math.{iaddh, isubh, imulh, umulh}` [proposal](https://gist.github.com/BrendanEich/4294d5c212a6d2254703) - modules [`es7.math.iaddh`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.math.iaddh.js), [`es7.math.isubh`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.math.isubh.js), [`es7.math.imulh`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.math.imulh.js) and [`es7.math.umulh`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.math.umulh.js)\n```js\nMath\n .iaddh(lo0, hi0, lo1, hi1) -> int32\n .isubh(lo0, hi0, lo1, hi1) -> int32\n .imulh(a, b) -> int32\n .umulh(a, b) -> uint32\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/math/iaddh\ncore-js(/library)/fn/math/isubh\ncore-js(/library)/fn/math/imulh\ncore-js(/library)/fn/math/umulh\n```\n* `global.asap`, [TC39 discussion](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask), module [`es7.asap`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.asap.js)\n```js\nasap(fn) -> void\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/asap\n```\n[*Examples*](http://goo.gl/tx3SRK):\n```js\nasap(() => console.log('called as microtask'));\n```\n\n#### Pre-stage 0 proposals\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/stage/pre\n```\n* `Reflect` metadata [proposal](https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md) - modules [`es7.reflect.define-metadata`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.reflect.define-metadata.js), [`es7.reflect.delete-metadata`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.reflect.delete-metadata.js), [`es7.reflect.get-metadata`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.reflect.get-metadata.js), [`es7.reflect.get-metadata-keys`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.reflect.get-metadata-keys.js), [`es7.reflect.get-own-metadata`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.reflect.get-own-metadata.js), [`es7.reflect.get-own-metadata-keys`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.reflect.get-own-metadata-keys.js), [`es7.reflect.has-metadata`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.reflect.has-metadata.js), [`es7.reflect.has-own-metadata`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.reflect.has-own-metadata.js) and [`es7.reflect.metadata`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/es7.reflect.metadata.js).\n```js\nReflect\n .defineMetadata(metadataKey, metadataValue, target, propertyKey?) -> void\n .getMetadata(metadataKey, target, propertyKey?) -> var\n .getOwnMetadata(metadataKey, target, propertyKey?) -> var\n .hasMetadata(metadataKey, target, propertyKey?) -> bool\n .hasOwnMetadata(metadataKey, target, propertyKey?) -> bool\n .deleteMetadata(metadataKey, target, propertyKey?) -> bool\n .getMetadataKeys(target, propertyKey?) -> array\n .getOwnMetadataKeys(target, propertyKey?) -> array\n .metadata(metadataKey, metadataValue) -> decorator(target, targetKey?) -> void\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/reflect/define-metadata\ncore-js(/library)/fn/reflect/delete-metadata\ncore-js(/library)/fn/reflect/get-metadata\ncore-js(/library)/fn/reflect/get-metadata-keys\ncore-js(/library)/fn/reflect/get-own-metadata\ncore-js(/library)/fn/reflect/get-own-metadata-keys\ncore-js(/library)/fn/reflect/has-metadata\ncore-js(/library)/fn/reflect/has-own-metadata\ncore-js(/library)/fn/reflect/metadata\n```\n[*Examples*](http://goo.gl/KCo3PS):\n```js\nvar O = {};\nReflect.defineMetadata('foo', 'bar', O);\nReflect.ownKeys(O); // => []\nReflect.getOwnMetadataKeys(O); // => ['foo']\nReflect.getOwnMetadata('foo', O); // => 'bar'\n```\n\n### Web standards\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/web\n```\n#### setTimeout / setInterval\nModule [`web.timers`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/web.timers.js). Additional arguments fix for IE9-.\n```js\nsetTimeout(fn(...args), time, ...args) -> id\nsetInterval(fn(...args), time, ...args) -> id\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/web/timers\ncore-js(/library)/fn/set-timeout\ncore-js(/library)/fn/set-interval\n```\n```js\n// Before:\nsetTimeout(log.bind(null, 42), 1000);\n// After:\nsetTimeout(log, 1000, 42);\n```\n#### setImmediate\nModule [`web.immediate`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/web.immediate.js). [`setImmediate` proposal](https://developer.mozilla.org/en-US/docs/Web/API/Window.setImmediate) polyfill.\n```js\nsetImmediate(fn(...args), ...args) -> id\nclearImmediate(id) -> void\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/web/immediate\ncore-js(/library)/fn/set-immediate\ncore-js(/library)/fn/clear-immediate\n```\n[*Examples*](http://goo.gl/6nXGrx):\n```js\nsetImmediate(function(arg1, arg2){\n console.log(arg1, arg2); // => Message will be displayed with minimum delay\n}, 'Message will be displayed', 'with minimum delay');\n\nclearImmediate(setImmediate(function(){\n console.log('Message will not be displayed');\n}));\n```\n#### Iterable DOM collections\nSome DOM collections should have [iterable interface](https://heycam.github.io/webidl/#idl-iterable) or should be [inherited from `Array`](https://heycam.github.io/webidl/#LegacyArrayClass). That mean they should have `keys`, `values`, `entries` and `@@iterator` methods for iteration. So add them. Module [`web.dom.iterable`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/web.dom.iterable.js):\n```js\n{\n CSSRuleList,\n CSSStyleDeclaration,\n CSSValueList,\n ClientRectList,\n DOMRectList,\n DOMStringList,\n DOMTokenList,\n DataTransferItemList,\n FileList,\n HTMLAllCollection,\n HTMLCollection,\n HTMLFormElement,\n HTMLSelectElement,\n MediaList,\n MimeTypeArray,\n NamedNodeMap,\n NodeList,\n PaintRequestList,\n Plugin,\n PluginArray,\n SVGLengthList,\n SVGNumberList,\n SVGPathSegList,\n SVGPointList,\n SVGStringList,\n SVGTransformList,\n SourceBufferList,\n StyleSheetList,\n TextTrackCueList,\n TextTrackList,\n TouchList\n}\n #@@iterator() -> iterator (values)\n\n{\n DOMTokenList,\n NodeList\n}\n #values() -> iterator\n #keys() -> iterator\n #entries() -> iterator\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/web/dom-collections\ncore-js(/library)/fn/dom-collections/iterator\n```\n[*Examples*](http://goo.gl/lfXVFl):\n```js\nfor(var {id} of document.querySelectorAll('*')){\n if(id)console.log(id);\n}\n\nfor(var [index, {id}] of document.querySelectorAll('*').entries()){\n if(id)console.log(index, id);\n}\n```\n### Non-standard\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/core\n```\n#### Object\nModules [`core.object.is-object`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/core.object.is-object.js), [`core.object.classof`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/core.object.classof.js), [`core.object.define`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/core.object.define.js), [`core.object.make`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/core.object.make.js).\n```js\nObject\n .isObject(var) -> bool\n .classof(var) -> string\n .define(target, mixin) -> target\n .make(proto | null, mixin?) -> object\n```\n\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/core/object\ncore-js(/library)/fn/object/is-object\ncore-js(/library)/fn/object/define\ncore-js(/library)/fn/object/make\n```\nObject classify [*examples*](http://goo.gl/YZQmGo):\n```js\nObject.isObject({}); // => true\nObject.isObject(isNaN); // => true\nObject.isObject(null); // => false\n\nvar classof = Object.classof;\n\nclassof(null); // => 'Null'\nclassof(undefined); // => 'Undefined'\nclassof(1); // => 'Number'\nclassof(true); // => 'Boolean'\nclassof('string'); // => 'String'\nclassof(Symbol()); // => 'Symbol'\n\nclassof(new Number(1)); // => 'Number'\nclassof(new Boolean(true)); // => 'Boolean'\nclassof(new String('string')); // => 'String'\n\nvar fn = function(){}\n , list = (function(){return arguments})(1, 2, 3);\n\nclassof({}); // => 'Object'\nclassof(fn); // => 'Function'\nclassof([]); // => 'Array'\nclassof(list); // => 'Arguments'\nclassof(/./); // => 'RegExp'\nclassof(new TypeError); // => 'Error'\n\nclassof(new Set); // => 'Set'\nclassof(new Map); // => 'Map'\nclassof(new WeakSet); // => 'WeakSet'\nclassof(new WeakMap); // => 'WeakMap'\nclassof(new Promise(fn)); // => 'Promise'\n\nclassof([].values()); // => 'Array Iterator'\nclassof(new Set().values()); // => 'Set Iterator'\nclassof(new Map().values()); // => 'Map Iterator'\n\nclassof(Math); // => 'Math'\nclassof(JSON); // => 'JSON'\n\nfunction Example(){}\nExample.prototype[Symbol.toStringTag] = 'Example';\n\nclassof(new Example); // => 'Example'\n```\n`Object.define` and `Object.make` [*examples*](http://goo.gl/rtpD5Z):\n```js\n// Before:\nObject.defineProperty(target, 'c', {\n enumerable: true,\n configurable: true,\n get: function(){\n return this.a + this.b;\n }\n});\n\n// After:\nObject.define(target, {\n get c(){\n return this.a + this.b;\n }\n});\n\n// Shallow object cloning with prototype and descriptors:\nvar copy = Object.make(Object.getPrototypeOf(src), src);\n\n// Simple inheritance:\nfunction Vector2D(x, y){\n this.x = x;\n this.y = y;\n}\nObject.define(Vector2D.prototype, {\n get xy(){\n return Math.hypot(this.x, this.y);\n }\n});\nfunction Vector3D(x, y, z){\n Vector2D.apply(this, arguments);\n this.z = z;\n}\nVector3D.prototype = Object.make(Vector2D.prototype, {\n constructor: Vector3D,\n get xyz(){\n return Math.hypot(this.x, this.y, this.z);\n }\n});\n\nvar vector = new Vector3D(9, 12, 20);\nconsole.log(vector.xy); // => 15\nconsole.log(vector.xyz); // => 25\nvector.y++;\nconsole.log(vector.xy); // => 15.811388300841896\nconsole.log(vector.xyz); // => 25.495097567963924\n```\n#### Dict\nModule [`core.dict`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/core.dict.js). Based on [TC39 discuss](https://github.com/rwaldron/tc39-notes/blob/master/es6/2012-11/nov-29.md#collection-apis-review) / [strawman](http://wiki.ecmascript.org/doku.php?id=harmony:modules_standard#dictionaries).\n```js\n[new] Dict(iterable (entries) | object ?) -> dict\n .isDict(var) -> bool\n .values(object) -> iterator\n .keys(object) -> iterator\n .entries(object) -> iterator (entries)\n .has(object, key) -> bool\n .get(object, key) -> val\n .set(object, key, value) -> object\n .forEach(object, fn(val, key, @), that) -> void\n .map(object, fn(val, key, @), that) -> new @\n .mapPairs(object, fn(val, key, @), that) -> new @\n .filter(object, fn(val, key, @), that) -> new @\n .some(object, fn(val, key, @), that) -> bool\n .every(object, fn(val, key, @), that) -> bool\n .find(object, fn(val, key, @), that) -> val\n .findKey(object, fn(val, key, @), that) -> key\n .keyOf(object, var) -> key\n .includes(object, var) -> bool\n .reduce(object, fn(memo, val, key, @), memo?) -> var\n```\n\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/core/dict\ncore-js(/library)/fn/dict\n```\n`Dict` create object without prototype from iterable or simple object.\n\n[*Examples*](http://goo.gl/pnp8Vr):\n```js\nvar map = new Map([['a', 1], ['b', 2], ['c', 3]]);\n\nDict(); // => {__proto__: null}\nDict({a: 1, b: 2, c: 3}); // => {__proto__: null, a: 1, b: 2, c: 3}\nDict(map); // => {__proto__: null, a: 1, b: 2, c: 3}\nDict([1, 2, 3].entries()); // => {__proto__: null, 0: 1, 1: 2, 2: 3}\n\nvar dict = Dict({a: 42});\ndict instanceof Object; // => false\ndict.a; // => 42\ndict.toString; // => undefined\n'a' in dict; // => true\n'hasOwnProperty' in dict; // => false\n\nDict.isDict({}); // => false\nDict.isDict(Dict()); // => true\n```\n`Dict.keys`, `Dict.values` and `Dict.entries` returns iterators for objects.\n\n[*Examples*](http://goo.gl/xAvECH):\n```js\nvar dict = {a: 1, b: 2, c: 3};\n\nfor(var key of Dict.keys(dict))console.log(key); // => 'a', 'b', 'c'\n\nfor(var val of Dict.values(dict))console.log(val); // => 1, 2, 3\n\nfor(var [key, val] of Dict.entries(dict)){\n console.log(key); // => 'a', 'b', 'c'\n console.log(val); // => 1, 2, 3\n}\n\nnew Map(Dict.entries(dict)); // => Map {a: 1, b: 2, c: 3}\n```\nBasic dict operations for objects with prototype [*examples*](http://goo.gl/B28UnG):\n```js\n'q' in {q: 1}; // => true\n'toString' in {}; // => true\n\nDict.has({q: 1}, 'q'); // => true\nDict.has({}, 'toString'); // => false\n\n({q: 1})['q']; // => 1\n({}).toString; // => function toString(){ [native code] }\n\nDict.get({q: 1}, 'q'); // => 1\nDict.get({}, 'toString'); // => undefined\n\nvar O = {};\nO['q'] = 1;\nO['q']; // => 1\nO['__proto__'] = {w: 2};\nO['__proto__']; // => {w: 2}\nO['w']; // => 2\n\nvar O = {};\nDict.set(O, 'q', 1);\nO['q']; // => 1\nDict.set(O, '__proto__', {w: 2});\nO['__proto__']; // => {w: 2}\nO['w']; // => undefined\n```\nOther methods of `Dict` module are static equivalents of `Array.prototype` methods for dictionaries.\n\n[*Examples*](http://goo.gl/xFi1RH):\n```js\nvar dict = {a: 1, b: 2, c: 3};\n\nDict.forEach(dict, console.log, console);\n// => 1, 'a', {a: 1, b: 2, c: 3}\n// => 2, 'b', {a: 1, b: 2, c: 3}\n// => 3, 'c', {a: 1, b: 2, c: 3}\n\nDict.map(dict, function(it){\n return it * it;\n}); // => {a: 1, b: 4, c: 9}\n\nDict.mapPairs(dict, function(val, key){\n if(key != 'b')return [key + key, val * val];\n}); // => {aa: 1, cc: 9}\n\nDict.filter(dict, function(it){\n return it % 2;\n}); // => {a: 1, c: 3}\n\nDict.some(dict, function(it){\n return it === 2;\n}); // => true\n\nDict.every(dict, function(it){\n return it === 2;\n}); // => false\n\nDict.find(dict, function(it){\n return it > 2;\n}); // => 3\nDict.find(dict, function(it){\n return it > 4;\n}); // => undefined\n\nDict.findKey(dict, function(it){\n return it > 2;\n}); // => 'c'\nDict.findKey(dict, function(it){\n return it > 4;\n}); // => undefined\n\nDict.keyOf(dict, 2); // => 'b'\nDict.keyOf(dict, 4); // => undefined\n\nDict.includes(dict, 2); // => true\nDict.includes(dict, 4); // => false\n\nDict.reduce(dict, function(memo, it){\n return memo + it;\n}); // => 6\nDict.reduce(dict, function(memo, it){\n return memo + it;\n}, ''); // => '123'\n```\n#### Partial application\nModule [`core.function.part`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/core.function.part.js).\n```js\nFunction\n #part(...args | _) -> fn(...args)\n```\n\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js/core/function\ncore-js(/library)/fn/function/part\ncore-js(/library)/fn/function/virtual/part\ncore-js(/library)/fn/_\n```\n`Function#part` partial apply function without `this` binding. Uses global variable `_` (`core._` for builds without global namespace pollution) as placeholder and not conflict with `Underscore` / `LoDash`.\n\n[*Examples*](http://goo.gl/p9ZJ8K):\n```js\nvar fn1 = log.part(1, 2);\nfn1(3, 4); // => 1, 2, 3, 4\n\nvar fn2 = log.part(_, 2, _, 4);\nfn2(1, 3); // => 1, 2, 3, 4\n\nvar fn3 = log.part(1, _, _, 4);\nfn3(2, 3); // => 1, 2, 3, 4\n\nfn2(1, 3, 5); // => 1, 2, 3, 4, 5\nfn2(1); // => 1, 2, undefined, 4\n```\n#### Number Iterator\nModule [`core.number.iterator`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/core.number.iterator.js).\n```js\nNumber\n #@@iterator() -> iterator\n```\n\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/core/number\ncore-js(/library)/fn/number/iterator\ncore-js(/library)/fn/number/virtual/iterator\n```\n[*Examples*](http://goo.gl/o45pCN):\n```js\nfor(var i of 3)console.log(i); // => 0, 1, 2\n\n[...10]; // => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n\nArray.from(10, Math.random); // => [0.9817775336559862, 0.02720663254149258, ...]\n\nArray.from(10, function(it){\n return this + it * it;\n}, .42); // => [0.42, 1.42, 4.42, 9.42, 16.42, 25.42, 36.42, 49.42, 64.42, 81.42]\n```\n#### Escaping strings\nModules [`core.regexp.escape`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/core.regexp.escape.js), [`core.string.escape-html`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/core.string.escape-html.js) and [`core.string.unescape-html`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/core.string.unescape-html.js).\n```js\nRegExp\n .escape(str) -> str\nString\n #escapeHTML() -> str\n #unescapeHTML() -> str\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/core/regexp\ncore-js(/library)/core/string\ncore-js(/library)/fn/regexp/escape\ncore-js(/library)/fn/string/escape-html\ncore-js(/library)/fn/string/unescape-html\ncore-js(/library)/fn/string/virtual/escape-html\ncore-js(/library)/fn/string/virtual/unescape-html\n```\n[*Examples*](http://goo.gl/6bOvsQ):\n```js\nRegExp.escape('Hello, []{}()*+?.\\\\^$|!'); // => 'Hello, \\[\\]\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|!'\n\n''.escapeHTML(); // => '<script>doSomething();</script>'\n'<script>doSomething();</script>'.unescapeHTML(); // => ''\n```\n#### delay\nModule [`core.delay`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/core.delay.js). [Promise](#ecmascript-6-promise)-returning delay function, [esdiscuss](https://esdiscuss.org/topic/promise-returning-delay-function).\n```js\ndelay(ms) -> promise\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/core/delay\ncore-js(/library)/fn/delay\n```\n[*Examples*](http://goo.gl/lbucba):\n```js\ndelay(1e3).then(() => console.log('after 1 sec'));\n\n(async () => {\n await delay(3e3);\n console.log('after 3 sec');\n\n while(await delay(3e3))console.log('each 3 sec');\n})();\n```\n#### Helpers for iterators\nModules [`core.is-iterable`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/core.is-iterable.js), [`core.get-iterator`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/core.get-iterator.js), [`core.get-iterator-method`](https://github.com/zloirock/core-js/blob/v2.5.7/modules/core.get-iterator-method.js) - helpers for check iterability / get iterator in the `library` version or, for example, for `arguments` object:\n```js\ncore\n .isIterable(var) -> bool\n .getIterator(iterable) -> iterator\n .getIteratorMethod(var) -> function | undefined\n```\n[*CommonJS entry points:*](#commonjs)\n```js\ncore-js(/library)/fn/is-iterable\ncore-js(/library)/fn/get-iterator\ncore-js(/library)/fn/get-iterator-method\n```\n[*Examples*](http://goo.gl/SXsM6D):\n```js\nvar list = (function(){\n return arguments;\n})(1, 2, 3);\n\nconsole.log(core.isIterable(list)); // true;\n\nvar iter = core.getIterator(list);\nconsole.log(iter.next().value); // 1\nconsole.log(iter.next().value); // 2\nconsole.log(iter.next().value); // 3\nconsole.log(iter.next().value); // undefined\n\ncore.getIterator({}); // TypeError: [object Object] is not iterable!\n\nvar iterFn = core.getIteratorMethod(list);\nconsole.log(typeof iterFn); // 'function'\nvar iter = iterFn.call(list);\nconsole.log(iter.next().value); // 1\nconsole.log(iter.next().value); // 2\nconsole.log(iter.next().value); // 3\nconsole.log(iter.next().value); // undefined\n\nconsole.log(core.getIteratorMethod({})); // undefined\n```\n\n## Missing polyfills\n- ES5 `JSON` is missing now only in IE7- and never will it be added to `core-js`, if you need it in these old browsers, many implementations are available, for example, [json3](https://github.com/bestiejs/json3).\n- ES6 `String#normalize` is not a very useful feature, but this polyfill will be very large. If you need it, you can use [unorm](https://github.com/walling/unorm/).\n- ES6 `Proxy` can't be polyfilled, but for Node.js / Chromium with additional flags you can try [harmony-reflect](https://github.com/tvcutsem/harmony-reflect) for adapt old style `Proxy` API to final ES6 version.\n- ES6 logic for `@@isConcatSpreadable` and `@@species` (in most places) can be polyfilled without problems, but it will cause a serious slowdown in popular cases in some engines. It will be polyfilled when it will be implemented in modern engines.\n- ES7 `SIMD`. `core-js` doesn't add polyfill of this feature because of large size and some other reasons. You can use [this polyfill](https://github.com/tc39/ecmascript_simd/blob/master/src/ecmascript_simd.js).\n- `window.fetch` is not a cross-platform feature, in some environments it makes no sense. For this reason, I don't think it should be in `core-js`. Looking at a large number of requests it *may be* added in the future. Now you can use, for example, [this polyfill](https://github.com/github/fetch).\n- ECMA-402 `Intl` is missed because of size. You can use [this polyfill](https://github.com/andyearnshaw/Intl.js/).\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/zloirock/core-js/issues" - }, - "homepage": "https://github.com/zloirock/core-js#readme", - "_id": "core-js@2.5.7", - "_requested": { - "type": "version", - "registry": true, - "raw": "core-js@2.5.7", - "name": "core-js", - "escapedName": "core-js", - "rawSpec": "2.5.7", - "saveSpec": "[Circular]", - "fetchSpec": "2.5.7" - }, - "_spec": "2.5.7", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "core-js@2.5.7", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/core-js", - "error": "[Circular]", - "extraneous": false, - "peerMissing": [ - { - "requiredBy": "@alfresco/adf-core@2.6.1", - "requires": "core-js@2.4.1" - } - ] - }, - "peerMissing": true - }, - "hammerjs": { - "version": "2.0.8", - "from": "hammerjs@2.0.8", - "resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz" - }, - "minimatch-browser": { - "version": "1.0.0", - "from": "minimatch-browser@1.0.0", - "resolved": "https://registry.npmjs.org/minimatch-browser/-/minimatch-browser-1.0.0.tgz" - }, - "moment": { - "version": "2.22.2", - "from": "moment@2.22.2", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz" - }, - "moment-es6": { - "version": "1.0.0", - "from": "moment-es6@1.0.0", - "resolved": "https://registry.npmjs.org/moment-es6/-/moment-es6-1.0.0.tgz" - }, - "pdfjs-dist": { - "required": { - "name": "pdfjs-dist", - "version": "2.0.489", - "main": "build/pdf.js", - "description": "Generic build of Mozilla's PDF.js library.", - "keywords": [ - "Mozilla", - "pdf", - "pdf.js" - ], - "homepage": "http://mozilla.github.io/pdf.js/", - "bugs": { - "url": "https://github.com/mozilla/pdf.js/issues" - }, - "license": "Apache-2.0", - "dependencies": { - "node-ensure": { - "name": "node-ensure", - "version": "0.0.0", - "description": "Async module-loading library and protocol for bundlers/loaders targeting isomorphic apps and Node.js.", - "main": "index.js", - "browser": { - "./index.js": "./browser.js" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [ - "require", - "ensure", - "dynamic", - "module", - "loader", - "bundler", - "async" - ], - "author": { - "name": "Carl A. Bauer" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/bauerca/node-ensure.git" - }, - "bugs": { - "url": "https://github.com/bauerca/node-ensure/issues" - }, - "homepage": "https://github.com/bauerca/node-ensure", - "license": "MIT", - "_resolved": "https://registry.npmjs.org/node-ensure/-/node-ensure-0.0.0.tgz", - "_integrity": "sha1-7K52QVDemYYexcgQ/V0Jaxg5Mqc=", - "_from": "node-ensure@0.0.0", - "readme": "# node-ensure\n\nA simple library that shims asynchronous module loading into Node.js to help\nwith building module bundlers and client-side loaders for isomorphic apps.\nThis library is super slim (read the source) and mainly represents an agreement\nbetween developers and users of a particular bundler/loader.\n\nNOTE: This module is *not* compatible with Browserify. It is for developers that\nwant to split their bundles for the client. For example, see\n[dynapack](https://github.com/bauerca/dynapack).\n\n*Syntax is inspired by the CommonJS\n[Modules/Async/A](http://wiki.commonjs.org/wiki/Modules/Async/A) proposal.*\n\n\n## Installation\n\n```\nnpm install node-ensure\n```\n\n## Example\n\n```js\nvar ensure = require('node-ensure');\n\nensure(['superagent', 'react'], function(err) {\n var request = require('superagent');\n var React = require('react');\n\n // Do the coolest of things.\n});\n```\n\nIf your bundler needs `require.ensure`, do this instead:\n\n```js\nrequire.ensure = require('node-ensure');\n\nrequire.ensure(['superagent', 'react'], function(err) {\n var request = require('superagent');\n var React = require('react');\n\n // Do the coolest of things.\n});\n```\n\n## Usage\n\nThe returned function takes an array of strings and a callback, in that\norder (see the example above). The callback takes a single error argument, which\nusually indicates a network problem or other client-side loader-specific runtime\nerror (it should never receive an error when used in Node.js).\n\nWithin the ensure callback, load modules with standard require calls.\n\n## Bundlers/Loaders\n\nThis library primarily constitutes an agreement between users and developers of\nmodule bundlers and (client-side) loaders. The users agree to the usage instructions\nsupplied above.\n\nBundlers and/or loaders must adhere to the following:\n\n- The bundler/loader uses the package.json `\"browser\"` property for replacing\n server-only modules with browser-ready counterparts (a la Browserify).\n- The `require` function passed to a module must have a `require.ensure`\n function.\n- Each `require.ensure` must accept the same arguments as described in [Usage](#usage).\n- Each `require.ensure` must not access variables via closure unless those variables\n are shared by **all** `require.ensure` functions.\n- Each `require.ensure` may access properties\n on `this`. However, this assumes users have attached node-ensure to `require` via\n `require.ensure = require('node-ensure')`.\n\nHappy loading!\n\n# License\n\nMIT\n", - "readmeFilename": "README.md", - "_id": "node-ensure@0.0.0", - "_requested": { - "type": "version", - "registry": true, - "raw": "node-ensure@0.0.0", - "name": "node-ensure", - "escapedName": "node-ensure", - "rawSpec": "0.0.0", - "saveSpec": "[Circular]", - "fetchSpec": "0.0.0" - }, - "_spec": "0.0.0", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "node-ensure@0.0.0", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/node-ensure", - "error": "[Circular]", - "extraneous": false - }, - "worker-loader": { - "name": "worker-loader", - "version": "1.1.1", - "author": { - "name": "Tobias Koppers @sokra" - }, - "description": "worker loader module for webpack", - "main": "dist/cjs.js", - "files": [ - "dist" - ], - "engines": { - "node": ">= 4.8 < 5.0.0 || >= 5.10" - }, - "scripts": { - "start": "npm run build -- -w", - "build": "cross-env NODE_ENV=production babel src -d dist --ignore 'src/**/*.test.js' --copy-files", - "clean": "del-cli dist", - "lint": "eslint --cache src test", - "lint-staged": "lint-staged", - "prebuild": "npm run clean", - "prepare": "npm run build", - "release": "standard-version", - "security": "nsp check", - "test": "jest", - "test:watch": "jest --watch", - "test:coverage": "jest --collectCoverageFrom='src/**/*.js' --coverage", - "travis:lint": "npm run lint && npm run security", - "travis:test": "npm run test -- --runInBand", - "travis:coverage": "npm run test:coverage -- --runInBand", - "appveyor:test": "npm run test", - "defaults": "webpack-defaults" - }, - "peerDependencies": { - "webpack": "^2.0.0 || ^3.0.0 || ^4.0.0" - }, - "dependencies": { - "loader-utils": { - "name": "loader-utils", - "version": "1.1.0", - "author": { - "name": "Tobias Koppers @sokra" - }, - "description": "utils for webpack loaders", - "dependencies": { - "big.js": { - "name": "big.js", - "description": "A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic", - "version": "3.2.0", - "keywords": [ - "arbitrary", - "precision", - "arithmetic", - "big", - "number", - "decimal", - "float", - "biginteger", - "bigdecimal", - "bignumber", - "bigint", - "bignum" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/MikeMcl/big.js.git" - }, - "main": "big.js", - "author": { - "name": "Michael Mclaughlin", - "email": "M8ch88l@gmail.com" - }, - "bugs": { - "url": "https://github.com/MikeMcl/big.js/issues" - }, - "engines": { - "node": "*" - }, - "license": "MIT", - "scripts": { - "test": "node ./test/every-test.js", - "build": "uglifyjs big.js --source-map doc/big.js.map -c -m -o big.min.js --preamble \"/* big.js v3.2.0 https://github.com/MikeMcl/big.js/LICENCE */\"" - }, - "files": [ - "big.js", - "big.min.js" - ], - "_resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "_integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", - "_from": "big.js@3.2.0", - "readme": "\r\n# big.js #\r\n\r\nA small, fast JavaScript library for arbitrary-precision decimal arithmetic.\r\n\r\nThe little sister to [bignumber.js](https://github.com/MikeMcl/bignumber.js/).\r\nSee also [decimal.js](https://github.com/MikeMcl/decimal.js/), and [here](https://github.com/MikeMcl/big.js/wiki) for the difference between them.\r\n\r\n## Features\r\n\r\n - Faster, smaller and easier-to-use than JavaScript versions of Java's BigDecimal\r\n - Only 2.7 KB minified and gzipped\r\n - Simple API\r\n - Replicates the `toExponential`, `toFixed` and `toPrecision` methods of JavaScript's Number type\r\n - Includes a `sqrt` method\r\n - Stores values in an accessible decimal floating point format\r\n - No dependencies\r\n - Comprehensive [documentation](http://mikemcl.github.io/big.js/) and test set\r\n\r\n## Load\r\n\r\nThe library is the single JavaScript file *big.js* (or *big.min.js*, which is *big.js* minified).\r\n\r\nIt can be loaded via a script tag in an HTML document for the browser\r\n\r\n \r\n\r\nor as a CommonJS, [Node.js](http://nodejs.org) or AMD module using `require`.\r\n\r\n var Big = require('big.js');\r\n\r\nFor Node.js, the library is available from the npm registry:\r\n\r\n $ npm install big.js\r\n\r\n\r\n\r\n## Use\r\n\r\n*In all examples below, `var`, semicolons and `toString` calls are not shown.\r\nIf a commented-out value is in quotes it means `toString` has been called on the preceding expression.*\r\n\r\nThe library exports a single function: Big, the constructor of Big number instances.\r\nIt accepts a value of type Number, String or Big number Object.\r\n\r\n x = new Big(123.4567)\r\n y = Big('123456.7e-3') // 'new' is optional\r\n z = new Big(x)\r\n x.eq(y) && x.eq(z) && y.eq(z) // true\r\n\r\nA Big number is immutable in the sense that it is not changed by its methods.\r\n\r\n 0.3 - 0.1 // 0.19999999999999998\r\n x = new Big(0.3)\r\n x.minus(0.1) // \"0.2\"\r\n x // \"0.3\"\r\n\r\nThe methods that return a Big number can be chained.\r\n\r\n x.div(y).plus(z).times(9).minus('1.234567801234567e+8').plus(976.54321).div('2598.11772')\r\n x.sqrt().div(y).pow(3).gt(y.mod(z)) // true\r\n\r\nLike JavaScript's Number type, there are `toExponential`, `toFixed` and `toPrecision` methods.\r\n\r\n x = new Big(255.5)\r\n x.toExponential(5) // \"2.55500e+2\"\r\n x.toFixed(5) // \"255.50000\"\r\n x.toPrecision(5) // \"255.50\"\r\n\r\nThe maximum number of decimal places and the rounding mode used to round the results of the `div`, `sqrt` and `pow`\r\n(with negative exponent) methods is determined by the value of the `DP` and `RM` properties of the `Big` number constructor. \r\n\r\nThe other methods always give the exact result. \r\n\r\n(From *v3.0.0*, multiple Big number constructors can be created, see Change Log below.)\r\n\r\n Big.DP = 10\r\n Big.RM = 1\r\n\r\n x = new Big(2);\r\n y = new Big(3);\r\n z = x.div(y) // \"0.6666666667\"\r\n z.sqrt() // \"0.8164965809\"\r\n z.pow(-3) // \"3.3749999995\"\r\n z.times(z) // \"0.44444444448888888889\"\r\n z.times(z).round(10) // \"0.4444444445\"\r\n\r\n\r\nThe value of a Big number is stored in a decimal floating point format in terms of a coefficient, exponent and sign.\r\n\r\n x = new Big(-123.456);\r\n x.c // [1,2,3,4,5,6] coefficient (i.e. significand)\r\n x.e // 2 exponent\r\n x.s // -1 sign\r\n\r\nFor further information see the [API](http://mikemcl.github.io/big.js/) reference from the *doc* folder.\r\n\r\n## Test\r\n\r\nThe *test* directory contains the test scripts for each Big number method.\r\n\r\nThe tests can be run with Node or a browser.\r\n\r\nTo test a single method, from a command-line shell at the *test* directory, use e.g.\r\n\r\n $ node toFixed\r\n\r\nTo test all the methods\r\n\r\n $ node every-test\r\n\r\nFor the browser, see *single-test.html* and *every-test.html* in the *test/browser* directory.\r\n\r\n*big-vs-number.html* enables some of the methods of big.js to be compared with those of JavaScript's Number type.\r\n\r\n## Performance\r\n\r\nThe *perf* directory contains two applications and a *lib* directory containing the BigDecimal libraries used by both.\r\n\r\n*big-vs-bigdecimal.html* tests the performance of big.js against the JavaScript translations of two versions of BigDecimal, its use should be more or less self-explanatory.\r\n(The GWT version doesn't work in IE 6.)\r\n\r\n* GWT: java.math.BigDecimal\r\n\r\n* ICU4J: com.ibm.icu.math.BigDecimal\r\n\r\n\r\nThe BigDecimal in Node's npm registry is the GWT version. Despite its seeming popularity I have found it to have some serious bugs, see the Node script *perf/lib/bigdecimal_GWT/bugs.js* for examples of flaws in its *remainder*, *divide* and *compareTo* methods.\r\n\r\n*bigtime.js* is a Node command-line application which tests the performance of big.js against the GWT version of\r\nBigDecimal from the npm registry.\r\n\r\nFor example, to compare the time taken by the big.js `plus` method and the BigDecimal `add` method:\r\n\r\n $ node bigtime plus 10000 40\r\n\r\nThis will time 10000 calls to each, using operands of up to 40 random digits and will check that the results match.\r\n\r\nFor help:\r\n\r\n $ node bigtime -h\r\n\r\n## Build\r\n\r\nI.e. minify.\r\n\r\nFor Node, if uglify-js is installed globally ( `npm install uglify-js -g` ) then\r\n\r\n uglifyjs -o ./big.min.js ./big.js\r\n\r\nwill create *big.min.js*.\r\n\r\nThe *big.min.js* already present was created with *Microsoft Ajax Minifier 5.11*.\r\n\r\n## TypeScript\r\n\r\nThe [DefinitelyTyped](https://github.com/borisyankov/DefinitelyTyped) project has a TypeScript [definitions file](https://github.com/borisyankov/DefinitelyTyped/blob/master/big.js/big.js.d.ts) for big.js.\r\n\r\nThe definitions file can be added to your project via the [big.js.TypeScript.DefinitelyTyped](https://www.nuget.org/packages/big.js.TypeScript.DefinitelyTyped/0.0.1) NuGet package or via [tsd](http://definitelytyped.org/tsd/).\r\n\r\n tsd query big.js --action install\r\n\r\nAny questions about the TypeScript definitions file should be addressed to the DefinitelyTyped project.\r\n\r\n## Feedback\r\n\r\nFeedback is welcome.\r\n\r\nBugs/comments/questions?\r\nOpen an issue, or email\r\n\r\nMichael\r\nM8ch88l@gmail.com\r\n\r\nBitcoin donation to:\r\n**1DppGRQSjVSMgGxuygDEHQuWEdTiVEzJYG**\r\nThank you\r\n\r\n## Licence\r\n\r\nSee LICENCE.\r\n\r\n## Change Log\r\n\r\n####3.2.0\r\n\r\n* 14/09/17 Aid ES6 import.\r\n\r\n####3.1.3\r\n\r\n* Minor documentation updates.\r\n\r\n####3.1.2\r\n\r\n* README typo.\r\n\r\n####3.1.1\r\n\r\n* API documentation update, including FAQ additions.\r\n\r\n####3.1.0\r\n\r\n* Renamed and exposed `TO_EXP_NEG` and `TO_EXP_POS` as `Big.E_NEG` and\r\n `Big.E_POS`.\r\n\r\n####3.0.2\r\n\r\n* Remove *.npmignore*, use `files` field in *package.json* instead.\r\n\r\n####3.0.1\r\n\r\n* Added `sub`, `add` and `mul` aliases.\r\n* Clean-up after lint.\r\n\r\n####3.0.0\r\n\r\n* 10/12/14 Added [multiple constructor functionality](http://mikemcl.github.io/big.js/#faq).\r\n* No breaking changes or other additions, but a major code reorganisation,\r\n so *v3* seemed appropriate.\r\n\r\n####2.5.2\r\n\r\n* 1/11/14 Added bower.json.\r\n\r\n####2.5.1\r\n\r\n* 8/06/14 Amend README requires.\r\n\r\n####2.5.0\r\n\r\n* 26/01/14 Added `toJSON` method so serialization uses `toString`.\r\n\r\n####2.4.1\r\n\r\n* 17/10/13 Conform signed zero to IEEEE 754 (2008).\r\n\r\n####2.4.0\r\n\r\n* 19/09/13 Throw instances of `Error`.\r\n\r\n####2.3.0\r\n\r\n* 16/09/13 Added `cmp` method.\r\n\r\n####2.2.0\r\n\r\n* 11/07/13 Added 'round up' mode.\r\n\r\n####2.1.0\r\n\r\n* 26/06/13 Allow e.g. `.1` and `2.`.\r\n\r\n####2.0.0\r\n\r\n* 12/05/13 Added `abs` method and replaced `cmp` with `eq`, `gt`, `gte`, `lt`, and `lte` methods.\r\n\r\n####1.0.1\r\n\r\n* Changed default value of MAX_DP to 1E6\r\n\r\n####1.0.0\r\n\r\n* 7/11/2012 Initial release\r\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/MikeMcl/big.js#readme", - "_id": "big.js@3.2.0", - "_requested": { - "type": "version", - "registry": true, - "raw": "big.js@3.2.0", - "name": "big.js", - "escapedName": "big.js", - "rawSpec": "3.2.0", - "saveSpec": "[Circular]", - "fetchSpec": "3.2.0" - }, - "_spec": "3.2.0", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "big.js@3.2.0", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/big.js", - "error": "[Circular]", - "extraneous": false - }, - "emojis-list": { - "name": "emojis-list", - "description": "Complete list of standard emojis.", - "homepage": "https://github.com/Kikobeats/emojis-list", - "version": "2.1.0", - "main": "./index.js", - "author": { - "name": "Kiko Beats", - "email": "josefrancisco.verdu@gmail.com", - "url": "https://github.com/Kikobeats" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/kikobeats/emojis-list.git" - }, - "bugs": { - "url": "https://github.com/Kikobeats/emojis-list/issues" - }, - "keywords": [ - "archive", - "complete", - "emoji", - "list", - "standard" - ], - "devDependencies": { - "acho": "latest", - "browserify": "latest", - "cheerio": "latest", - "got": ">=5 <6", - "gulp": "latest", - "gulp-header": "latest", - "gulp-uglify": "latest", - "gulp-util": "latest", - "standard": "latest", - "vinyl-buffer": "latest", - "vinyl-source-stream": "latest" - }, - "engines": { - "node": ">= 0.10" - }, - "files": [ - "index.js" - ], - "scripts": { - "pretest": "standard update.js", - "test": "echo 'YOLO'", - "update": "node update" - }, - "license": "MIT", - "_resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "_integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "_from": "emojis-list@2.1.0", - "readme": "# emojis-list\n\n[![Dependency status](http://img.shields.io/david/Kikobeats/emojis-list.svg?style=flat-square)](https://david-dm.org/Kikobeats/emojis-list)\n[![Dev Dependencies Status](http://img.shields.io/david/dev/Kikobeats/emojis-list.svg?style=flat-square)](https://david-dm.org/Kikobeats/emojis-list#info=devDependencies)\n[![NPM Status](http://img.shields.io/npm/dm/emojis-list.svg?style=flat-square)](https://www.npmjs.org/package/emojis-list)\n[![Donate](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square)](https://paypal.me/kikobeats)\n\n> Complete list of standard Unicode Hex Character Code that represent emojis.\n\n**NOTE**: The lists is related with the Unicode Hex Character Code. The representation of the emoji depend of the system. Will be possible that the system don't have all the representations.\n\n## Install\n\n```bash\nnpm install emojis-list --save\n```\n\nIf you want to use in the browser (powered by [Browserify](http://browserify.org/)):\n\n```bash\nbower install emojis-list --save\n```\n\nand later link in your HTML:\n\n```html\n\n```\n\n## Usage\n\n```\nvar emojis = require('emojis-list');\nconsole.log(emojis[0]);\n// => 🀄\n```\n\n## Related\n\n* [emojis-unicode](https://github.com/Kikobeats/emojis-unicode) – Complete list of standard Unicode codes that represent emojis.\n* [emojis-keywords](https://github.com/Kikobeats/emojis-keywords) – Complete list of am emoji shortcuts.\n* [is-emoji-keyword](https://github.com/Kikobeats/is-emoji-keyword) – Check if a word is a emoji shortcut.\n* [is-standard-emoji](https://github.com/kikobeats/is-standard-emoji) – Simply way to check if a emoji is a standard emoji.\n* [trim-emoji](https://github.com/Kikobeats/trim-emoji) – Deletes ':' from the begin and the end of an emoji shortcut.\n\n## License\n\nMIT © [Kiko Beats](http://www.kikobeats.com)\n", - "readmeFilename": "README.md", - "_id": "emojis-list@2.1.0", - "_requested": { - "type": "version", - "registry": true, - "raw": "emojis-list@2.1.0", - "name": "emojis-list", - "escapedName": "emojis-list", - "rawSpec": "2.1.0", - "saveSpec": "[Circular]", - "fetchSpec": "2.1.0" - }, - "_spec": "2.1.0", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "emojis-list@2.1.0", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/emojis-list", - "error": "[Circular]", - "extraneous": false - }, - "json5": { - "name": "json5", - "version": "0.5.1", - "description": "JSON for the ES5 era.", - "keywords": [ - "json", - "es5" - ], - "author": { - "name": "Aseem Kishore", - "email": "aseem.kishore@gmail.com" - }, - "contributors": [ - { - "name": "Max Nanasy", - "email": "max.nanasy@gmail.com" - }, - { - "name": "Andrew Eisenberg", - "email": "andrew@eisenberg.as" - }, - { - "name": "Jordan Tucker", - "email": "jordanbtucker@gmail.com" - } - ], - "main": "lib/json5.js", - "bin": { - "json5": "lib/cli.js" - }, - "files": [ - "lib/" - ], - "dependencies": {}, - "devDependencies": { - "gulp": "^3.9.1", - "gulp-jshint": "^2.0.1", - "jshint": "^2.9.3", - "jshint-stylish": "^2.2.1", - "mocha": "^3.1.0" - }, - "scripts": { - "build": "node ./lib/cli.js -c package.json5", - "test": "mocha --ui exports --reporter spec" - }, - "homepage": "http://json5.org/", - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/aseemk/json5.git" - }, - "_resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "_integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "_from": "json5@0.5.1", - "readme": "# JSON5 – Modern JSON\n\n[![Build Status](https://travis-ci.org/json5/json5.svg)](https://travis-ci.org/json5/json5)\n\nJSON is an excellent data format, but we think it can be better.\n\n**JSON5 is a proposed extension to JSON** that aims to make it easier for\n*humans to write and maintain* by hand. It does this by adding some minimal\nsyntax features directly from ECMAScript 5.\n\nJSON5 remains a **strict subset of JavaScript**, adds **no new data types**,\nand **works with all existing JSON content**.\n\nJSON5 is *not* an official successor to JSON, and JSON5 content may *not*\nwork with existing JSON parsers. For this reason, JSON5 files use a new .json5\nextension. *(TODO: new MIME type needed too.)*\n\nThe code here is a **reference JavaScript implementation** for both Node.js\nand all browsers. It’s based directly off of Douglas Crockford’s own [JSON\nimplementation][json_parse.js], and it’s both robust and secure.\n\n\n## Why\n\nJSON isn’t the friendliest to *write*. Keys need to be quoted, objects and\narrays can’t have trailing commas, and comments aren’t allowed — even though\nnone of these are the case with regular JavaScript today.\n\nThat was fine when JSON’s goal was to be a great data format, but JSON’s usage\nhas expanded beyond *machines*. JSON is now used for writing [configs][ex1],\n[manifests][ex2], even [tests][ex3] — all by *humans*.\n\n[ex1]: http://plovr.com/docs.html\n[ex2]: https://www.npmjs.org/doc/files/package.json.html\n[ex3]: http://code.google.com/p/fuzztester/wiki/JSONFileFormat\n\nThere are other formats that are human-friendlier, like YAML, but changing\nfrom JSON to a completely different format is undesirable in many cases.\nJSON5’s aim is to remain close to JSON and JavaScript.\n\n\n## Features\n\nThe following is the exact list of additions to JSON’s syntax introduced by\nJSON5. **All of these are optional**, and **all of these come from ES5**.\n\n### Objects\n\n- Object keys can be unquoted if they’re valid [identifiers][mdn_variables].\n Yes, even reserved keywords (like `default`) are valid unquoted keys in ES5\n [[§11.1.5](http://es5.github.com/#x11.1.5), [§7.6](http://es5.github.com/#x7.6)].\n ([More info](https://mathiasbynens.be/notes/javascript-identifiers))\n\n *(TODO: Unicode characters and escape sequences aren’t yet supported in this\n implementation.)*\n \n- Object keys can also be single-quoted.\n\n- Objects can have trailing commas.\n\n[mdn_variables]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Core_Language_Features#Variables\n\n### Arrays\n\n- Arrays can have trailing commas.\n\n### Strings\n\n- Strings can be single-quoted.\n\n- Strings can be split across multiple lines; just prefix each newline with a\n backslash. [ES5 [§7.8.4](http://es5.github.com/#x7.8.4)]\n\n### Numbers\n\n- Numbers can be hexadecimal (base 16).\n\n- Numbers can begin or end with a (leading or trailing) decimal point.\n\n- Numbers can include `Infinity`, `-Infinity`, `NaN`, and `-NaN`.\n\n- Numbers can begin with an explicit plus sign.\n\n### Comments\n\n- Both inline (single-line) and block (multi-line) comments are allowed.\n\n\n## Example\n\nThe following is a contrived example, but it illustrates most of the features:\n\n```js\n{\n foo: 'bar',\n while: true,\n\n this: 'is a \\\nmulti-line string',\n\n // this is an inline comment\n here: 'is another', // inline comment\n\n /* this is a block comment\n that continues on another line */\n\n hex: 0xDEADbeef,\n half: .5,\n delta: +10,\n to: Infinity, // and beyond!\n\n finally: 'a trailing comma',\n oh: [\n \"we shouldn't forget\",\n 'arrays can have',\n 'trailing commas too',\n ],\n}\n```\n\nThis implementation’s own [package.json5](package.json5) is more realistic:\n\n```js\n// This file is written in JSON5 syntax, naturally, but npm needs a regular\n// JSON file, so compile via `npm run build`. Be sure to keep both in sync!\n\n{\n name: 'json5',\n version: '0.5.0',\n description: 'JSON for the ES5 era.',\n keywords: ['json', 'es5'],\n author: 'Aseem Kishore ',\n contributors: [\n // TODO: Should we remove this section in favor of GitHub's list?\n // https://github.com/aseemk/json5/contributors\n 'Max Nanasy ',\n 'Andrew Eisenberg ',\n 'Jordan Tucker ',\n ],\n main: 'lib/json5.js',\n bin: 'lib/cli.js',\n files: [\"lib/\"],\n dependencies: {},\n devDependencies: {\n gulp: \"^3.9.1\",\n 'gulp-jshint': \"^2.0.0\",\n jshint: \"^2.9.1\",\n 'jshint-stylish': \"^2.1.0\",\n mocha: \"^2.4.5\"\n },\n scripts: {\n build: 'node ./lib/cli.js -c package.json5',\n test: 'mocha --ui exports --reporter spec',\n // TODO: Would it be better to define these in a mocha.opts file?\n },\n homepage: 'http://json5.org/',\n license: 'MIT',\n repository: {\n type: 'git',\n url: 'https://github.com/aseemk/json5.git',\n },\n}\n```\n\n\n## Community\n\nJoin the [Google Group](http://groups.google.com/group/json5) if you’re\ninterested in JSON5 news, updates, and general discussion.\nDon’t worry, it’s very low-traffic.\n\nThe [GitHub wiki](https://github.com/aseemk/json5/wiki) is a good place to track\nJSON5 support and usage. Contribute freely there!\n\n[GitHub Issues](https://github.com/aseemk/json5/issues) is the place to\nformally propose feature requests and report bugs. Questions and general\nfeedback are better directed at the Google Group.\n\n\n## Usage\n\nThis JavaScript implementation of JSON5 simply provides a `JSON5` object just\nlike the native ES5 `JSON` object.\n\nTo use from Node:\n\n```sh\nnpm install json5\n```\n\n```js\nvar JSON5 = require('json5');\n```\n\nTo use in the browser (adds the `JSON5` object to the global namespace):\n\n```html\n\n```\n\nThen in both cases, you can simply replace native `JSON` calls with `JSON5`:\n\n```js\nvar obj = JSON5.parse('{unquoted:\"key\",trailing:\"comma\",}');\nvar str = JSON5.stringify(obj);\n```\n\n`JSON5.parse` supports all of the JSON5 features listed above (*TODO: except\nUnicode*), as well as the native [`reviver` argument][json-parse].\n\n[json-parse]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse\n\n`JSON5.stringify` mainly avoids quoting keys where possible, but we hope to\nkeep expanding it in the future (e.g. to also output trailing commas).\nIt supports the native [`replacer` and `space` arguments][json-stringify],\nas well. *(TODO: Any implemented `toJSON` methods aren’t used today.)*\n\n[json-stringify]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify\n\n\n### Extras\n\nIf you’re running this on Node, you can also register a JSON5 `require()` hook\nto let you `require()` `.json5` files just like you can `.json` files:\n\n```js\nrequire('json5/lib/require');\nrequire('./path/to/foo'); // tries foo.json5 after foo.js, foo.json, etc.\nrequire('./path/to/bar.json5');\n```\n\nThis module also provides a `json5` executable (requires Node) for converting\nJSON5 files to JSON:\n\n```sh\njson5 -c path/to/foo.json5 # generates path/to/foo.json\n```\n\n\n## Development\n\n```sh\ngit clone git://github.com/aseemk/json5.git\ncd json5\nnpm install\nnpm test\n```\n\nAs the `package.json5` file states, be sure to run `npm run build` on changes\nto `package.json5`, since npm requires `package.json`.\n\nFeel free to [file issues](https://github.com/aseemk/json5/issues) and submit\n[pull requests](https://github.com/aseemk/json5/pulls) — contributions are\nwelcome. If you do submit a pull request, please be sure to add or update the\ntests, and ensure that `npm test` continues to pass.\n\n\n## License\n\nMIT. See [LICENSE.md](./LICENSE.md) for details.\n\n\n## Credits\n\n[Michael Bolin](http://bolinfest.com/) independently arrived at and published\nsome of these same ideas with awesome explanations and detail.\nRecommended reading:\n[Suggested Improvements to JSON](http://bolinfest.com/essays/json.html)\n\n[Douglas Crockford](http://www.crockford.com/) of course designed and built\nJSON, but his state machine diagrams on the [JSON website](http://json.org/),\nas cheesy as it may sound, gave me motivation and confidence that building a\nnew parser to implement these ideas this was within my reach!\nThis code is also modeled directly off of Doug’s open-source [json_parse.js][]\nparser. I’m super grateful for that clean and well-documented code.\n\n[json_parse.js]: https://github.com/douglascrockford/JSON-js/blob/master/json_parse.js\n\n[Max Nanasy](https://github.com/MaxNanasy) has been an early and prolific\nsupporter, contributing multiple patches and ideas. Thanks Max!\n\n[Andrew Eisenberg](https://github.com/aeisenberg) has contributed the\n`stringify` method.\n\n[Jordan Tucker](https://github.com/jordanbtucker) has aligned JSON5 more closely\nwith ES5 and is actively maintaining this project.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/aseemk/json5/issues" - }, - "_id": "json5@0.5.1", - "_requested": { - "type": "version", - "registry": true, - "raw": "json5@0.5.1", - "name": "json5", - "escapedName": "json5", - "rawSpec": "0.5.1", - "saveSpec": "[Circular]", - "fetchSpec": "0.5.1" - }, - "_spec": "0.5.1", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "json5@0.5.1", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/json5", - "error": "[Circular]", - "extraneous": false - } - }, - "scripts": { - "test": "mocha", - "posttest": "npm run lint", - "lint": "eslint lib test", - "travis": "npm run cover -- --report lcovonly", - "cover": "istanbul cover -x *.runtime.js node_modules/mocha/bin/_mocha", - "release": "npm test && standard-version" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/webpack/loader-utils.git" - }, - "engines": { - "node": ">=4.0.0" - }, - "devDependencies": { - "coveralls": "^2.11.2", - "eslint": "^3.15.0", - "eslint-plugin-node": "^4.0.1", - "istanbul": "^0.3.14", - "mocha": "^1.21.4", - "standard-version": "^4.0.0" - }, - "main": "lib/index.js", - "files": [ - "lib" - ], - "_resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "_integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", - "_from": "loader-utils@1.1.0", - "readme": "# loader-utils\n\n## Methods\n\n### `getOptions`\n\nRecommended way to retrieve the options of a loader invocation:\n\n```javascript\n// inside your loader\nconst options = loaderUtils.getOptions(this);\n```\n\n1. If `this.query` is a string:\n\t- Tries to parse the query string and returns a new object\n\t- Throws if it's not a valid query string\n2. If `this.query` is object-like, it just returns `this.query`\n3. In any other case, it just returns `null`\n\n**Please note:** The returned `options` object is *read-only*. It may be re-used across multiple invocations.\nIf you pass it on to another library, make sure to make a *deep copy* of it:\n\n```javascript\nconst options = Object.assign(\n\t{},\n\tloaderUtils.getOptions(this), // it is safe to pass null to Object.assign()\n\tdefaultOptions\n);\n// don't forget nested objects or arrays\noptions.obj = Object.assign({}, options.obj); \noptions.arr = options.arr.slice();\nsomeLibrary(options);\n```\n\n[clone-deep](https://www.npmjs.com/package/clone-deep) is a good library to make a deep copy of the options.\n\n#### Options as query strings\n\nIf the loader options have been passed as loader query string (`loader?some¶ms`), the string is parsed by using [`parseQuery`](#parsequery).\n\n### `parseQuery`\n\nParses a passed string (e.g. `loaderContext.resourceQuery`) as a query string, and returns an object.\n\n``` javascript\nconst params = loaderUtils.parseQuery(this.resourceQuery); // resource: `file?param1=foo`\nif (params.param1 === \"foo\") {\n\t// do something\n}\n```\n\nThe string is parsed like this:\n\n``` text\n -> Error\n? -> {}\n?flag -> { flag: true }\n?+flag -> { flag: true }\n?-flag -> { flag: false }\n?xyz=test -> { xyz: \"test\" }\n?xyz=1 -> { xyz: \"1\" } // numbers are NOT parsed\n?xyz[]=a -> { xyz: [\"a\"] }\n?flag1&flag2 -> { flag1: true, flag2: true }\n?+flag1,-flag2 -> { flag1: true, flag2: false }\n?xyz[]=a,xyz[]=b -> { xyz: [\"a\", \"b\"] }\n?a%2C%26b=c%2C%26d -> { \"a,&b\": \"c,&d\" }\n?{data:{a:1},isJSON5:true} -> { data: { a: 1 }, isJSON5: true }\n```\n\n### `stringifyRequest`\n\nTurns a request into a string that can be used inside `require()` or `import` while avoiding absolute paths.\nUse it instead of `JSON.stringify(...)` if you're generating code inside a loader.\n\n**Why is this necessary?** Since webpack calculates the hash before module paths are translated into module ids, we must avoid absolute paths to ensure\nconsistent hashes across different compilations.\n\nThis function:\n\n- resolves absolute requests into relative requests if the request and the module are on the same hard drive\n- replaces `\\` with `/` if the request and the module are on the same hard drive\n- won't change the path at all if the request and the module are on different hard drives\n- applies `JSON.stringify` to the result\n\n```javascript\nloaderUtils.stringifyRequest(this, \"./test.js\");\n// \"\\\"./test.js\\\"\"\n\nloaderUtils.stringifyRequest(this, \".\\\\test.js\");\n// \"\\\"./test.js\\\"\"\n\nloaderUtils.stringifyRequest(this, \"test\");\n// \"\\\"test\\\"\"\n\nloaderUtils.stringifyRequest(this, \"test/lib/index.js\");\n// \"\\\"test/lib/index.js\\\"\"\n\nloaderUtils.stringifyRequest(this, \"otherLoader?andConfig!test?someConfig\");\n// \"\\\"otherLoader?andConfig!test?someConfig\\\"\"\n\nloaderUtils.stringifyRequest(this, require.resolve(\"test\"));\n// \"\\\"../node_modules/some-loader/lib/test.js\\\"\"\n\nloaderUtils.stringifyRequest(this, \"C:\\\\module\\\\test.js\");\n// \"\\\"../../test.js\\\"\" (on Windows, in case the module and the request are on the same drive)\n\nloaderUtils.stringifyRequest(this, \"C:\\\\module\\\\test.js\");\n// \"\\\"C:\\\\module\\\\test.js\\\"\" (on Windows, in case the module and the request are on different drives)\n\nloaderUtils.stringifyRequest(this, \"\\\\\\\\network-drive\\\\test.js\");\n// \"\\\"\\\\\\\\network-drive\\\\\\\\test.js\\\"\" (on Windows, in case the module and the request are on different drives)\n```\n\n### `urlToRequest`\n\nConverts some resource URL to a webpack module request.\n\n```javascript\nconst url = \"path/to/module.js\";\nconst request = loaderUtils.urlToRequest(url); // \"./path/to/module.js\"\n```\n\n#### Module URLs\n\nAny URL containing a `~` will be interpreted as a module request. Anything after the `~` will be considered the request path.\n\n```javascript\nconst url = \"~path/to/module.js\";\nconst request = loaderUtils.urlToRequest(url); // \"path/to/module.js\"\n```\n\n#### Root-relative URLs\n\nURLs that are root-relative (start with `/`) can be resolved relative to some arbitrary path by using the `root` parameter:\n\n```javascript\nconst url = \"/path/to/module.js\";\nconst root = \"./root\";\nconst request = loaderUtils.urlToRequest(url, root); // \"./root/path/to/module.js\"\n```\n\nTo convert a root-relative URL into a module URL, specify a `root` value that starts with `~`:\n\n```javascript\nconst url = \"/path/to/module.js\";\nconst root = \"~\";\nconst request = loaderUtils.urlToRequest(url, root); // \"path/to/module.js\"\n```\n\n### `interpolateName`\n\nInterpolates a filename template using multiple placeholders and/or a regular expression.\nThe template and regular expression are set as query params called `name` and `regExp` on the current loader's context.\n\n```javascript\nconst interpolatedName = loaderUtils.interpolateName(loaderContext, name, options);\n```\n\nThe following tokens are replaced in the `name` parameter:\n\n* `[ext]` the extension of the resource\n* `[name]` the basename of the resource\n* `[path]` the path of the resource relative to the `context` query parameter or option.\n* `[folder]` the folder of the resource is in.\n* `[emoji]` a random emoji representation of `options.content`\n* `[emoji:]` same as above, but with a customizable number of emojis\n* `[hash]` the hash of `options.content` (Buffer) (by default it's the hex digest of the md5 hash)\n* `[:hash::]` optionally one can configure\n * other `hashType`s, i. e. `sha1`, `md5`, `sha256`, `sha512`\n * other `digestType`s, i. e. `hex`, `base26`, `base32`, `base36`, `base49`, `base52`, `base58`, `base62`, `base64`\n * and `length` the length in chars\n* `[N]` the N-th match obtained from matching the current file name against `options.regExp`\n\nExamples\n\n``` javascript\n// loaderContext.resourcePath = \"/app/js/javascript.js\"\nloaderUtils.interpolateName(loaderContext, \"js/[hash].script.[ext]\", { content: ... });\n// => js/9473fdd0d880a43c21b7778d34872157.script.js\n\n// loaderContext.resourcePath = \"/app/page.html\"\nloaderUtils.interpolateName(loaderContext, \"html-[hash:6].html\", { content: ... });\n// => html-9473fd.html\n\n// loaderContext.resourcePath = \"/app/flash.txt\"\nloaderUtils.interpolateName(loaderContext, \"[hash]\", { content: ... });\n// => c31e9820c001c9c4a86bce33ce43b679\n\n// loaderContext.resourcePath = \"/app/img/image.gif\"\nloaderUtils.interpolateName(loaderContext, \"[emoji]\", { content: ... });\n// => 👍\n\n// loaderContext.resourcePath = \"/app/img/image.gif\"\nloaderUtils.interpolateName(loaderContext, \"[emoji:4]\", { content: ... });\n// => 🙍🏢📤🐝\n\n// loaderContext.resourcePath = \"/app/img/image.png\"\nloaderUtils.interpolateName(loaderContext, \"[sha512:hash:base64:7].[ext]\", { content: ... });\n// => 2BKDTjl.png\n// use sha512 hash instead of md5 and with only 7 chars of base64\n\n// loaderContext.resourcePath = \"/app/img/myself.png\"\n// loaderContext.query.name =\nloaderUtils.interpolateName(loaderContext, \"picture.png\");\n// => picture.png\n\n// loaderContext.resourcePath = \"/app/dir/file.png\"\nloaderUtils.interpolateName(loaderContext, \"[path][name].[ext]?[hash]\", { content: ... });\n// => /app/dir/file.png?9473fdd0d880a43c21b7778d34872157\n\n// loaderContext.resourcePath = \"/app/js/page-home.js\"\nloaderUtils.interpolateName(loaderContext, \"script-[1].[ext]\", { regExp: \"page-(.*)\\\\.js\", content: ... });\n// => script-home.js\n```\n\n### `getHashDigest`\n\n``` javascript\nconst digestString = loaderUtils.getHashDigest(buffer, hashType, digestType, maxLength);\n```\n\n* `buffer` the content that should be hashed\n* `hashType` one of `sha1`, `md5`, `sha256`, `sha512` or any other node.js supported hash type\n* `digestType` one of `hex`, `base26`, `base32`, `base36`, `base49`, `base52`, `base58`, `base62`, `base64`\n* `maxLength` the maximum length in chars\n\n## License\n\nMIT (http://www.opensource.org/licenses/mit-license.php)\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/webpack/loader-utils/issues" - }, - "homepage": "https://github.com/webpack/loader-utils#readme", - "_id": "loader-utils@1.1.0", - "_requested": { - "type": "version", - "registry": true, - "raw": "loader-utils@1.1.0", - "name": "loader-utils", - "escapedName": "loader-utils", - "rawSpec": "1.1.0", - "saveSpec": "[Circular]", - "fetchSpec": "1.1.0" - }, - "_spec": "1.1.0", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "loader-utils@1.1.0", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/loader-utils", - "error": "[Circular]", - "extraneous": false - }, - "schema-utils": { - "name": "schema-utils", - "version": "0.4.5", - "author": { - "name": "Webpack Contrib", - "url": "https://github.com/webpack-contrib" - }, - "description": "Webpack Schema Validation Utilities", - "license": "MIT", - "main": "dist/cjs.js", - "files": [ - "dist" - ], - "scripts": { - "start": "npm run build -- -w", - "build": "cross-env NODE_ENV=production babel src -d dist --ignore 'src/**/*.test.js' --copy-files", - "clean": "del-cli dist", - "commitlint": "commitlint", - "commitmsg": "commitlint -e $GIT_PARAMS", - "lint": "eslint --cache src test", - "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", - "lint-staged": "lint-staged", - "prebuild": "npm run clean", - "prepare": "npm run build", - "release": "standard-version", - "release:ci": "conventional-github-releaser -p angular", - "release:validate": "commitlint --from=$(git describe --tags --abbrev=0) --to=$(git rev-parse HEAD)", - "security": "nsp check", - "test": "jest", - "test:watch": "jest --watch", - "test:coverage": "jest --collectCoverageFrom='src/**/*.js' --coverage", - "ci:lint": "npm run lint && npm run security", - "ci:test": "npm run test -- --runInBand", - "ci:coverage": "npm run test:coverage -- --runInBand", - "defaults": "webpack-defaults" - }, - "dependencies": { - "ajv": { - "name": "ajv", - "version": "6.5.2", - "description": "Another JSON Schema Validator", - "main": "lib/ajv.js", - "typings": "lib/ajv.d.ts", - "files": [ - "lib/", - "dist/", - "scripts/", - "LICENSE", - ".tonic_example.js" - ], - "scripts": { - "eslint": "eslint lib/*.js lib/compile/*.js spec/*.js scripts", - "jshint": "jshint lib/*.js lib/**/*.js --exclude lib/dotjs/**/*", - "test-spec": "mocha spec/*.spec.js -R spec", - "test-fast": "AJV_FAST_TEST=true npm run test-spec", - "test-debug": "mocha spec/*.spec.js --debug-brk -R spec", - "test-cov": "nyc npm run test-spec", - "test-ts": "tsc --target ES5 --noImplicitAny lib/ajv.d.ts", - "bundle": "del-cli dist && node ./scripts/bundle.js . Ajv pure_getters", - "bundle-beautify": "node ./scripts/bundle.js js-beautify", - "build": "del-cli lib/dotjs/*.js '!lib/dotjs/index.js' && node scripts/compile-dots.js", - "test-karma": "karma start --single-run --browsers PhantomJS", - "test-browser": "del-cli .browser && npm run bundle && scripts/prepare-tests && npm run test-karma", - "test": "npm run jshint && npm run eslint && npm run test-ts && npm run build && npm run test-cov && if-node-version 8 npm run test-browser", - "prepublish": "npm run build && npm run bundle", - "watch": "watch 'npm run build' ./lib/dot" - }, - "nyc": { - "exclude": [ - "**/spec/**", - "node_modules" - ], - "reporter": [ - "lcov", - "text-summary" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/epoberezkin/ajv.git" - }, - "keywords": [ - "JSON", - "schema", - "validator", - "validation", - "jsonschema", - "json-schema", - "json-schema-validator", - "json-schema-validation" - ], - "author": { - "name": "Evgeny Poberezkin" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/epoberezkin/ajv/issues" - }, - "homepage": "https://github.com/epoberezkin/ajv", - "tonicExampleFilename": ".tonic_example.js", - "dependencies": { - "fast-deep-equal": { - "name": "fast-deep-equal", - "version": "2.0.1", - "description": "Fast deep equal", - "main": "index.js", - "scripts": { - "eslint": "eslint *.js benchmark spec", - "test-spec": "mocha spec/*.spec.js -R spec", - "test-cov": "nyc npm run test-spec", - "test-ts": "tsc --target ES5 --noImplicitAny index.d.ts", - "test": "npm run eslint && npm run test-ts && npm run test-cov" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/epoberezkin/fast-deep-equal.git" - }, - "keywords": [ - "fast", - "equal", - "deep-equal" - ], - "author": { - "name": "Evgeny Poberezkin" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/epoberezkin/fast-deep-equal/issues" - }, - "homepage": "https://github.com/epoberezkin/fast-deep-equal#readme", - "devDependencies": { - "benchmark": "^2.1.4", - "coveralls": "^2.13.1", - "deep-eql": "latest", - "deep-equal": "latest", - "eslint": "^4.0.0", - "lodash": "latest", - "mocha": "^3.4.2", - "nano-equal": "latest", - "nyc": "^11.0.2", - "pre-commit": "^1.2.2", - "ramda": "latest", - "shallow-equal-fuzzy": "latest", - "typescript": "^2.6.1", - "underscore": "latest" - }, - "nyc": { - "exclude": [ - "**/spec/**", - "node_modules" - ], - "reporter": [ - "lcov", - "text-summary" - ] - }, - "files": [ - "index.js", - "index.d.ts" - ], - "types": "index.d.ts", - "_resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "_integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "_from": "fast-deep-equal@2.0.1", - "readme": "# fast-deep-equal\nThe fastest deep equal\n\n[![Build Status](https://travis-ci.org/epoberezkin/fast-deep-equal.svg?branch=master)](https://travis-ci.org/epoberezkin/fast-deep-equal)\n[![npm version](https://badge.fury.io/js/fast-deep-equal.svg)](http://badge.fury.io/js/fast-deep-equal)\n[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/fast-deep-equal/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/fast-deep-equal?branch=master)\n\n\n## Install\n\n```bash\nnpm install fast-deep-equal\n```\n\n\n## Features\n\n- ES5 compatible\n- works in node.js (0.10+) and browsers (IE9+)\n- checks equality of Date and RegExp objects by value.\n\n\n## Usage\n\n```javascript\nvar equal = require('fast-deep-equal');\nconsole.log(equal({foo: 'bar'}, {foo: 'bar'})); // true\n```\n\n\n## Performance benchmark\n\nNode.js v9.11.1:\n\n```\nfast-deep-equal x 226,960 ops/sec ±1.55% (86 runs sampled)\nnano-equal x 218,210 ops/sec ±0.79% (89 runs sampled)\nshallow-equal-fuzzy x 206,762 ops/sec ±0.84% (88 runs sampled)\nunderscore.isEqual x 128,668 ops/sec ±0.75% (91 runs sampled)\nlodash.isEqual x 44,895 ops/sec ±0.67% (85 runs sampled)\ndeep-equal x 51,616 ops/sec ±0.96% (90 runs sampled)\ndeep-eql x 28,218 ops/sec ±0.42% (85 runs sampled)\nassert.deepStrictEqual x 1,777 ops/sec ±1.05% (86 runs sampled)\nramda.equals x 13,466 ops/sec ±0.82% (86 runs sampled)\nThe fastest is fast-deep-equal\n```\n\nTo run benchmark (requires node.js 6+):\n\n```bash\nnpm install\nnode benchmark\n```\n\n\n## License\n\n[MIT](https://github.com/epoberezkin/fast-deep-equal/blob/master/LICENSE)\n", - "readmeFilename": "README.md", - "_id": "fast-deep-equal@2.0.1", - "_requested": { - "type": "version", - "registry": true, - "raw": "fast-deep-equal@2.0.1", - "name": "fast-deep-equal", - "escapedName": "fast-deep-equal", - "rawSpec": "2.0.1", - "saveSpec": "[Circular]", - "fetchSpec": "2.0.1" - }, - "_spec": "2.0.1", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "fast-deep-equal@2.0.1", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/fast-deep-equal", - "error": "[Circular]", - "extraneous": false - }, - "fast-json-stable-stringify": { - "name": "fast-json-stable-stringify", - "version": "2.0.0", - "description": "deterministic `JSON.stringify()` - a faster version of substack's json-stable-strigify without jsonify", - "main": "index.js", - "devDependencies": { - "benchmark": "^2.1.4", - "coveralls": "^3.0.0", - "eslint": "^4.9.0", - "fast-stable-stringify": "latest", - "faster-stable-stringify": "latest", - "json-stable-stringify": "latest", - "nyc": "^11.2.1", - "pre-commit": "^1.2.2", - "tape": "~1.0.4" - }, - "scripts": { - "eslint": "eslint index.js test", - "test-spec": "tape test/*.js", - "test": "npm run eslint && nyc npm run test-spec" - }, - "repository": { - "type": "git", - "url": "git://github.com/epoberezkin/fast-json-stable-stringify.git" - }, - "homepage": "https://github.com/epoberezkin/fast-json-stable-stringify", - "keywords": [ - "json", - "stringify", - "deterministic", - "hash", - "stable" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "nyc": { - "exclude": [ - "test", - "node_modules" - ], - "reporter": [ - "lcov", - "text-summary" - ] - }, - "_resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "_integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "_from": "fast-json-stable-stringify@2.0.0", - "readme": "# fast-json-stable-stringify\n\nDeterministic `JSON.stringify()` - a faster version of [@substack](https://github.com/substack)'s json-stable-strigify without [jsonify](https://github.com/substack/jsonify).\n\nYou can also pass in a custom comparison function.\n\n[![Build Status](https://travis-ci.org/epoberezkin/fast-json-stable-stringify.svg?branch=master)](https://travis-ci.org/epoberezkin/fast-json-stable-stringify)\n[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/fast-json-stable-stringify/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/fast-json-stable-stringify?branch=master)\n\n# example\n\n``` js\nvar stringify = require('fast-json-stable-stringify');\nvar obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };\nconsole.log(stringify(obj));\n```\n\noutput:\n\n```\n{\"a\":3,\"b\":[{\"x\":4,\"y\":5,\"z\":6},7],\"c\":8}\n```\n\n\n# methods\n\n``` js\nvar stringify = require('fast-json-stable-stringify')\n```\n\n## var str = stringify(obj, opts)\n\nReturn a deterministic stringified string `str` from the object `obj`.\n\n\n## options\n\n### cmp\n\nIf `opts` is given, you can supply an `opts.cmp` to have a custom comparison\nfunction for object keys. Your function `opts.cmp` is called with these\nparameters:\n\n``` js\nopts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue })\n```\n\nFor example, to sort on the object key names in reverse order you could write:\n\n``` js\nvar stringify = require('fast-json-stable-stringify');\n\nvar obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };\nvar s = stringify(obj, function (a, b) {\n return a.key < b.key ? 1 : -1;\n});\nconsole.log(s);\n```\n\nwhich results in the output string:\n\n```\n{\"c\":8,\"b\":[{\"z\":6,\"y\":5,\"x\":4},7],\"a\":3}\n```\n\nOr if you wanted to sort on the object values in reverse order, you could write:\n\n```\nvar stringify = require('fast-json-stable-stringify');\n\nvar obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 };\nvar s = stringify(obj, function (a, b) {\n return a.value < b.value ? 1 : -1;\n});\nconsole.log(s);\n```\n\nwhich outputs:\n\n```\n{\"d\":6,\"c\":5,\"b\":[{\"z\":3,\"y\":2,\"x\":1},9],\"a\":10}\n```\n\n### cycles\n\nPass `true` in `opts.cycles` to stringify circular property as `__cycle__` - the result will not be a valid JSON string in this case.\n\nTypeError will be thrown in case of circular object without this option.\n\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install fast-json-stable-stringify\n```\n\n\n# benchmark\n\nTo run benchmark (requires Node.js 6+):\n```\nnode benchmark\n```\n\nResults:\n```\nfast-json-stable-stringify x 17,189 ops/sec ±1.43% (83 runs sampled)\njson-stable-stringify x 13,634 ops/sec ±1.39% (85 runs sampled)\nfast-stable-stringify x 20,212 ops/sec ±1.20% (84 runs sampled)\nfaster-stable-stringify x 15,549 ops/sec ±1.12% (84 runs sampled)\nThe fastest is fast-stable-stringify\n```\n\n\n# license\n\n[MIT](https://github.com/epoberezkin/fast-json-stable-stringify/blob/master/LICENSE)\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/epoberezkin/fast-json-stable-stringify/issues" - }, - "_id": "fast-json-stable-stringify@2.0.0", - "_requested": { - "type": "version", - "registry": true, - "raw": "fast-json-stable-stringify@2.0.0", - "name": "fast-json-stable-stringify", - "escapedName": "fast-json-stable-stringify", - "rawSpec": "2.0.0", - "saveSpec": "[Circular]", - "fetchSpec": "2.0.0" - }, - "_spec": "2.0.0", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "fast-json-stable-stringify@2.0.0", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/fast-json-stable-stringify", - "error": "[Circular]", - "extraneous": false - }, - "json-schema-traverse": { - "name": "json-schema-traverse", - "version": "0.4.1", - "description": "Traverse JSON Schema passing each schema object to callback", - "main": "index.js", - "scripts": { - "eslint": "eslint index.js spec", - "test-spec": "mocha spec -R spec", - "test": "npm run eslint && nyc npm run test-spec" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/epoberezkin/json-schema-traverse.git" - }, - "keywords": [ - "JSON-Schema", - "traverse", - "iterate" - ], - "author": { - "name": "Evgeny Poberezkin" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/epoberezkin/json-schema-traverse/issues" - }, - "homepage": "https://github.com/epoberezkin/json-schema-traverse#readme", - "devDependencies": { - "coveralls": "^2.13.1", - "eslint": "^3.19.0", - "mocha": "^3.4.2", - "nyc": "^11.0.2", - "pre-commit": "^1.2.2" - }, - "nyc": { - "exclude": [ - "**/spec/**", - "node_modules" - ], - "reporter": [ - "lcov", - "text-summary" - ] - }, - "_resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "_integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "_from": "json-schema-traverse@0.4.1", - "readme": "# json-schema-traverse\nTraverse JSON Schema passing each schema object to callback\n\n[![Build Status](https://travis-ci.org/epoberezkin/json-schema-traverse.svg?branch=master)](https://travis-ci.org/epoberezkin/json-schema-traverse)\n[![npm version](https://badge.fury.io/js/json-schema-traverse.svg)](https://www.npmjs.com/package/json-schema-traverse)\n[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/json-schema-traverse/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/json-schema-traverse?branch=master)\n\n\n## Install\n\n```\nnpm install json-schema-traverse\n```\n\n\n## Usage\n\n```javascript\nconst traverse = require('json-schema-traverse');\nconst schema = {\n properties: {\n foo: {type: 'string'},\n bar: {type: 'integer'}\n }\n};\n\ntraverse(schema, {cb});\n// cb is called 3 times with:\n// 1. root schema\n// 2. {type: 'string'}\n// 3. {type: 'integer'}\n\n// Or:\n\ntraverse(schema, {cb: {pre, post}});\n// pre is called 3 times with:\n// 1. root schema\n// 2. {type: 'string'}\n// 3. {type: 'integer'}\n//\n// post is called 3 times with:\n// 1. {type: 'string'}\n// 2. {type: 'integer'}\n// 3. root schema\n\n```\n\nCallback function `cb` is called for each schema object (not including draft-06 boolean schemas), including the root schema, in pre-order traversal. Schema references ($ref) are not resolved, they are passed as is. Alternatively, you can pass a `{pre, post}` object as `cb`, and then `pre` will be called before traversing child elements, and `post` will be called after all child elements have been traversed.\n\nCallback is passed these parameters:\n\n- _schema_: the current schema object\n- _JSON pointer_: from the root schema to the current schema object\n- _root schema_: the schema passed to `traverse` object\n- _parent JSON pointer_: from the root schema to the parent schema object (see below)\n- _parent keyword_: the keyword inside which this schema appears (e.g. `properties`, `anyOf`, etc.)\n- _parent schema_: not necessarily parent object/array; in the example above the parent schema for `{type: 'string'}` is the root schema\n- _index/property_: index or property name in the array/object containing multiple schemas; in the example above for `{type: 'string'}` the property name is `'foo'`\n\n\n## Traverse objects in all unknown keywords\n\n```javascript\nconst traverse = require('json-schema-traverse');\nconst schema = {\n mySchema: {\n minimum: 1,\n maximum: 2\n }\n};\n\ntraverse(schema, {allKeys: true, cb});\n// cb is called 2 times with:\n// 1. root schema\n// 2. mySchema\n```\n\nWithout option `allKeys: true` callback will be called only with root schema.\n\n\n## License\n\n[MIT](https://github.com/epoberezkin/json-schema-traverse/blob/master/LICENSE)\n", - "readmeFilename": "README.md", - "_id": "json-schema-traverse@0.4.1", - "_requested": { - "type": "version", - "registry": true, - "raw": "json-schema-traverse@0.4.1", - "name": "json-schema-traverse", - "escapedName": "json-schema-traverse", - "rawSpec": "0.4.1", - "saveSpec": "[Circular]", - "fetchSpec": "0.4.1" - }, - "_spec": "0.4.1", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "json-schema-traverse@0.4.1", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/json-schema-traverse", - "error": "[Circular]", - "extraneous": false - }, - "uri-js": { - "name": "uri-js", - "version": "4.2.2", - "description": "An RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.", - "main": "dist/es5/uri.all.js", - "types": "dist/es5/uri.all.d.ts", - "directories": { - "test": "tests" - }, - "scripts": { - "build:esnext": "tsc", - "build:es5": "rollup -c && cp dist/esnext/uri.d.ts dist/es5/uri.all.d.ts && npm run build:es5:fix-sourcemap", - "build:es5:fix-sourcemap": "sorcery -i dist/es5/uri.all.js", - "build:es5:min": "uglifyjs dist/es5/uri.all.js --support-ie8 --output dist/es5/uri.all.min.js --in-source-map dist/es5/uri.all.js.map --source-map uri.all.min.js.map --comments --compress --mangle --pure-funcs merge subexp && mv uri.all.min.js.map dist/es5/ && cp dist/es5/uri.all.d.ts dist/es5/uri.all.min.d.ts", - "build": "npm run build:esnext && npm run build:es5 && npm run build:es5:min", - "test": "mocha -u mocha-qunit-ui dist/es5/uri.all.js tests/tests.js" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/garycourt/uri-js.git" - }, - "keywords": [ - "URI", - "IRI", - "IDN", - "URN", - "UUID", - "HTTP", - "HTTPS", - "MAILTO", - "RFC3986", - "RFC3987", - "RFC5891", - "RFC2616", - "RFC2818", - "RFC2141", - "RFC4122", - "RFC4291", - "RFC5952", - "RFC6068", - "RFC6874" - ], - "author": { - "name": "Gary Court", - "email": "gary.court@gmail.com" - }, - "license": "BSD-2-Clause", - "bugs": { - "url": "https://github.com/garycourt/uri-js/issues" - }, - "homepage": "https://github.com/garycourt/uri-js", - "devDependencies": { - "babel-cli": "^6.26.0", - "babel-plugin-external-helpers": "^6.22.0", - "babel-preset-latest": "^6.24.1", - "mocha": "^3.2.0", - "mocha-qunit-ui": "^0.1.3", - "rollup": "^0.41.6", - "rollup-plugin-babel": "^2.7.1", - "rollup-plugin-node-resolve": "^2.0.0", - "sorcery": "^0.10.0", - "typescript": "^2.8.1", - "uglify-js": "^2.8.14" - }, - "dependencies": { - "punycode": { - "name": "punycode", - "version": "2.1.1", - "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", - "homepage": "https://mths.be/punycode", - "main": "punycode.js", - "jsnext:main": "punycode.es6.js", - "module": "punycode.es6.js", - "engines": { - "node": ">=6" - }, - "keywords": [ - "punycode", - "unicode", - "idn", - "idna", - "dns", - "url", - "domain" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "contributors": [ - { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - } - ], - "repository": { - "type": "git", - "url": "git+https://github.com/bestiejs/punycode.js.git" - }, - "bugs": { - "url": "https://github.com/bestiejs/punycode.js/issues" - }, - "files": [ - "LICENSE-MIT.txt", - "punycode.js", - "punycode.es6.js" - ], - "scripts": { - "test": "mocha tests", - "prepublish": "node scripts/prepublish.js" - }, - "devDependencies": { - "codecov": "^1.0.1", - "istanbul": "^0.4.1", - "mocha": "^2.5.3" - }, - "jspm": { - "map": { - "./punycode.js": { - "node": "@node/punycode" - } - } - }, - "_resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "_integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "_from": "punycode@2.1.1", - "readme": "# Punycode.js [![Build status](https://travis-ci.org/bestiejs/punycode.js.svg?branch=master)](https://travis-ci.org/bestiejs/punycode.js) [![Code coverage status](http://img.shields.io/codecov/c/github/bestiejs/punycode.js.svg)](https://codecov.io/gh/bestiejs/punycode.js) [![Dependency status](https://gemnasium.com/bestiejs/punycode.js.svg)](https://gemnasium.com/bestiejs/punycode.js)\n\nPunycode.js is a robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891).\n\nThis JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm:\n\n* [The C example code from RFC 3492](https://tools.ietf.org/html/rfc3492#appendix-C)\n* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c)\n* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c)\n* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287)\n* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072))\n\nThis project was [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with Node.js from [v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc) until [v7](https://github.com/nodejs/node/pull/7941) (soft-deprecated).\n\nThe current version supports recent versions of Node.js only. It provides a CommonJS module and an ES6 module. For the old version that offers the same functionality with broader support, including Rhino, Ringo, Narwhal, and web browsers, see [v1.4.1](https://github.com/bestiejs/punycode.js/releases/tag/v1.4.1).\n\n## Installation\n\nVia [npm](https://www.npmjs.com/):\n\n```bash\nnpm install punycode --save\n```\n\nIn [Node.js](https://nodejs.org/):\n\n```js\nconst punycode = require('punycode');\n```\n\n## API\n\n### `punycode.decode(string)`\n\nConverts a Punycode string of ASCII symbols to a string of Unicode symbols.\n\n```js\n// decode domain name parts\npunycode.decode('maana-pta'); // 'mañana'\npunycode.decode('--dqo34k'); // '☃-⌘'\n```\n\n### `punycode.encode(string)`\n\nConverts a string of Unicode symbols to a Punycode string of ASCII symbols.\n\n```js\n// encode domain name parts\npunycode.encode('mañana'); // 'maana-pta'\npunycode.encode('☃-⌘'); // '--dqo34k'\n```\n\n### `punycode.toUnicode(input)`\n\nConverts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode.\n\n```js\n// decode domain names\npunycode.toUnicode('xn--maana-pta.com');\n// → 'mañana.com'\npunycode.toUnicode('xn----dqo34k.com');\n// → '☃-⌘.com'\n\n// decode email addresses\npunycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq');\n// → 'джумла@джpумлатест.bрфa'\n```\n\n### `punycode.toASCII(input)`\n\nConverts a lowercased Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that’s already in ASCII.\n\n```js\n// encode domain names\npunycode.toASCII('mañana.com');\n// → 'xn--maana-pta.com'\npunycode.toASCII('☃-⌘.com');\n// → 'xn----dqo34k.com'\n\n// encode email addresses\npunycode.toASCII('джумла@джpумлатест.bрфa');\n// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'\n```\n\n### `punycode.ucs2`\n\n#### `punycode.ucs2.decode(string)`\n\nCreates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16.\n\n```js\npunycode.ucs2.decode('abc');\n// → [0x61, 0x62, 0x63]\n// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE:\npunycode.ucs2.decode('\\uD834\\uDF06');\n// → [0x1D306]\n```\n\n#### `punycode.ucs2.encode(codePoints)`\n\nCreates a string based on an array of numeric code point values.\n\n```js\npunycode.ucs2.encode([0x61, 0x62, 0x63]);\n// → 'abc'\npunycode.ucs2.encode([0x1D306]);\n// → '\\uD834\\uDF06'\n```\n\n### `punycode.version`\n\nA string representing the current Punycode.js version number.\n\n## Author\n\n| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|\n| [Mathias Bynens](https://mathiasbynens.be/) |\n\n## License\n\nPunycode.js is available under the [MIT](https://mths.be/mit) license.\n", - "readmeFilename": "README.md", - "_id": "punycode@2.1.1", - "_requested": { - "type": "version", - "registry": true, - "raw": "punycode@2.1.1", - "name": "punycode", - "escapedName": "punycode", - "rawSpec": "2.1.1", - "saveSpec": "[Circular]", - "fetchSpec": "2.1.1" - }, - "_spec": "2.1.1", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "punycode@2.1.1", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/punycode", - "error": "[Circular]", - "extraneous": false - } - }, - "_resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "_integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "_from": "uri-js@4.2.2", - "readme": "# URI.js\n\nURI.js is an [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt) compliant, scheme extendable URI parsing/validating/resolving library for all JavaScript environments (browsers, Node.js, etc).\nIt is also compliant with the IRI ([RFC 3987](http://www.ietf.org/rfc/rfc3987.txt)), IDNA ([RFC 5890](http://www.ietf.org/rfc/rfc5890.txt)), IPv6 Address ([RFC 5952](http://www.ietf.org/rfc/rfc5952.txt)), IPv6 Zone Identifier ([RFC 6874](http://www.ietf.org/rfc/rfc6874.txt)) specifications.\n\nURI.js has an extensive test suite, and works in all (Node.js, web) environments. It weighs in at 6.2kb (gzipped, 16kb deflated).\n\n## API\n\n### Parsing\n\n\tURI.parse(\"uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body\");\n\t//returns:\n\t//{\n\t// scheme : \"uri\",\n\t// userinfo : \"user:pass\",\n\t// host : \"example.com\",\n\t// port : 123,\n\t// path : \"/one/two.three\",\n\t// query : \"q1=a1&q2=a2\",\n\t// fragment : \"body\"\n\t//}\n\n### Serializing\n\n\tURI.serialize({scheme : \"http\", host : \"example.com\", fragment : \"footer\"}) === \"http://example.com/#footer\"\n\n### Resolving\n\n\tURI.resolve(\"uri://a/b/c/d?q\", \"../../g\") === \"uri://a/g\"\n\n### Normalizing\n\n\tURI.normalize(\"HTTP://ABC.com:80/%7Esmith/home.html\") === \"http://abc.com/~smith/home.html\"\n\n### Comparison\n\n\tURI.equal(\"example://a/b/c/%7Bfoo%7D\", \"eXAMPLE://a/./b/../b/%63/%7bfoo%7d\") === true\n\n### IP Support\n\n\t//IPv4 normalization\n\tURI.normalize(\"//192.068.001.000\") === \"//192.68.1.0\"\n\n\t//IPv6 normalization\n\tURI.normalize(\"//[2001:0:0DB8::0:0001]\") === \"//[2001:0:db8::1]\"\n\n\t//IPv6 zone identifier support\n\tURI.parse(\"//[2001:db8::7%25en1]\");\n\t//returns:\n\t//{\n\t// host : \"2001:db8::7%en1\"\n\t//}\n\n### IRI Support\n\n\t//convert IRI to URI\n\tURI.serialize(URI.parse(\"http://examplé.org/rosé\")) === \"http://xn--exampl-gva.org/ros%C3%A9\"\n\t//convert URI to IRI\n\tURI.serialize(URI.parse(\"http://xn--exampl-gva.org/ros%C3%A9\"), {iri:true}) === \"http://examplé.org/rosé\"\n\n### Options\n\nAll of the above functions can accept an additional options argument that is an object that can contain one or more of the following properties:\n\n*\t`scheme` (string)\n\n\tIndicates the scheme that the URI should be treated as, overriding the URI's normal scheme parsing behavior.\n\n*\t`reference` (string)\n\n\tIf set to `\"suffix\"`, it indicates that the URI is in the suffix format, and the validator will use the option's `scheme` property to determine the URI's scheme.\n\n*\t`tolerant` (boolean, false)\n\n\tIf set to `true`, the parser will relax URI resolving rules.\n\n*\t`absolutePath` (boolean, false)\n\n\tIf set to `true`, the serializer will not resolve a relative `path` component.\n\n*\t`iri` (boolean, false)\n\n\tIf set to `true`, the serializer will unescape non-ASCII characters as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt).\n\n*\t`unicodeSupport` (boolean, false)\n\n\tIf set to `true`, the parser will unescape non-ASCII characters in the parsed output as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt).\n\n*\t`domainHost` (boolean, false)\n\n\tIf set to `true`, the library will treat the `host` component as a domain name, and convert IDNs (International Domain Names) as per [RFC 5891](http://www.ietf.org/rfc/rfc5891.txt).\n\n## Scheme Extendable\n\nURI.js supports inserting custom [scheme](http://en.wikipedia.org/wiki/URI_scheme) dependent processing rules. Currently, URI.js has built in support for the following schemes:\n\n*\thttp \\[[RFC 2616](http://www.ietf.org/rfc/rfc2616.txt)\\]\n*\thttps \\[[RFC 2818](http://www.ietf.org/rfc/rfc2818.txt)\\]\n*\tmailto \\[[RFC 6068](http://www.ietf.org/rfc/rfc6068.txt)\\]\n*\turn \\[[RFC 2141](http://www.ietf.org/rfc/rfc2141.txt)\\]\n*\turn:uuid \\[[RFC 4122](http://www.ietf.org/rfc/rfc4122.txt)\\]\n\n### HTTP Support\n\n\tURI.equal(\"HTTP://ABC.COM:80\", \"http://abc.com/\") === true\n\n### Mailto Support\n\n\tURI.parse(\"mailto:alpha@example.com,bravo@example.com?subject=SUBSCRIBE&body=Sign%20me%20up!\");\n\t//returns:\n\t//{\n\t//\tscheme : \"mailto\",\n\t//\tto : [\"alpha@example.com\", \"bravo@example.com\"],\n\t//\tsubject : \"SUBSCRIBE\",\n\t//\tbody : \"Sign me up!\"\n\t//}\n\n\tURI.serialize({\n\t\tscheme : \"mailto\",\n\t\tto : [\"alpha@example.com\"],\n\t\tsubject : \"REMOVE\",\n\t\tbody : \"Please remove me\",\n\t\theaders : {\n\t\t\tcc : \"charlie@example.com\"\n\t\t}\n\t}) === \"mailto:alpha@example.com?cc=charlie@example.com&subject=REMOVE&body=Please%20remove%20me\"\n\n### URN Support\n\n\tURI.parse(\"urn:example:foo\");\n\t//returns:\n\t//{\n\t//\tscheme : \"urn\",\n\t//\tnid : \"example\",\n\t//\tnss : \"foo\",\n\t//}\n\n#### URN UUID Support\n\n\tURI.parse(\"urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6\");\n\t//returns:\n\t//{\n\t//\tscheme : \"urn\",\n\t//\tnid : \"example\",\n\t//\tuuid : \"f81d4fae-7dec-11d0-a765-00a0c91e6bf6\",\n\t//}\n\n## Usage\n\nTo load in a browser, use the following tag:\n\n\t\n\nTo load in a CommonJS (Node.js) environment, first install with npm by running on the command line:\n\n\tnpm install uri-js\n\nThen, in your code, load it using:\n\n\tconst URI = require(\"uri-js\");\n\nIf you are writing your code in ES6+ (ESNEXT) or TypeScript, you would load it using:\n\n\timport * as URI from \"uri-js\";\n\nOr you can load just what you need using named exports:\n\n\timport { parse, serialize, resolve, resolveComponents, normalize, equal, removeDotSegments, pctEncChar, pctDecChars, escapeComponent, unescapeComponent } from \"uri-js\";\n\n## Breaking changes\n\n### Breaking changes from 3.x\n\nURN parsing has been completely changed to better align with the specification. Scheme is now always `urn`, but has two new properties: `nid` which contains the Namspace Identifier, and `nss` which contains the Namespace Specific String. The `nss` property will be removed by higher order scheme handlers, such as the UUID URN scheme handler.\n\nThe UUID of a URN can now be found in the `uuid` property.\n\n### Breaking changes from 2.x\n\nURI validation has been removed as it was slow, exposed a vulnerabilty, and was generally not useful.\n\n### Breaking changes from 1.x\n\nThe `errors` array on parsed components is now an `error` string.\n\n## License ([Simplified BSD](http://en.wikipedia.org/wiki/BSD_licenses#2-clause))\n\nCopyright 2011 Gary Court. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n1.\tRedistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\n2.\tRedistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY GARY COURT \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nThe views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Gary Court.\n", - "readmeFilename": "README.md", - "_id": "uri-js@4.2.2", - "_requested": { - "type": "version", - "registry": true, - "raw": "uri-js@4.2.2", - "name": "uri-js", - "escapedName": "uri-js", - "rawSpec": "4.2.2", - "saveSpec": "[Circular]", - "fetchSpec": "4.2.2" - }, - "_spec": "4.2.2", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "uri-js@4.2.2", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": { - "punycode": "^2.1.0" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/uri-js", - "error": "[Circular]", - "extraneous": false - } - }, - "devDependencies": { - "ajv-async": "^1.0.0", - "bluebird": "^3.1.5", - "brfs": "^2.0.0", - "browserify": "^16.2.0", - "chai": "^4.0.1", - "coveralls": "^3.0.1", - "del-cli": "^1.1.0", - "dot": "^1.0.3", - "eslint": "^5.0.0", - "gh-pages-generator": "^0.2.3", - "glob": "^7.0.0", - "if-node-version": "^1.0.0", - "js-beautify": "^1.7.3", - "jshint": "^2.9.4", - "json-schema-test": "^2.0.0", - "karma": "^2.0.2", - "karma-chrome-launcher": "^2.0.0", - "karma-mocha": "^1.1.1", - "karma-phantomjs-launcher": "^1.0.0", - "karma-sauce-launcher": "^1.1.0", - "mocha": "^5.1.1", - "nyc": "^12.0.1", - "phantomjs-prebuilt": "^2.1.4", - "pre-commit": "^1.1.1", - "require-globify": "^1.3.0", - "typescript": "^2.8.3", - "uglify-js": "^3.3.24", - "watch": "^1.0.0" - }, - "_resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", - "_integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", - "_from": "ajv@6.5.2", - "readme": "\"Ajv\n\n# Ajv: Another JSON Schema Validator\n\nThe fastest JSON Schema validator for Node.js and browser. Supports draft-04/06/07.\n\n\n[![Build Status](https://travis-ci.org/epoberezkin/ajv.svg?branch=master)](https://travis-ci.org/epoberezkin/ajv)\n[![npm](https://img.shields.io/npm/v/ajv.svg)](https://www.npmjs.com/package/ajv)\n[![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/ajv)\n[![Coverage Status](https://coveralls.io/repos/epoberezkin/ajv/badge.svg?branch=master&service=github)](https://coveralls.io/github/epoberezkin/ajv?branch=master)\n[![Greenkeeper badge](https://badges.greenkeeper.io/epoberezkin/ajv.svg)](https://greenkeeper.io/)\n[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv)\n\n\n## Using version 6\n\n[JSON Schema draft-07](http://json-schema.org/latest/json-schema-validation.html) is published.\n\n[Ajv version 6.0.0](https://github.com/epoberezkin/ajv/releases/tag/v6.0.0) that supports draft-07 is released. It may require either migrating your schemas or updating your code (to continue using draft-04 and v5 schemas, draft-06 schemas will be supported without changes).\n\n__Please note__: To use Ajv with draft-06 schemas you need to explicitly add the meta-schema to the validator instance:\n\n```javascript\najv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json'));\n```\n\nTo use Ajv with draft-04 schemas in addition to explicitly adding meta-schema you also need to use option schemaId:\n\n```javascript\nvar ajv = new Ajv({schemaId: 'id'});\n// If you want to use both draft-04 and draft-06/07 schemas:\n// var ajv = new Ajv({schemaId: 'auto'});\najv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json'));\n```\n\n\n## Contents\n\n- [Performance](#performance)\n- [Features](#features)\n- [Getting started](#getting-started)\n- [Frequently Asked Questions](https://github.com/epoberezkin/ajv/blob/master/FAQ.md)\n- [Using in browser](#using-in-browser)\n- [Command line interface](#command-line-interface)\n- Validation\n - [Keywords](#validation-keywords)\n - [Annotation keywords](#annotation-keywords)\n - [Formats](#formats)\n - [Combining schemas with $ref](#ref)\n - [$data reference](#data-reference)\n - NEW: [$merge and $patch keywords](#merge-and-patch-keywords)\n - [Defining custom keywords](#defining-custom-keywords)\n - [Asynchronous schema compilation](#asynchronous-schema-compilation)\n - [Asynchronous validation](#asynchronous-validation)\n- Modifying data during validation\n - [Filtering data](#filtering-data)\n - [Assigning defaults](#assigning-defaults)\n - [Coercing data types](#coercing-data-types)\n- API\n - [Methods](#api)\n - [Options](#options)\n - [Validation errors](#validation-errors)\n- [Plugins](#plugins)\n- [Related packages](#related-packages)\n- [Packages using Ajv](#some-packages-using-ajv)\n- [Tests, Contributing, History, License](#tests)\n\n\n## Performance\n\nAjv generates code using [doT templates](https://github.com/olado/doT) to turn JSON Schemas into super-fast validation functions that are efficient for v8 optimization.\n\nCurrently Ajv is the fastest and the most standard compliant validator according to these benchmarks:\n\n- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place\n- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster\n- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html)\n- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html)\n\n\nPerformance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark):\n\n[![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=32,4,1&chs=600x416&chxl=-1:|djv|ajv|json-schema-validator-generator|jsen|is-my-json-valid|themis|z-schema|jsck|skeemas|json-schema-library|tv4&chd=t:100,98,72.1,66.8,50.1,15.1,6.1,3.8,1.2,0.7,0.2)](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance)\n\n\n## Features\n\n- Ajv implements full JSON Schema [draft-06/07](http://json-schema.org/) and draft-04 standards:\n - all validation keywords (see [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md))\n - full support of remote refs (remote schemas have to be added with `addSchema` or compiled to be available)\n - support of circular references between schemas\n - correct string lengths for strings with unicode pairs (can be turned off)\n - [formats](#formats) defined by JSON Schema draft-07 standard and custom formats (can be turned off)\n - [validates schemas against meta-schema](#api-validateschema)\n- supports [browsers](#using-in-browser) and Node.js 0.10-8.x\n- [asynchronous loading](#asynchronous-schema-compilation) of referenced schemas during compilation\n- \"All errors\" validation mode with [option allErrors](#options)\n- [error messages with parameters](#validation-errors) describing error reasons to allow creating custom error messages\n- i18n error messages support with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package\n- [filtering data](#filtering-data) from additional properties\n- [assigning defaults](#assigning-defaults) to missing properties and items\n- [coercing data](#coercing-data-types) to the types specified in `type` keywords\n- [custom keywords](#defining-custom-keywords)\n- draft-06/07 keywords `const`, `contains`, `propertyNames` and `if/then/else`\n- draft-06 boolean schemas (`true`/`false` as a schema to always pass/fail).\n- keywords `switch`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) with [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package\n- [$data reference](#data-reference) to use values from the validated data as values for the schema keywords\n- [asynchronous validation](#asynchronous-validation) of custom formats and keywords\n\nCurrently Ajv is the only validator that passes all the tests from [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite) (according to [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark), apart from the test that requires that `1.0` is not an integer that is impossible to satisfy in JavaScript).\n\n\n## Install\n\n```\nnpm install ajv\n```\n\n\n## Getting started\n\nTry it in the Node.js REPL: https://tonicdev.com/npm/ajv\n\n\nThe fastest validation call:\n\n```javascript\nvar Ajv = require('ajv');\nvar ajv = new Ajv(); // options can be passed, e.g. {allErrors: true}\nvar validate = ajv.compile(schema);\nvar valid = validate(data);\nif (!valid) console.log(validate.errors);\n```\n\nor with less code\n\n```javascript\n// ...\nvar valid = ajv.validate(schema, data);\nif (!valid) console.log(ajv.errors);\n// ...\n```\n\nor\n\n```javascript\n// ...\nvar valid = ajv.addSchema(schema, 'mySchema')\n .validate('mySchema', data);\nif (!valid) console.log(ajv.errorsText());\n// ...\n```\n\nSee [API](#api) and [Options](#options) for more details.\n\nAjv compiles schemas to functions and caches them in all cases (using schema serialized with [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) or a custom function as a key), so that the next time the same schema is used (not necessarily the same object instance) it won't be compiled again.\n\nThe best performance is achieved when using compiled functions returned by `compile` or `getSchema` methods (there is no additional function call).\n\n__Please note__: every time a validation function or `ajv.validate` are called `errors` property is overwritten. You need to copy `errors` array reference to another variable if you want to use it later (e.g., in the callback). See [Validation errors](#validation-errors)\n\n\n## Using in browser\n\nYou can require Ajv directly from the code you browserify - in this case Ajv will be a part of your bundle.\n\nIf you need to use Ajv in several bundles you can create a separate UMD bundle using `npm run bundle` script (thanks to [siddo420](https://github.com/siddo420)).\n\nThen you need to load Ajv in the browser:\n```html\n\n```\n\nThis bundle can be used with different module systems; it creates global `Ajv` if no module system is found.\n\nThe browser bundle is available on [cdnjs](https://cdnjs.com/libraries/ajv).\n\nAjv is tested with these browsers:\n\n[![Sauce Test Status](https://saucelabs.com/browser-matrix/epoberezkin.svg)](https://saucelabs.com/u/epoberezkin)\n\n__Please note__: some frameworks, e.g. Dojo, may redefine global require in such way that is not compatible with CommonJS module format. In such case Ajv bundle has to be loaded before the framework and then you can use global Ajv (see issue [#234](https://github.com/epoberezkin/ajv/issues/234)).\n\n\n## Command line interface\n\nCLI is available as a separate npm package [ajv-cli](https://github.com/jessedc/ajv-cli). It supports:\n\n- compiling JSON Schemas to test their validity\n- BETA: generating standalone module exporting a validation function to be used without Ajv (using [ajv-pack](https://github.com/epoberezkin/ajv-pack))\n- migrate schemas to draft-07 (using [json-schema-migrate](https://github.com/epoberezkin/json-schema-migrate))\n- validating data file(s) against JSON Schema\n- testing expected validity of data against JSON Schema\n- referenced schemas\n- custom meta-schemas\n- files in JSON and JavaScript format\n- all Ajv options\n- reporting changes in data after validation in [JSON-patch](https://tools.ietf.org/html/rfc6902) format\n\n\n## Validation keywords\n\nAjv supports all validation keywords from draft-07 of JSON Schema standard:\n\n- [type](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#type)\n- [for numbers](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-numbers) - maximum, minimum, exclusiveMaximum, exclusiveMinimum, multipleOf\n- [for strings](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-strings) - maxLength, minLength, pattern, format\n- [for arrays](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-arrays) - maxItems, minItems, uniqueItems, items, additionalItems, [contains](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#contains)\n- [for objects](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-objects) - maxProperties, minProperties, required, properties, patternProperties, additionalProperties, dependencies, [propertyNames](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#propertynames)\n- [for all types](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-all-types) - enum, [const](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#const)\n- [compound keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#compound-keywords) - not, oneOf, anyOf, allOf, [if/then/else](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#ifthenelse)\n\nWith [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package Ajv also supports validation keywords from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) for JSON Schema standard:\n\n- [patternRequired](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#patternrequired-proposed) - like `required` but with patterns that some property should match.\n- [formatMaximum, formatMinimum, formatExclusiveMaximum, formatExclusiveMinimum](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#formatmaximum--formatminimum-and-exclusiveformatmaximum--exclusiveformatminimum-proposed) - setting limits for date, time, etc.\n\nSee [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md) for more details.\n\n\n## Annotation keywords\n\nJSON Schema specification defines several annotation keywords that describe schema itself but do not perform any validation.\n\n- `title` and `description`: information about the data represented by that schema\n- `$comment` (NEW in draft-07): information for developers. With option `$comment` Ajv logs or passes the comment string to the user-supplied function. See [Options](#options).\n- `default`: a default value of the data instance, see [Assigning defaults](#assigning-defaults).\n- `examples` (NEW in draft-07): an array of data instances. Ajv does not check the validity of these instances against the schema.\n- `readOnly` and `writeOnly` (NEW in draft-07): marks data-instance as read-only or write-only in relation to the source of the data (database, api, etc.).\n- `contentEncoding`: [RFC 2045](https://tools.ietf.org/html/rfc2045#section-6.1 ), e.g., \"base64\".\n- `contentMediaType`: [RFC 2046](https://tools.ietf.org/html/rfc2046), e.g., \"image/png\".\n\n__Please note__: Ajv does not implement validation of the keywords `examples`, `contentEncoding` and `contentMediaType` but it reserves them. If you want to create a plugin that implements some of them, it should remove these keywords from the instance.\n\n\n## Formats\n\nThe following formats are supported for string validation with \"format\" keyword:\n\n- _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6).\n- _time_: time with optional time-zone.\n- _date-time_: date-time from the same source (time-zone is mandatory). `date`, `time` and `date-time` validate ranges in `full` mode and only regexp in `fast` mode (see [options](#options)).\n- _uri_: full URI.\n- _uri-reference_: URI reference, including full and relative URIs.\n- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570)\n- _url_: [URL record](https://url.spec.whatwg.org/#concept-url).\n- _email_: email address.\n- _hostname_: host name according to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5).\n- _ipv4_: IP address v4.\n- _ipv6_: IP address v6.\n- _regex_: tests whether a string is a valid regular expression by passing it to RegExp constructor.\n- _uuid_: Universally Unique IDentifier according to [RFC4122](http://tools.ietf.org/html/rfc4122).\n- _json-pointer_: JSON-pointer according to [RFC6901](https://tools.ietf.org/html/rfc6901).\n- _relative-json-pointer_: relative JSON-pointer according to [this draft](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00).\n\n__Please note__: JSON Schema draft-07 also defines formats `iri`, `iri-reference`, `idn-hostname` and `idn-email` for URLs, hostnames and emails with international characters. Ajv does not implement these formats. If you create Ajv plugin that implements them please make a PR to mention this plugin here.\n\nThere are two modes of format validation: `fast` and `full`. This mode affects formats `date`, `time`, `date-time`, `uri`, `uri-reference`, `email`, and `hostname`. See [Options](#options) for details.\n\nYou can add additional formats and replace any of the formats above using [addFormat](#api-addformat) method.\n\nThe option `unknownFormats` allows changing the default behaviour when an unknown format is encountered. In this case Ajv can either fail schema compilation (default) or ignore it (default in versions before 5.0.0). You also can whitelist specific format(s) to be ignored. See [Options](#options) for details.\n\nYou can find patterns used for format validation and the sources that were used in [formats.js](https://github.com/epoberezkin/ajv/blob/master/lib/compile/formats.js).\n\n\n## Combining schemas with $ref\n\nYou can structure your validation logic across multiple schema files and have schemas reference each other using `$ref` keyword.\n\nExample:\n\n```javascript\nvar schema = {\n \"$id\": \"http://example.com/schemas/schema.json\",\n \"type\": \"object\",\n \"properties\": {\n \"foo\": { \"$ref\": \"defs.json#/definitions/int\" },\n \"bar\": { \"$ref\": \"defs.json#/definitions/str\" }\n }\n};\n\nvar defsSchema = {\n \"$id\": \"http://example.com/schemas/defs.json\",\n \"definitions\": {\n \"int\": { \"type\": \"integer\" },\n \"str\": { \"type\": \"string\" }\n }\n};\n```\n\nNow to compile your schema you can either pass all schemas to Ajv instance:\n\n```javascript\nvar ajv = new Ajv({schemas: [schema, defsSchema]});\nvar validate = ajv.getSchema('http://example.com/schemas/schema.json');\n```\n\nor use `addSchema` method:\n\n```javascript\nvar ajv = new Ajv;\nvar validate = ajv.addSchema(defsSchema)\n .compile(schema);\n```\n\nSee [Options](#options) and [addSchema](#api) method.\n\n__Please note__:\n- `$ref` is resolved as the uri-reference using schema $id as the base URI (see the example).\n- References can be recursive (and mutually recursive) to implement the schemas for different data structures (such as linked lists, trees, graphs, etc.).\n- You don't have to host your schema files at the URIs that you use as schema $id. These URIs are only used to identify the schemas, and according to JSON Schema specification validators should not expect to be able to download the schemas from these URIs.\n- The actual location of the schema file in the file system is not used.\n- You can pass the identifier of the schema as the second parameter of `addSchema` method or as a property name in `schemas` option. This identifier can be used instead of (or in addition to) schema $id.\n- You cannot have the same $id (or the schema identifier) used for more than one schema - the exception will be thrown.\n- You can implement dynamic resolution of the referenced schemas using `compileAsync` method. In this way you can store schemas in any system (files, web, database, etc.) and reference them without explicitly adding to Ajv instance. See [Asynchronous schema compilation](#asynchronous-schema-compilation).\n\n\n## $data reference\n\nWith `$data` option you can use values from the validated data as the values for the schema keywords. See [proposal](https://github.com/json-schema/json-schema/wiki/$data-(v5-proposal)) for more information about how it works.\n\n`$data` reference is supported in the keywords: const, enum, format, maximum/minimum, exclusiveMaximum / exclusiveMinimum, maxLength / minLength, maxItems / minItems, maxProperties / minProperties, formatMaximum / formatMinimum, formatExclusiveMaximum / formatExclusiveMinimum, multipleOf, pattern, required, uniqueItems.\n\nThe value of \"$data\" should be a [JSON-pointer](https://tools.ietf.org/html/rfc6901) to the data (the root is always the top level data object, even if the $data reference is inside a referenced subschema) or a [relative JSON-pointer](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00) (it is relative to the current point in data; if the $data reference is inside a referenced subschema it cannot point to the data outside of the root level for this subschema).\n\nExamples.\n\nThis schema requires that the value in property `smaller` is less or equal than the value in the property larger:\n\n```javascript\nvar ajv = new Ajv({$data: true});\n\nvar schema = {\n \"properties\": {\n \"smaller\": {\n \"type\": \"number\",\n \"maximum\": { \"$data\": \"1/larger\" }\n },\n \"larger\": { \"type\": \"number\" }\n }\n};\n\nvar validData = {\n smaller: 5,\n larger: 7\n};\n\najv.validate(schema, validData); // true\n```\n\nThis schema requires that the properties have the same format as their field names:\n\n```javascript\nvar schema = {\n \"additionalProperties\": {\n \"type\": \"string\",\n \"format\": { \"$data\": \"0#\" }\n }\n};\n\nvar validData = {\n 'date-time': '1963-06-19T08:30:06.283185Z',\n email: 'joe.bloggs@example.com'\n}\n```\n\n`$data` reference is resolved safely - it won't throw even if some property is undefined. If `$data` resolves to `undefined` the validation succeeds (with the exclusion of `const` keyword). If `$data` resolves to incorrect type (e.g. not \"number\" for maximum keyword) the validation fails.\n\n\n## $merge and $patch keywords\n\nWith the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) you can use the keywords `$merge` and `$patch` that allow extending JSON Schemas with patches using formats [JSON Merge Patch (RFC 7396)](https://tools.ietf.org/html/rfc7396) and [JSON Patch (RFC 6902)](https://tools.ietf.org/html/rfc6902).\n\nTo add keywords `$merge` and `$patch` to Ajv instance use this code:\n\n```javascript\nrequire('ajv-merge-patch')(ajv);\n```\n\nExamples.\n\nUsing `$merge`:\n\n```json\n{\n \"$merge\": {\n \"source\": {\n \"type\": \"object\",\n \"properties\": { \"p\": { \"type\": \"string\" } },\n \"additionalProperties\": false\n },\n \"with\": {\n \"properties\": { \"q\": { \"type\": \"number\" } }\n }\n }\n}\n```\n\nUsing `$patch`:\n\n```json\n{\n \"$patch\": {\n \"source\": {\n \"type\": \"object\",\n \"properties\": { \"p\": { \"type\": \"string\" } },\n \"additionalProperties\": false\n },\n \"with\": [\n { \"op\": \"add\", \"path\": \"/properties/q\", \"value\": { \"type\": \"number\" } }\n ]\n }\n}\n```\n\nThe schemas above are equivalent to this schema:\n\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"p\": { \"type\": \"string\" },\n \"q\": { \"type\": \"number\" }\n },\n \"additionalProperties\": false\n}\n```\n\nThe properties `source` and `with` in the keywords `$merge` and `$patch` can use absolute or relative `$ref` to point to other schemas previously added to the Ajv instance or to the fragments of the current schema.\n\nSee the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) for more information.\n\n\n## Defining custom keywords\n\nThe advantages of using custom keywords are:\n\n- allow creating validation scenarios that cannot be expressed using JSON Schema\n- simplify your schemas\n- help bringing a bigger part of the validation logic to your schemas\n- make your schemas more expressive, less verbose and closer to your application domain\n- implement custom data processors that modify your data (`modifying` option MUST be used in keyword definition) and/or create side effects while the data is being validated\n\nIf a keyword is used only for side-effects and its validation result is pre-defined, use option `valid: true/false` in keyword definition to simplify both generated code (no error handling in case of `valid: true`) and your keyword functions (no need to return any validation result).\n\nThe concerns you have to be aware of when extending JSON Schema standard with custom keywords are the portability and understanding of your schemas. You will have to support these custom keywords on other platforms and to properly document these keywords so that everybody can understand them in your schemas.\n\nYou can define custom keywords with [addKeyword](#api-addkeyword) method. Keywords are defined on the `ajv` instance level - new instances will not have previously defined keywords.\n\nAjv allows defining keywords with:\n- validation function\n- compilation function\n- macro function\n- inline compilation function that should return code (as string) that will be inlined in the currently compiled schema.\n\nExample. `range` and `exclusiveRange` keywords using compiled schema:\n\n```javascript\najv.addKeyword('range', {\n type: 'number',\n compile: function (sch, parentSchema) {\n var min = sch[0];\n var max = sch[1];\n\n return parentSchema.exclusiveRange === true\n ? function (data) { return data > min && data < max; }\n : function (data) { return data >= min && data <= max; }\n }\n});\n\nvar schema = { \"range\": [2, 4], \"exclusiveRange\": true };\nvar validate = ajv.compile(schema);\nconsole.log(validate(2.01)); // true\nconsole.log(validate(3.99)); // true\nconsole.log(validate(2)); // false\nconsole.log(validate(4)); // false\n```\n\nSeveral custom keywords (typeof, instanceof, range and propertyNames) are defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package - they can be used for your schemas and as a starting point for your own custom keywords.\n\nSee [Defining custom keywords](https://github.com/epoberezkin/ajv/blob/master/CUSTOM.md) for more details.\n\n\n## Asynchronous schema compilation\n\nDuring asynchronous compilation remote references are loaded using supplied function. See `compileAsync` [method](#api-compileAsync) and `loadSchema` [option](#options).\n\nExample:\n\n```javascript\nvar ajv = new Ajv({ loadSchema: loadSchema });\n\najv.compileAsync(schema).then(function (validate) {\n var valid = validate(data);\n // ...\n});\n\nfunction loadSchema(uri) {\n return request.json(uri).then(function (res) {\n if (res.statusCode >= 400)\n throw new Error('Loading error: ' + res.statusCode);\n return res.body;\n });\n}\n```\n\n__Please note__: [Option](#options) `missingRefs` should NOT be set to `\"ignore\"` or `\"fail\"` for asynchronous compilation to work.\n\n\n## Asynchronous validation\n\nExample in Node.js REPL: https://tonicdev.com/esp/ajv-asynchronous-validation\n\nYou can define custom formats and keywords that perform validation asynchronously by accessing database or some other service. You should add `async: true` in the keyword or format definition (see [addFormat](#api-addformat), [addKeyword](#api-addkeyword) and [Defining custom keywords](#defining-custom-keywords)).\n\nIf your schema uses asynchronous formats/keywords or refers to some schema that contains them it should have `\"$async\": true` keyword so that Ajv can compile it correctly. If asynchronous format/keyword or reference to asynchronous schema is used in the schema without `$async` keyword Ajv will throw an exception during schema compilation.\n\n__Please note__: all asynchronous subschemas that are referenced from the current or other schemas should have `\"$async\": true` keyword as well, otherwise the schema compilation will fail.\n\nValidation function for an asynchronous custom format/keyword should return a promise that resolves with `true` or `false` (or rejects with `new Ajv.ValidationError(errors)` if you want to return custom errors from the keyword function).\n\nAjv compiles asynchronous schemas to [es7 async functions](http://tc39.github.io/ecmascript-asyncawait/) that can optionally be transpiled with [nodent](https://github.com/MatAtBread/nodent). Async functions are supported in Node.js 7+ and all modern browsers. You can also supply any other transpiler as a function via `processCode` option. See [Options](#options).\n\nThe compiled validation function has `$async: true` property (if the schema is asynchronous), so you can differentiate these functions if you are using both synchronous and asynchronous schemas.\n\nValidation result will be a promise that resolves with validated data or rejects with an exception `Ajv.ValidationError` that contains the array of validation errors in `errors` property.\n\n\nExample:\n\n```javascript\nvar ajv = new Ajv;\n// require('ajv-async')(ajv);\n\najv.addKeyword('idExists', {\n async: true,\n type: 'number',\n validate: checkIdExists\n});\n\n\nfunction checkIdExists(schema, data) {\n return knex(schema.table)\n .select('id')\n .where('id', data)\n .then(function (rows) {\n return !!rows.length; // true if record is found\n });\n}\n\nvar schema = {\n \"$async\": true,\n \"properties\": {\n \"userId\": {\n \"type\": \"integer\",\n \"idExists\": { \"table\": \"users\" }\n },\n \"postId\": {\n \"type\": \"integer\",\n \"idExists\": { \"table\": \"posts\" }\n }\n }\n};\n\nvar validate = ajv.compile(schema);\n\nvalidate({ userId: 1, postId: 19 })\n.then(function (data) {\n console.log('Data is valid', data); // { userId: 1, postId: 19 }\n})\n.catch(function (err) {\n if (!(err instanceof Ajv.ValidationError)) throw err;\n // data is invalid\n console.log('Validation errors:', err.errors);\n});\n```\n\n### Using transpilers with asynchronous validation functions.\n\n[ajv-async](https://github.com/epoberezkin/ajv-async) uses [nodent](https://github.com/MatAtBread/nodent) to transpile async functions. To use another transpiler you should separately install it (or load its bundle in the browser).\n\n\n#### Using nodent\n\n```javascript\nvar ajv = new Ajv;\nrequire('ajv-async')(ajv);\n// in the browser if you want to load ajv-async bundle separately you can:\n// window.ajvAsync(ajv);\nvar validate = ajv.compile(schema); // transpiled es7 async function\nvalidate(data).then(successFunc).catch(errorFunc);\n```\n\n\n#### Using other transpilers\n\n```javascript\nvar ajv = new Ajv({ processCode: transpileFunc });\nvar validate = ajv.compile(schema); // transpiled es7 async function\nvalidate(data).then(successFunc).catch(errorFunc);\n```\n\nSee [Options](#options).\n\n\n## Filtering data\n\nWith [option `removeAdditional`](#options) (added by [andyscott](https://github.com/andyscott)) you can filter data during the validation.\n\nThis option modifies original data.\n\nExample:\n\n```javascript\nvar ajv = new Ajv({ removeAdditional: true });\nvar schema = {\n \"additionalProperties\": false,\n \"properties\": {\n \"foo\": { \"type\": \"number\" },\n \"bar\": {\n \"additionalProperties\": { \"type\": \"number\" },\n \"properties\": {\n \"baz\": { \"type\": \"string\" }\n }\n }\n }\n}\n\nvar data = {\n \"foo\": 0,\n \"additional1\": 1, // will be removed; `additionalProperties` == false\n \"bar\": {\n \"baz\": \"abc\",\n \"additional2\": 2 // will NOT be removed; `additionalProperties` != false\n },\n}\n\nvar validate = ajv.compile(schema);\n\nconsole.log(validate(data)); // true\nconsole.log(data); // { \"foo\": 0, \"bar\": { \"baz\": \"abc\", \"additional2\": 2 }\n```\n\nIf `removeAdditional` option in the example above were `\"all\"` then both `additional1` and `additional2` properties would have been removed.\n\nIf the option were `\"failing\"` then property `additional1` would have been removed regardless of its value and property `additional2` would have been removed only if its value were failing the schema in the inner `additionalProperties` (so in the example above it would have stayed because it passes the schema, but any non-number would have been removed).\n\n__Please note__: If you use `removeAdditional` option with `additionalProperties` keyword inside `anyOf`/`oneOf` keywords your validation can fail with this schema, for example:\n\n```json\n{\n \"type\": \"object\",\n \"oneOf\": [\n {\n \"properties\": {\n \"foo\": { \"type\": \"string\" }\n },\n \"required\": [ \"foo\" ],\n \"additionalProperties\": false\n },\n {\n \"properties\": {\n \"bar\": { \"type\": \"integer\" }\n },\n \"required\": [ \"bar\" ],\n \"additionalProperties\": false\n }\n ]\n}\n```\n\nThe intention of the schema above is to allow objects with either the string property \"foo\" or the integer property \"bar\", but not with both and not with any other properties.\n\nWith the option `removeAdditional: true` the validation will pass for the object `{ \"foo\": \"abc\"}` but will fail for the object `{\"bar\": 1}`. It happens because while the first subschema in `oneOf` is validated, the property `bar` is removed because it is an additional property according to the standard (because it is not included in `properties` keyword in the same schema).\n\nWhile this behaviour is unexpected (issues [#129](https://github.com/epoberezkin/ajv/issues/129), [#134](https://github.com/epoberezkin/ajv/issues/134)), it is correct. To have the expected behaviour (both objects are allowed and additional properties are removed) the schema has to be refactored in this way:\n\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"foo\": { \"type\": \"string\" },\n \"bar\": { \"type\": \"integer\" }\n },\n \"additionalProperties\": false,\n \"oneOf\": [\n { \"required\": [ \"foo\" ] },\n { \"required\": [ \"bar\" ] }\n ]\n}\n```\n\nThe schema above is also more efficient - it will compile into a faster function.\n\n\n## Assigning defaults\n\nWith [option `useDefaults`](#options) Ajv will assign values from `default` keyword in the schemas of `properties` and `items` (when it is the array of schemas) to the missing properties and items.\n\nThis option modifies original data.\n\n__Please note__: by default the default value is inserted in the generated validation code as a literal (starting from v4.0), so the value inserted in the data will be the deep clone of the default in the schema.\n\nIf you need to insert the default value in the data by reference pass the option `useDefaults: \"shared\"`.\n\nInserting defaults by reference can be faster (in case you have an object in `default`) and it allows to have dynamic values in defaults, e.g. timestamp, without recompiling the schema. The side effect is that modifying the default value in any validated data instance will change the default in the schema and in other validated data instances. See example 3 below.\n\n\nExample 1 (`default` in `properties`):\n\n```javascript\nvar ajv = new Ajv({ useDefaults: true });\nvar schema = {\n \"type\": \"object\",\n \"properties\": {\n \"foo\": { \"type\": \"number\" },\n \"bar\": { \"type\": \"string\", \"default\": \"baz\" }\n },\n \"required\": [ \"foo\", \"bar\" ]\n};\n\nvar data = { \"foo\": 1 };\n\nvar validate = ajv.compile(schema);\n\nconsole.log(validate(data)); // true\nconsole.log(data); // { \"foo\": 1, \"bar\": \"baz\" }\n```\n\nExample 2 (`default` in `items`):\n\n```javascript\nvar schema = {\n \"type\": \"array\",\n \"items\": [\n { \"type\": \"number\" },\n { \"type\": \"string\", \"default\": \"foo\" }\n ]\n}\n\nvar data = [ 1 ];\n\nvar validate = ajv.compile(schema);\n\nconsole.log(validate(data)); // true\nconsole.log(data); // [ 1, \"foo\" ]\n```\n\nExample 3 (inserting \"defaults\" by reference):\n\n```javascript\nvar ajv = new Ajv({ useDefaults: 'shared' });\n\nvar schema = {\n properties: {\n foo: {\n default: { bar: 1 }\n }\n }\n}\n\nvar validate = ajv.compile(schema);\n\nvar data = {};\nconsole.log(validate(data)); // true\nconsole.log(data); // { foo: { bar: 1 } }\n\ndata.foo.bar = 2;\n\nvar data2 = {};\nconsole.log(validate(data2)); // true\nconsole.log(data2); // { foo: { bar: 2 } }\n```\n\n`default` keywords in other cases are ignored:\n\n- not in `properties` or `items` subschemas\n- in schemas inside `anyOf`, `oneOf` and `not` (see [#42](https://github.com/epoberezkin/ajv/issues/42))\n- in `if` subschema of `switch` keyword\n- in schemas generated by custom macro keywords\n\n\n## Coercing data types\n\nWhen you are validating user inputs all your data properties are usually strings. The option `coerceTypes` allows you to have your data types coerced to the types specified in your schema `type` keywords, both to pass the validation and to use the correctly typed data afterwards.\n\nThis option modifies original data.\n\n__Please note__: if you pass a scalar value to the validating function its type will be coerced and it will pass the validation, but the value of the variable you pass won't be updated because scalars are passed by value.\n\n\nExample 1:\n\n```javascript\nvar ajv = new Ajv({ coerceTypes: true });\nvar schema = {\n \"type\": \"object\",\n \"properties\": {\n \"foo\": { \"type\": \"number\" },\n \"bar\": { \"type\": \"boolean\" }\n },\n \"required\": [ \"foo\", \"bar\" ]\n};\n\nvar data = { \"foo\": \"1\", \"bar\": \"false\" };\n\nvar validate = ajv.compile(schema);\n\nconsole.log(validate(data)); // true\nconsole.log(data); // { \"foo\": 1, \"bar\": false }\n```\n\nExample 2 (array coercions):\n\n```javascript\nvar ajv = new Ajv({ coerceTypes: 'array' });\nvar schema = {\n \"properties\": {\n \"foo\": { \"type\": \"array\", \"items\": { \"type\": \"number\" } },\n \"bar\": { \"type\": \"boolean\" }\n }\n};\n\nvar data = { \"foo\": \"1\", \"bar\": [\"false\"] };\n\nvar validate = ajv.compile(schema);\n\nconsole.log(validate(data)); // true\nconsole.log(data); // { \"foo\": [1], \"bar\": false }\n```\n\nThe coercion rules, as you can see from the example, are different from JavaScript both to validate user input as expected and to have the coercion reversible (to correctly validate cases where different types are defined in subschemas of \"anyOf\" and other compound keywords).\n\nSee [Coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md) for details.\n\n\n## API\n\n##### new Ajv(Object options) -> Object\n\nCreate Ajv instance.\n\n\n##### .compile(Object schema) -> Function<Object data>\n\nGenerate validating function and cache the compiled schema for future use.\n\nValidating function returns a boolean value. This function has properties `errors` and `schema`. Errors encountered during the last validation are assigned to `errors` property (it is assigned `null` if there was no errors). `schema` property contains the reference to the original schema.\n\nThe schema passed to this method will be validated against meta-schema unless `validateSchema` option is false. If schema is invalid, an error will be thrown. See [options](#options).\n\n\n##### .compileAsync(Object schema [, Boolean meta] [, Function callback]) -> Promise\n\nAsynchronous version of `compile` method that loads missing remote schemas using asynchronous function in `options.loadSchema`. This function returns a Promise that resolves to a validation function. An optional callback passed to `compileAsync` will be called with 2 parameters: error (or null) and validating function. The returned promise will reject (and the callback will be called with an error) when:\n\n- missing schema can't be loaded (`loadSchema` returns a Promise that rejects).\n- a schema containing a missing reference is loaded, but the reference cannot be resolved.\n- schema (or some loaded/referenced schema) is invalid.\n\nThe function compiles schema and loads the first missing schema (or meta-schema) until all missing schemas are loaded.\n\nYou can asynchronously compile meta-schema by passing `true` as the second parameter.\n\nSee example in [Asynchronous compilation](#asynchronous-schema-compilation).\n\n\n##### .validate(Object schema|String key|String ref, data) -> Boolean\n\nValidate data using passed schema (it will be compiled and cached).\n\nInstead of the schema you can use the key that was previously passed to `addSchema`, the schema id if it was present in the schema or any previously resolved reference.\n\nValidation errors will be available in the `errors` property of Ajv instance (`null` if there were no errors).\n\n__Please note__: every time this method is called the errors are overwritten so you need to copy them to another variable if you want to use them later.\n\nIf the schema is asynchronous (has `$async` keyword on the top level) this method returns a Promise. See [Asynchronous validation](#asynchronous-validation).\n\n\n##### .addSchema(Array<Object>|Object schema [, String key]) -> Ajv\n\nAdd schema(s) to validator instance. This method does not compile schemas (but it still validates them). Because of that dependencies can be added in any order and circular dependencies are supported. It also prevents unnecessary compilation of schemas that are containers for other schemas but not used as a whole.\n\nArray of schemas can be passed (schemas should have ids), the second parameter will be ignored.\n\nKey can be passed that can be used to reference the schema and will be used as the schema id if there is no id inside the schema. If the key is not passed, the schema id will be used as the key.\n\n\nOnce the schema is added, it (and all the references inside it) can be referenced in other schemas and used to validate data.\n\nAlthough `addSchema` does not compile schemas, explicit compilation is not required - the schema will be compiled when it is used first time.\n\nBy default the schema is validated against meta-schema before it is added, and if the schema does not pass validation the exception is thrown. This behaviour is controlled by `validateSchema` option.\n\n__Please note__: Ajv uses the [method chaining syntax](https://en.wikipedia.org/wiki/Method_chaining) for all methods with the prefix `add*` and `remove*`.\nThis allows you to do nice things like the following.\n\n```javascript\nvar validate = new Ajv().addSchema(schema).addFormat(name, regex).getSchema(uri);\n```\n\n##### .addMetaSchema(Array<Object>|Object schema [, String key]) -> Ajv\n\nAdds meta schema(s) that can be used to validate other schemas. That function should be used instead of `addSchema` because there may be instance options that would compile a meta schema incorrectly (at the moment it is `removeAdditional` option).\n\nThere is no need to explicitly add draft-07 meta schema (http://json-schema.org/draft-07/schema) - it is added by default, unless option `meta` is set to `false`. You only need to use it if you have a changed meta-schema that you want to use to validate your schemas. See `validateSchema`.\n\n\n##### .validateSchema(Object schema) -> Boolean\n\nValidates schema. This method should be used to validate schemas rather than `validate` due to the inconsistency of `uri` format in JSON Schema standard.\n\nBy default this method is called automatically when the schema is added, so you rarely need to use it directly.\n\nIf schema doesn't have `$schema` property, it is validated against draft 6 meta-schema (option `meta` should not be false).\n\nIf schema has `$schema` property, then the schema with this id (that should be previously added) is used to validate passed schema.\n\nErrors will be available at `ajv.errors`.\n\n\n##### .getSchema(String key) -> Function<Object data>\n\nRetrieve compiled schema previously added with `addSchema` by the key passed to `addSchema` or by its full reference (id). The returned validating function has `schema` property with the reference to the original schema.\n\n\n##### .removeSchema([Object schema|String key|String ref|RegExp pattern]) -> Ajv\n\nRemove added/cached schema. Even if schema is referenced by other schemas it can be safely removed as dependent schemas have local references.\n\nSchema can be removed using:\n- key passed to `addSchema`\n- it's full reference (id)\n- RegExp that should match schema id or key (meta-schemas won't be removed)\n- actual schema object that will be stable-stringified to remove schema from cache\n\nIf no parameter is passed all schemas but meta-schemas will be removed and the cache will be cleared.\n\n\n##### .addFormat(String name, String|RegExp|Function|Object format) -> Ajv\n\nAdd custom format to validate strings or numbers. It can also be used to replace pre-defined formats for Ajv instance.\n\nStrings are converted to RegExp.\n\nFunction should return validation result as `true` or `false`.\n\nIf object is passed it should have properties `validate`, `compare` and `async`:\n\n- _validate_: a string, RegExp or a function as described above.\n- _compare_: an optional comparison function that accepts two strings and compares them according to the format meaning. This function is used with keywords `formatMaximum`/`formatMinimum` (defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package). It should return `1` if the first value is bigger than the second value, `-1` if it is smaller and `0` if it is equal.\n- _async_: an optional `true` value if `validate` is an asynchronous function; in this case it should return a promise that resolves with a value `true` or `false`.\n- _type_: an optional type of data that the format applies to. It can be `\"string\"` (default) or `\"number\"` (see https://github.com/epoberezkin/ajv/issues/291#issuecomment-259923858). If the type of data is different, the validation will pass.\n\nCustom formats can be also added via `formats` option.\n\n\n##### .addKeyword(String keyword, Object definition) -> Ajv\n\nAdd custom validation keyword to Ajv instance.\n\nKeyword should be different from all standard JSON Schema keywords and different from previously defined keywords. There is no way to redefine keywords or to remove keyword definition from the instance.\n\nKeyword must start with a letter, `_` or `$`, and may continue with letters, numbers, `_`, `$`, or `-`.\nIt is recommended to use an application-specific prefix for keywords to avoid current and future name collisions.\n\nExample Keywords:\n- `\"xyz-example\"`: valid, and uses prefix for the xyz project to avoid name collisions.\n- `\"example\"`: valid, but not recommended as it could collide with future versions of JSON Schema etc.\n- `\"3-example\"`: invalid as numbers are not allowed to be the first character in a keyword\n\nKeyword definition is an object with the following properties:\n\n- _type_: optional string or array of strings with data type(s) that the keyword applies to. If not present, the keyword will apply to all types.\n- _validate_: validating function\n- _compile_: compiling function\n- _macro_: macro function\n- _inline_: compiling function that returns code (as string)\n- _schema_: an optional `false` value used with \"validate\" keyword to not pass schema\n- _metaSchema_: an optional meta-schema for keyword schema\n- _modifying_: `true` MUST be passed if keyword modifies data\n- _valid_: pass `true`/`false` to pre-define validation result, the result returned from validation function will be ignored. This option cannot be used with macro keywords.\n- _$data_: an optional `true` value to support [$data reference](#data-reference) as the value of custom keyword. The reference will be resolved at validation time. If the keyword has meta-schema it would be extended to allow $data and it will be used to validate the resolved value. Supporting $data reference requires that keyword has validating function (as the only option or in addition to compile, macro or inline function).\n- _async_: an optional `true` value if the validation function is asynchronous (whether it is compiled or passed in _validate_ property); in this case it should return a promise that resolves with a value `true` or `false`. This option is ignored in case of \"macro\" and \"inline\" keywords.\n- _errors_: an optional boolean indicating whether keyword returns errors. If this property is not set Ajv will determine if the errors were set in case of failed validation.\n\n_compile_, _macro_ and _inline_ are mutually exclusive, only one should be used at a time. _validate_ can be used separately or in addition to them to support $data reference.\n\n__Please note__: If the keyword is validating data type that is different from the type(s) in its definition, the validation function will not be called (and expanded macro will not be used), so there is no need to check for data type inside validation function or inside schema returned by macro function (unless you want to enforce a specific type and for some reason do not want to use a separate `type` keyword for that). In the same way as standard keywords work, if the keyword does not apply to the data type being validated, the validation of this keyword will succeed.\n\nSee [Defining custom keywords](#defining-custom-keywords) for more details.\n\n\n##### .getKeyword(String keyword) -> Object|Boolean\n\nReturns custom keyword definition, `true` for pre-defined keywords and `false` if the keyword is unknown.\n\n\n##### .removeKeyword(String keyword) -> Ajv\n\nRemoves custom or pre-defined keyword so you can redefine them.\n\nWhile this method can be used to extend pre-defined keywords, it can also be used to completely change their meaning - it may lead to unexpected results.\n\n__Please note__: schemas compiled before the keyword is removed will continue to work without changes. To recompile schemas use `removeSchema` method and compile them again.\n\n\n##### .errorsText([Array<Object> errors [, Object options]]) -> String\n\nReturns the text with all errors in a String.\n\nOptions can have properties `separator` (string used to separate errors, \", \" by default) and `dataVar` (the variable name that dataPaths are prefixed with, \"data\" by default).\n\n\n## Options\n\nDefaults:\n\n```javascript\n{\n // validation and reporting options:\n $data: false,\n allErrors: false,\n verbose: false,\n $comment: false, // NEW in Ajv version 6.0\n jsonPointers: false,\n uniqueItems: true,\n unicode: true,\n format: 'fast',\n formats: {},\n unknownFormats: true,\n schemas: {},\n logger: undefined,\n // referenced schema options:\n schemaId: '$id',\n missingRefs: true,\n extendRefs: 'ignore', // recommended 'fail'\n loadSchema: undefined, // function(uri: string): Promise {}\n // options to modify validated data:\n removeAdditional: false,\n useDefaults: false,\n coerceTypes: false,\n // asynchronous validation options:\n transpile: undefined, // requires ajv-async package\n // advanced options:\n meta: true,\n validateSchema: true,\n addUsedSchema: true,\n inlineRefs: true,\n passContext: false,\n loopRequired: Infinity,\n ownProperties: false,\n multipleOfPrecision: false,\n errorDataPath: 'object', // deprecated\n messages: true,\n sourceCode: false,\n processCode: undefined, // function (str: string): string {}\n cache: new Cache,\n serialize: undefined\n}\n```\n\n##### Validation and reporting options\n\n- _$data_: support [$data references](#data-reference). Draft 6 meta-schema that is added by default will be extended to allow them. If you want to use another meta-schema you need to use $dataMetaSchema method to add support for $data reference. See [API](#api).\n- _allErrors_: check all rules collecting all errors. Default is to return after the first error.\n- _verbose_: include the reference to the part of the schema (`schema` and `parentSchema`) and validated data in errors (false by default).\n- _$comment_ (NEW in Ajv version 6.0): log or pass the value of `$comment` keyword to a function. Option values:\n - `false` (default): ignore $comment keyword.\n - `true`: log the keyword value to console.\n - function: pass the keyword value, its schema path and root schema to the specified function\n- _jsonPointers_: set `dataPath` property of errors using [JSON Pointers](https://tools.ietf.org/html/rfc6901) instead of JavaScript property access notation.\n- _uniqueItems_: validate `uniqueItems` keyword (true by default).\n- _unicode_: calculate correct length of strings with unicode pairs (true by default). Pass `false` to use `.length` of strings that is faster, but gives \"incorrect\" lengths of strings with unicode pairs - each unicode pair is counted as two characters.\n- _format_: formats validation mode ('fast' by default). Pass 'full' for more correct and slow validation or `false` not to validate formats at all. E.g., 25:00:00 and 2015/14/33 will be invalid time and date in 'full' mode but it will be valid in 'fast' mode.\n- _formats_: an object with custom formats. Keys and values will be passed to `addFormat` method.\n- _unknownFormats_: handling of unknown formats. Option values:\n - `true` (default) - if an unknown format is encountered the exception is thrown during schema compilation. If `format` keyword value is [$data reference](#data-reference) and it is unknown the validation will fail.\n - `[String]` - an array of unknown format names that will be ignored. This option can be used to allow usage of third party schemas with format(s) for which you don't have definitions, but still fail if another unknown format is used. If `format` keyword value is [$data reference](#data-reference) and it is not in this array the validation will fail.\n - `\"ignore\"` - to log warning during schema compilation and always pass validation (the default behaviour in versions before 5.0.0). This option is not recommended, as it allows to mistype format name and it won't be validated without any error message. This behaviour is required by JSON Schema specification.\n- _schemas_: an array or object of schemas that will be added to the instance. In case you pass the array the schemas must have IDs in them. When the object is passed the method `addSchema(value, key)` will be called for each schema in this object.\n- _logger_: sets the logging method. Default is the global `console` object that should have methods `log`, `warn` and `error`. Option values:\n - custom logger - it should have methods `log`, `warn` and `error`. If any of these methods is missing an exception will be thrown.\n - `false` - logging is disabled.\n\n\n##### Referenced schema options\n\n- _schemaId_: this option defines which keywords are used as schema URI. Option value:\n - `\"$id\"` (default) - only use `$id` keyword as schema URI (as specified in JSON Schema draft-06/07), ignore `id` keyword (if it is present a warning will be logged).\n - `\"id\"` - only use `id` keyword as schema URI (as specified in JSON Schema draft-04), ignore `$id` keyword (if it is present a warning will be logged).\n - `\"auto\"` - use both `$id` and `id` keywords as schema URI. If both are present (in the same schema object) and different the exception will be thrown during schema compilation.\n- _missingRefs_: handling of missing referenced schemas. Option values:\n - `true` (default) - if the reference cannot be resolved during compilation the exception is thrown. The thrown error has properties `missingRef` (with hash fragment) and `missingSchema` (without it). Both properties are resolved relative to the current base id (usually schema id, unless it was substituted).\n - `\"ignore\"` - to log error during compilation and always pass validation.\n - `\"fail\"` - to log error and successfully compile schema but fail validation if this rule is checked.\n- _extendRefs_: validation of other keywords when `$ref` is present in the schema. Option values:\n - `\"ignore\"` (default) - when `$ref` is used other keywords are ignored (as per [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3) standard). A warning will be logged during the schema compilation.\n - `\"fail\"` (recommended) - if other validation keywords are used together with `$ref` the exception will be thrown when the schema is compiled. This option is recommended to make sure schema has no keywords that are ignored, which can be confusing.\n - `true` - validate all keywords in the schemas with `$ref` (the default behaviour in versions before 5.0.0).\n- _loadSchema_: asynchronous function that will be used to load remote schemas when `compileAsync` [method](#api-compileAsync) is used and some reference is missing (option `missingRefs` should NOT be 'fail' or 'ignore'). This function should accept remote schema uri as a parameter and return a Promise that resolves to a schema. See example in [Asynchronous compilation](#asynchronous-schema-compilation).\n\n\n##### Options to modify validated data\n\n- _removeAdditional_: remove additional properties - see example in [Filtering data](#filtering-data). This option is not used if schema is added with `addMetaSchema` method. Option values:\n - `false` (default) - not to remove additional properties\n - `\"all\"` - all additional properties are removed, regardless of `additionalProperties` keyword in schema (and no validation is made for them).\n - `true` - only additional properties with `additionalProperties` keyword equal to `false` are removed.\n - `\"failing\"` - additional properties that fail schema validation will be removed (where `additionalProperties` keyword is `false` or schema).\n- _useDefaults_: replace missing properties and items with the values from corresponding `default` keywords. Default behaviour is to ignore `default` keywords. This option is not used if schema is added with `addMetaSchema` method. See examples in [Assigning defaults](#assigning-defaults). Option values:\n - `false` (default) - do not use defaults\n - `true` - insert defaults by value (safer and slower, object literal is used).\n - `\"shared\"` - insert defaults by reference (faster). If the default is an object, it will be shared by all instances of validated data. If you modify the inserted default in the validated data, it will be modified in the schema as well.\n- _coerceTypes_: change data type of data to match `type` keyword. See the example in [Coercing data types](#coercing-data-types) and [coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md). Option values:\n - `false` (default) - no type coercion.\n - `true` - coerce scalar data types.\n - `\"array\"` - in addition to coercions between scalar types, coerce scalar data to an array with one element and vice versa (as required by the schema).\n\n\n##### Asynchronous validation options\n\n- _transpile_: Requires [ajv-async](https://github.com/epoberezkin/ajv-async) package. It determines whether Ajv transpiles compiled asynchronous validation function. Option values:\n - `undefined` (default) - transpile with [nodent](https://github.com/MatAtBread/nodent) if async functions are not supported.\n - `true` - always transpile with nodent.\n - `false` - do not transpile; if async functions are not supported an exception will be thrown.\n\n\n##### Advanced options\n\n- _meta_: add [meta-schema](http://json-schema.org/documentation.html) so it can be used by other schemas (true by default). If an object is passed, it will be used as the default meta-schema for schemas that have no `$schema` keyword. This default meta-schema MUST have `$schema` keyword.\n- _validateSchema_: validate added/compiled schemas against meta-schema (true by default). `$schema` property in the schema can be http://json-schema.org/draft-07/schema or absent (draft-07 meta-schema will be used) or can be a reference to the schema previously added with `addMetaSchema` method. Option values:\n - `true` (default) - if the validation fails, throw the exception.\n - `\"log\"` - if the validation fails, log error.\n - `false` - skip schema validation.\n- _addUsedSchema_: by default methods `compile` and `validate` add schemas to the instance if they have `$id` (or `id`) property that doesn't start with \"#\". If `$id` is present and it is not unique the exception will be thrown. Set this option to `false` to skip adding schemas to the instance and the `$id` uniqueness check when these methods are used. This option does not affect `addSchema` method.\n- _inlineRefs_: Affects compilation of referenced schemas. Option values:\n - `true` (default) - the referenced schemas that don't have refs in them are inlined, regardless of their size - that substantially improves performance at the cost of the bigger size of compiled schema functions.\n - `false` - to not inline referenced schemas (they will be compiled as separate functions).\n - integer number - to limit the maximum number of keywords of the schema that will be inlined.\n- _passContext_: pass validation context to custom keyword functions. If this option is `true` and you pass some context to the compiled validation function with `validate.call(context, data)`, the `context` will be available as `this` in your custom keywords. By default `this` is Ajv instance.\n- _loopRequired_: by default `required` keyword is compiled into a single expression (or a sequence of statements in `allErrors` mode). In case of a very large number of properties in this keyword it may result in a very big validation function. Pass integer to set the number of properties above which `required` keyword will be validated in a loop - smaller validation function size but also worse performance.\n- _ownProperties_: by default Ajv iterates over all enumerable object properties; when this option is `true` only own enumerable object properties (i.e. found directly on the object rather than on its prototype) are iterated. Contributed by @mbroadst.\n- _multipleOfPrecision_: by default `multipleOf` keyword is validated by comparing the result of division with parseInt() of that result. It works for dividers that are bigger than 1. For small dividers such as 0.01 the result of the division is usually not integer (even when it should be integer, see issue [#84](https://github.com/epoberezkin/ajv/issues/84)). If you need to use fractional dividers set this option to some positive integer N to have `multipleOf` validated using this formula: `Math.abs(Math.round(division) - division) < 1e-N` (it is slower but allows for float arithmetics deviations).\n- _errorDataPath_ (deprecated): set `dataPath` to point to 'object' (default) or to 'property' when validating keywords `required`, `additionalProperties` and `dependencies`.\n- _messages_: Include human-readable messages in errors. `true` by default. `false` can be passed when custom messages are used (e.g. with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n)).\n- _sourceCode_: add `sourceCode` property to validating function (for debugging; this code can be different from the result of toString call).\n- _processCode_: an optional function to process generated code before it is passed to Function constructor. It can be used to either beautify (the validating function is generated without line-breaks) or to transpile code. Starting from version 5.0.0 this option replaced options:\n - `beautify` that formatted the generated function using [js-beautify](https://github.com/beautify-web/js-beautify). If you want to beautify the generated code pass `require('js-beautify').js_beautify`.\n - `transpile` that transpiled asynchronous validation function. You can still use `transpile` option with [ajv-async](https://github.com/epoberezkin/ajv-async) package. See [Asynchronous validation](#asynchronous-validation) for more information.\n- _cache_: an optional instance of cache to store compiled schemas using stable-stringified schema as a key. For example, set-associative cache [sacjs](https://github.com/epoberezkin/sacjs) can be used. If not passed then a simple hash is used which is good enough for the common use case (a limited number of statically defined schemas). Cache should have methods `put(key, value)`, `get(key)`, `del(key)` and `clear()`.\n- _serialize_: an optional function to serialize schema to cache key. Pass `false` to use schema itself as a key (e.g., if WeakMap used as a cache). By default [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used.\n\n\n## Validation errors\n\nIn case of validation failure, Ajv assigns the array of errors to `errors` property of validation function (or to `errors` property of Ajv instance when `validate` or `validateSchema` methods were called). In case of [asynchronous validation](#asynchronous-validation), the returned promise is rejected with exception `Ajv.ValidationError` that has `errors` property.\n\n\n### Error objects\n\nEach error is an object with the following properties:\n\n- _keyword_: validation keyword.\n- _dataPath_: the path to the part of the data that was validated. By default `dataPath` uses JavaScript property access notation (e.g., `\".prop[1].subProp\"`). When the option `jsonPointers` is true (see [Options](#options)) `dataPath` will be set using JSON pointer standard (e.g., `\"/prop/1/subProp\"`).\n- _schemaPath_: the path (JSON-pointer as a URI fragment) to the schema of the keyword that failed validation.\n- _params_: the object with the additional information about error that can be used to create custom error messages (e.g., using [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package). See below for parameters set by all keywords.\n- _message_: the standard error message (can be excluded with option `messages` set to false).\n- _schema_: the schema of the keyword (added with `verbose` option).\n- _parentSchema_: the schema containing the keyword (added with `verbose` option)\n- _data_: the data validated by the keyword (added with `verbose` option).\n\n__Please note__: `propertyNames` keyword schema validation errors have an additional property `propertyName`, `dataPath` points to the object. After schema validation for each property name, if it is invalid an additional error is added with the property `keyword` equal to `\"propertyNames\"`.\n\n\n### Error parameters\n\nProperties of `params` object in errors depend on the keyword that failed validation.\n\n- `maxItems`, `minItems`, `maxLength`, `minLength`, `maxProperties`, `minProperties` - property `limit` (number, the schema of the keyword).\n- `additionalItems` - property `limit` (the maximum number of allowed items in case when `items` keyword is an array of schemas and `additionalItems` is false).\n- `additionalProperties` - property `additionalProperty` (the property not used in `properties` and `patternProperties` keywords).\n- `dependencies` - properties:\n - `property` (dependent property),\n - `missingProperty` (required missing dependency - only the first one is reported currently)\n - `deps` (required dependencies, comma separated list as a string),\n - `depsCount` (the number of required dependencies).\n- `format` - property `format` (the schema of the keyword).\n- `maximum`, `minimum` - properties:\n - `limit` (number, the schema of the keyword),\n - `exclusive` (boolean, the schema of `exclusiveMaximum` or `exclusiveMinimum`),\n - `comparison` (string, comparison operation to compare the data to the limit, with the data on the left and the limit on the right; can be \"<\", \"<=\", \">\", \">=\")\n- `multipleOf` - property `multipleOf` (the schema of the keyword)\n- `pattern` - property `pattern` (the schema of the keyword)\n- `required` - property `missingProperty` (required property that is missing).\n- `propertyNames` - property `propertyName` (an invalid property name).\n- `patternRequired` (in ajv-keywords) - property `missingPattern` (required pattern that did not match any property).\n- `type` - property `type` (required type(s), a string, can be a comma-separated list)\n- `uniqueItems` - properties `i` and `j` (indices of duplicate items).\n- `const` - property `allowedValue` pointing to the value (the schema of the keyword).\n- `enum` - property `allowedValues` pointing to the array of values (the schema of the keyword).\n- `$ref` - property `ref` with the referenced schema URI.\n- `oneOf` - property `passingSchemas` (array of indices of passing schemas, null if no schema passes).\n- custom keywords (in case keyword definition doesn't create errors) - property `keyword` (the keyword name).\n\n\n## Plugins\n\nAjv can be extended with plugins that add custom keywords, formats or functions to process generated code. When such plugin is published as npm package it is recommended that it follows these conventions:\n\n- it exports a function\n- this function accepts ajv instance as the first parameter and returns the same instance to allow chaining\n- this function can accept an optional configuration as the second parameter\n\nIf you have published a useful plugin please submit a PR to add it to the next section.\n\n\n## Related packages\n\n- [ajv-async](https://github.com/epoberezkin/ajv-async) - plugin to configure async validation mode\n- [ajv-cli](https://github.com/jessedc/ajv-cli) - command line interface\n- [ajv-errors](https://github.com/epoberezkin/ajv-errors) - plugin for custom error messages\n- [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) - internationalised error messages\n- [ajv-istanbul](https://github.com/epoberezkin/ajv-istanbul) - plugin to instrument generated validation code to measure test coverage of your schemas\n- [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) - plugin with custom validation keywords (if/then/else, select, typeof, etc.)\n- [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) - plugin with keywords $merge and $patch\n- [ajv-pack](https://github.com/epoberezkin/ajv-pack) - produces a compact module exporting validation functions\n\n\n## Some packages using Ajv\n\n- [webpack](https://github.com/webpack/webpack) - a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser\n- [jsonscript-js](https://github.com/JSONScript/jsonscript-js) - the interpreter for [JSONScript](http://www.jsonscript.org) - scripted processing of existing endpoints and services\n- [osprey-method-handler](https://github.com/mulesoft-labs/osprey-method-handler) - Express middleware for validating requests and responses based on a RAML method object, used in [osprey](https://github.com/mulesoft/osprey) - validating API proxy generated from a RAML definition\n- [har-validator](https://github.com/ahmadnassri/har-validator) - HTTP Archive (HAR) validator\n- [jsoneditor](https://github.com/josdejong/jsoneditor) - a web-based tool to view, edit, format, and validate JSON http://jsoneditoronline.org\n- [JSON Schema Lint](https://github.com/nickcmaynard/jsonschemalint) - a web tool to validate JSON/YAML document against a single JSON Schema http://jsonschemalint.com\n- [objection](https://github.com/vincit/objection.js) - SQL-friendly ORM for Node.js\n- [table](https://github.com/gajus/table) - formats data into a string table\n- [ripple-lib](https://github.com/ripple/ripple-lib) - a JavaScript API for interacting with [Ripple](https://ripple.com) in Node.js and the browser\n- [restbase](https://github.com/wikimedia/restbase) - distributed storage with REST API & dispatcher for backend services built to provide a low-latency & high-throughput API for Wikipedia / Wikimedia content\n- [hippie-swagger](https://github.com/CacheControl/hippie-swagger) - [Hippie](https://github.com/vesln/hippie) wrapper that provides end to end API testing with swagger validation\n- [react-form-controlled](https://github.com/seeden/react-form-controlled) - React controlled form components with validation\n- [rabbitmq-schema](https://github.com/tjmehta/rabbitmq-schema) - a schema definition module for RabbitMQ graphs and messages\n- [@query/schema](https://www.npmjs.com/package/@query/schema) - stream filtering with a URI-safe query syntax parsing to JSON Schema\n- [chai-ajv-json-schema](https://github.com/peon374/chai-ajv-json-schema) - chai plugin to us JSON Schema with expect in mocha tests\n- [grunt-jsonschema-ajv](https://github.com/SignpostMarv/grunt-jsonschema-ajv) - Grunt plugin for validating files against JSON Schema\n- [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) - extract text from bundle into a file\n- [electron-builder](https://github.com/electron-userland/electron-builder) - a solution to package and build a ready for distribution Electron app\n- [addons-linter](https://github.com/mozilla/addons-linter) - Mozilla Add-ons Linter\n- [gh-pages-generator](https://github.com/epoberezkin/gh-pages-generator) - multi-page site generator converting markdown files to GitHub pages\n- [ESLint](https://github.com/eslint/eslint) - the pluggable linting utility for JavaScript and JSX\n\n\n## Tests\n\n```\nnpm install\ngit submodule update --init\nnpm test\n```\n\n## Contributing\n\nAll validation functions are generated using doT templates in [dot](https://github.com/epoberezkin/ajv/tree/master/lib/dot) folder. Templates are precompiled so doT is not a run-time dependency.\n\n`npm run build` - compiles templates to [dotjs](https://github.com/epoberezkin/ajv/tree/master/lib/dotjs) folder.\n\n`npm run watch` - automatically compiles templates when files in dot folder change\n\nPlease see [Contributing guidelines](https://github.com/epoberezkin/ajv/blob/master/CONTRIBUTING.md)\n\n\n## Changes history\n\nSee https://github.com/epoberezkin/ajv/releases\n\n__Please note__: [Changes in version 6.0.0](https://github.com/epoberezkin/ajv/releases/tag/v6.0.0).\n\n[Version 5.0.0](https://github.com/epoberezkin/ajv/releases/tag/5.0.0).\n\n[Version 4.0.0](https://github.com/epoberezkin/ajv/releases/tag/4.0.0).\n\n[Version 3.0.0](https://github.com/epoberezkin/ajv/releases/tag/3.0.0).\n\n[Version 2.0.0](https://github.com/epoberezkin/ajv/releases/tag/2.0.0).\n\n\n## License\n\n[MIT](https://github.com/epoberezkin/ajv/blob/master/LICENSE)\n", - "readmeFilename": "README.md", - "_id": "ajv@6.5.2", - "_requested": { - "type": "version", - "registry": true, - "raw": "ajv@6.5.2", - "name": "ajv", - "escapedName": "ajv", - "rawSpec": "6.5.2", - "saveSpec": "[Circular]", - "fetchSpec": "6.5.2" - }, - "_spec": "6.5.2", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "ajv@6.5.2", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.1" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/ajv", - "error": "[Circular]", - "extraneous": false - }, - "ajv-keywords": { - "name": "ajv-keywords", - "version": "3.2.0", - "description": "Custom JSON-Schema keywords for Ajv validator", - "main": "index.js", - "scripts": { - "build": "node node_modules/ajv/scripts/compile-dots.js node_modules/ajv/lib keywords", - "prepublish": "npm run build", - "test": "npm run build && npm run eslint && npm run test-cov", - "eslint": "eslint index.js keywords/*.js", - "test-spec": "mocha spec/*.spec.js -R spec", - "test-cov": "istanbul cover -x 'spec/**' node_modules/mocha/bin/_mocha -- spec/*.spec.js -R spec" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/epoberezkin/ajv-keywords.git" - }, - "keywords": [ - "JSON-Schema", - "ajv", - "keywords" - ], - "files": [ - "index.js", - "keywords" - ], - "author": { - "name": "Evgeny Poberezkin" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/epoberezkin/ajv-keywords/issues" - }, - "homepage": "https://github.com/epoberezkin/ajv-keywords#readme", - "peerDependencies": { - "ajv": "^6.0.0" - }, - "devDependencies": { - "ajv": "^6.0.0", - "ajv-pack": "^0.3.0", - "chai": "^4.0.2", - "coveralls": "^3.0.0", - "dot": "^1.1.1", - "eslint": "^4.9.0", - "glob": "^7.1.1", - "istanbul": "^0.4.3", - "js-beautify": "^1.7.4", - "json-schema-test": "^2.0.0", - "mocha": "^5.0.0", - "pre-commit": "^1.1.3", - "uuid": "^3.0.1" - }, - "_resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", - "_integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", - "_from": "ajv-keywords@3.2.0", - "readme": "# ajv-keywords\n\nCustom JSON-Schema keywords for [Ajv](https://github.com/epoberezkin/ajv) validator\n\n[![Build Status](https://travis-ci.org/epoberezkin/ajv-keywords.svg?branch=master)](https://travis-ci.org/epoberezkin/ajv-keywords)\n[![npm](https://img.shields.io/npm/v/ajv-keywords.svg)](https://www.npmjs.com/package/ajv-keywords)\n[![npm downloads](https://img.shields.io/npm/dm/ajv-keywords.svg)](https://www.npmjs.com/package/ajv-keywords)\n[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/ajv-keywords/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/ajv-keywords?branch=master)\n[![Greenkeeper badge](https://badges.greenkeeper.io/epoberezkin/ajv-keywords.svg)](https://greenkeeper.io/)\n[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv)\n\n\n## Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Keywords](#keywords)\n - [typeof](#typeof)\n - [instanceof](#instanceof)\n - [range and exclusiveRange](#range-and-exclusiverange)\n - [switch](#switch)\n - [select/selectCases/selectDefault](#selectselectcasesselectdefault) (BETA)\n - [patternRequired](#patternrequired)\n - [prohibited](#prohibited)\n - [deepProperties](#deepproperties)\n - [deepRequired](#deeprequired)\n - [uniqueItemProperties](#uniqueitemproperties)\n - [regexp](#regexp)\n - [formatMaximum / formatMinimum and formatExclusiveMaximum / formatExclusiveMinimum](#formatmaximum--formatminimum-and-formatexclusivemaximum--formatexclusiveminimum)\n - [dynamicDefaults](#dynamicdefaults)\n - [transform](#transform)\n- [License](#license)\n\n\n## Install\n\n```\nnpm install ajv-keywords\n```\n\n\n## Usage\n\nTo add all available keywords:\n\n```javascript\nvar Ajv = require('ajv');\nvar ajv = new Ajv;\nrequire('ajv-keywords')(ajv);\n\najv.validate({ instanceof: 'RegExp' }, /.*/); // true\najv.validate({ instanceof: 'RegExp' }, '.*'); // false\n```\n\nTo add a single keyword:\n\n```javascript\nrequire('ajv-keywords')(ajv, 'instanceof');\n```\n\nTo add multiple keywords:\n\n```javascript\nrequire('ajv-keywords')(ajv, ['typeof', 'instanceof']);\n```\n\nTo add a single keyword in browser (to avoid adding unused code):\n\n```javascript\nrequire('ajv-keywords/keywords/instanceof')(ajv);\n```\n\n\n## Keywords\n\n### `typeof`\n\nBased on JavaScript `typeof` operation.\n\nThe value of the keyword should be a string (`\"undefined\"`, `\"string\"`, `\"number\"`, `\"object\"`, `\"function\"`, `\"boolean\"` or `\"symbol\"`) or array of strings.\n\nTo pass validation the result of `typeof` operation on the value should be equal to the string (or one of the strings in the array).\n\n```\najv.validate({ typeof: 'undefined' }, undefined); // true\najv.validate({ typeof: 'undefined' }, null); // false\najv.validate({ typeof: ['undefined', 'object'] }, null); // true\n```\n\n\n### `instanceof`\n\nBased on JavaScript `instanceof` operation.\n\nThe value of the keyword should be a string (`\"Object\"`, `\"Array\"`, `\"Function\"`, `\"Number\"`, `\"String\"`, `\"Date\"`, `\"RegExp\"`, `\"Promise\"` or `\"Buffer\"`) or array of strings.\n\nTo pass validation the result of `data instanceof ...` operation on the value should be true:\n\n```\najv.validate({ instanceof: 'Array' }, []); // true\najv.validate({ instanceof: 'Array' }, {}); // false\najv.validate({ instanceof: ['Array', 'Function'] }, function(){}); // true\n```\n\nYou can add your own constructor function to be recognised by this keyword:\n\n```javascript\nfunction MyClass() {}\nvar instanceofDefinition = require('ajv-keywords').get('instanceof').definition;\n// or require('ajv-keywords/keywords/instanceof').definition;\ninstanceofDefinition.CONSTRUCTORS.MyClass = MyClass;\n\najv.validate({ instanceof: 'MyClass' }, new MyClass); // true\n```\n\n\n### `range` and `exclusiveRange`\n\nSyntax sugar for the combination of minimum and maximum keywords, also fails schema compilation if there are no numbers in the range.\n\nThe value of this keyword must be the array consisting of two numbers, the second must be greater or equal than the first one.\n\nIf the validated value is not a number the validation passes, otherwise to pass validation the value should be greater (or equal) than the first number and smaller (or equal) than the second number in the array. If `exclusiveRange` keyword is present in the same schema and its value is true, the validated value must not be equal to the range boundaries.\n\n```javascript\nvar schema = { range: [1, 3] };\najv.validate(schema, 1); // true\najv.validate(schema, 2); // true\najv.validate(schema, 3); // true\najv.validate(schema, 0.99); // false\najv.validate(schema, 3.01); // false\n\nvar schema = { range: [1, 3], exclusiveRange: true };\najv.validate(schema, 1.01); // true\najv.validate(schema, 2); // true\najv.validate(schema, 2.99); // true\najv.validate(schema, 1); // false\najv.validate(schema, 3); // false\n```\n\n\n### `switch`\n\nThis keyword allows to perform advanced conditional validation.\n\nThe value of the keyword is the array of if/then clauses. Each clause is the object with the following properties:\n\n- `if` (optional) - the value is JSON-schema\n- `then` (required) - the value is JSON-schema or boolean\n- `continue` (optional) - the value is boolean\n\nThe validation process is dynamic; all clauses are executed sequentially in the following way:\n\n1. `if`:\n 1. `if` property is JSON-schema according to which the data is:\n 1. valid => go to step 2.\n 2. invalid => go to the NEXT clause, if this was the last clause the validation of `switch` SUCCEEDS.\n 2. `if` property is absent => go to step 2.\n2. `then`:\n 1. `then` property is `true` or it is JSON-schema according to which the data is valid => go to step 3.\n 2. `then` property is `false` or it is JSON-schema according to which the data is invalid => the validation of `switch` FAILS.\n3. `continue`:\n 1. `continue` property is `true` => go to the NEXT clause, if this was the last clause the validation of `switch` SUCCEEDS.\n 2. `continue` property is `false` or absent => validation of `switch` SUCCEEDS.\n\n```javascript\nrequire('ajv-keywords')(ajv, 'switch');\n\nvar schema = {\n type: 'array',\n items: {\n type: 'integer',\n 'switch': [\n { if: { not: { minimum: 1 } }, then: false },\n { if: { maximum: 10 }, then: true },\n { if: { maximum: 100 }, then: { multipleOf: 10 } },\n { if: { maximum: 1000 }, then: { multipleOf: 100 } },\n { then: false }\n ]\n }\n};\n\nvar validItems = [1, 5, 10, 20, 50, 100, 200, 500, 1000];\n\nvar invalidItems = [1, 0, 2000, 11, 57, 123, 'foo'];\n```\n\n__Please note__: this keyword is moved here from Ajv, mainly to preserve backward compatibility. It is unlikely to become a standard. It's preferable to use `if`/`then`/`else` keywords if possible, as they are likely to be added to the standard. The above schema is equivalent to (for example):\n\n```javascript\n{\n type: 'array',\n items: {\n type: 'integer',\n if: { minimum: 1, maximum: 10 },\n then: true,\n else: {\n if: { maximum: 100 },\n then: { multipleOf: 10 },\n else: {\n if: { maximum: 1000 },\n then: { multipleOf: 100 },\n else: false\n }\n }\n }\n}\n```\n\n\n### `select`/`selectCases`/`selectDefault`\n\nThese keywords allow to choose the schema to validate the data based on the value of some property in the validated data.\n\nThese keywords must be present in the same schema object (`selectDefault` is optional).\n\nThe value of `select` keyword should be a [$data reference](https://github.com/epoberezkin/ajv/tree/5.0.2-beta.0#data-reference) that points to any primitive JSON type (string, number, boolean or null) in the data that is validated. You can also use a constant of primitive type as the value of this keyword (e.g., for debugging purposes).\n\nThe value of `selectCases` keyword must be an object where each property name is a possible string representation of the value of `select` keyword and each property value is a corresponding schema (from draft-06 it can be boolean) that must be used to validate the data.\n\nThe value of `selectDefault` keyword is a schema (from draft-06 it can be boolean) that must be used to validate the data in case `selectCases` has no key equal to the stringified value of `select` keyword.\n\nThe validation succeeds in one of the following cases:\n- the validation of data using selected schema succeeds,\n- none of the schemas is selected for validation,\n- the value of select is undefined (no property in the data that the data reference points to).\n\nIf `select` value (in data) is not a primitive type the validation fails.\n\n__Please note__: these keywords require Ajv `$data` option to support [$data reference](https://github.com/epoberezkin/ajv/tree/5.0.2-beta.0#data-reference).\n\n\n```javascript\nrequire('ajv-keywords')(ajv, 'select');\n\nvar schema = {\n type: object,\n required: ['kind'],\n properties: {\n kind: { type: 'string' }\n },\n select: { $data: '0/kind' },\n selectCases: {\n foo: {\n required: ['foo'],\n properties: {\n kind: {},\n foo: { type: 'string' }\n },\n additionalProperties: false\n },\n bar: {\n required: ['bar'],\n properties: {\n kind: {},\n bar: { type: 'number' }\n },\n additionalProperties: false\n }\n },\n selectDefault: {\n propertyNames: {\n not: { enum: ['foo', 'bar'] }\n }\n }\n};\n\nvar validDataList = [\n { kind: 'foo', foo: 'any' },\n { kind: 'bar', bar: 1 },\n { kind: 'anything_else', not_bar_or_foo: 'any value' }\n];\n\nvar invalidDataList = [\n { kind: 'foo' }, // no propery foo\n { kind: 'bar' }, // no propery bar\n { kind: 'foo', foo: 'any', another: 'any value' }, // additional property\n { kind: 'bar', bar: 1, another: 'any value' }, // additional property\n { kind: 'anything_else', foo: 'any' } // property foo not allowed\n { kind: 'anything_else', bar: 1 } // property bar not allowed\n];\n```\n\n__Please note__: the current implementation is BETA. It does not allow using relative URIs in $ref keywords in schemas in `selectCases` and `selectDefault` that point outside of these schemas. The workaround is to use absolute URIs (that can point to any (sub-)schema added to Ajv, including those inside the current root schema where `select` is used). See [tests](https://github.com/epoberezkin/ajv-keywords/blob/v2.0.0/spec/tests/select.json#L314).\n\n\n### `patternRequired`\n\nThis keyword allows to require the presence of properties that match some pattern(s).\n\nThis keyword applies only to objects. If the data is not an object, the validation succeeds.\n\nThe value of this keyword should be an array of strings, each string being a regular expression. For data object to be valid each regular expression in this array should match at least one property name in the data object.\n\nIf the array contains multiple regular expressions, more than one expression can match the same property name.\n\n```javascript\nvar schema = { patternRequired: [ 'f.*o', 'b.*r' ] };\n\nvar validData = { foo: 1, bar: 2 };\nvar alsoValidData = { foobar: 3 };\n\nvar invalidDataList = [ {}, { foo: 1 }, { bar: 2 } ];\n```\n\n\n### `prohibited`\n\nThis keyword allows to prohibit that any of the properties in the list is present in the object.\n\nThis keyword applies only to objects. If the data is not an object, the validation succeeds.\n\nThe value of this keyword should be an array of strings, each string being a property name. For data object to be valid none of the properties in this array should be present in the object.\n\n```\nvar schema = { prohibited: ['foo', 'bar']};\n\nvar validData = { baz: 1 };\nvar alsoValidData = {};\n\nvar invalidDataList = [\n { foo: 1 },\n { bar: 2 },\n { foo: 1, bar: 2}\n];\n```\n\n\n### `deepProperties`\n\nThis keyword allows to validate deep properties (identified by JSON pointers).\n\nThis keyword applies only to objects. If the data is not an object, the validation succeeds.\n\nThe value should be an object, where keys are JSON pointers to the data, starting from the current position in data, and the values are JSON schemas. For data object to be valid the value of each JSON pointer should be valid according to the corresponding schema.\n\n```javascript\nvar schema = {\n type: 'object',\n deepProperties: {\n \"/users/1/role\": { \"enum\": [\"admin\"] }\n }\n};\n\nvar validData = {\n users: [\n {},\n {\n id: 123,\n role: 'admin'\n }\n ]\n};\n\nvar alsoValidData = {\n users: {\n \"1\": {\n id: 123,\n role: 'admin'\n }\n }\n};\n\nvar invalidData = {\n users: [\n {},\n {\n id: 123,\n role: 'user'\n }\n ]\n};\n\nvar alsoInvalidData = {\n users: {\n \"1\": {\n id: 123,\n role: 'user'\n }\n }\n};\n```\n\n\n### `deepRequired`\n\nThis keyword allows to check that some deep properties (identified by JSON pointers) are available.\n\nThis keyword applies only to objects. If the data is not an object, the validation succeeds.\n\nThe value should be an array of JSON pointers to the data, starting from the current position in data. For data object to be valid each JSON pointer should be some existing part of the data.\n\n```javascript\nvar schema = {\n type: 'object',\n deepRequired: [\"/users/1/role\"]\n};\n\nvar validData = {\n users: [\n {},\n {\n id: 123,\n role: 'admin'\n }\n ]\n};\n\nvar invalidData = {\n users: [\n {},\n {\n id: 123\n }\n ]\n};\n```\n\nSee [json-schema-org/json-schema-spec#203](https://github.com/json-schema-org/json-schema-spec/issues/203#issue-197211916) for an example of the equivalent schema without `deepRequired` keyword.\n\n\n### `uniqueItemProperties`\n\nThe keyword allows to check that some properties in array items are unique.\n\nThis keyword applies only to arrays. If the data is not an array, the validation succeeds.\n\nThe value of this keyword must be an array of strings - property names that should have unique values across all items.\n\n```javascript\nvar schema = { uniqueItemProperties: [ \"id\", \"name\" ] };\n\nvar validData = [\n { id: 1 },\n { id: 2 },\n { id: 3 }\n];\n\nvar invalidData1 = [\n { id: 1 },\n { id: 1 },\n { id: 3 }\n];\n\nvar invalidData2 = [\n { id: 1, name: \"taco\" },\n { id: 2, name: \"taco\" }, // duplicate \"name\"\n { id: 3, name: \"salsa\" }\n];\n```\n\nThis keyword is contributed by [@blainesch](https://github.com/blainesch).\n\n\n### `regexp`\n\nThis keyword allows to use regular expressions with flags in schemas (the standard `pattern` keyword does not support flags).\n\nThis keyword applies only to strings. If the data is not a string, the validation succeeds.\n\nThe value of this keyword can be either a string (the result of `regexp.toString()`) or an object with the properties `pattern` and `flags` (the same strings that should be passed to RegExp constructor).\n\n```javascript\nvar schema = {\n type: 'object',\n properties: {\n foo: { regexp: '/foo/i' },\n bar: { regexp: { pattern: 'bar', flags: 'i' } }\n }\n};\n\nvar validData = {\n foo: 'Food',\n bar: 'Barmen'\n};\n\nvar invalidData = {\n foo: 'fog',\n bar: 'bad'\n};\n```\n\n\n### `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum`\n\nThese keywords allow to define minimum/maximum constraints when the format keyword defines ordering.\n\nThese keywords apply only to strings. If the data is not a string, the validation succeeds.\n\nThe value of keyword `formatMaximum` (`formatMinimum`) should be a string. This value is the maximum (minimum) allowed value for the data to be valid as determined by `format` keyword.\n\nWhen this keyword is added, it defines comparison rules for formats `\"date\"`, `\"time\"` and `\"date-time\". Custom formats also can have comparison rules. See [addFormat](https://github.com/epoberezkin/ajv#api-addformat) method.\n\nThe value of keyword `formatExclusiveMaximum` (`formatExclusiveMinimum`) should be a boolean value. These keyword cannot be used without `formatMaximum` (`formatMinimum`). If this keyword value is equal to `true`, the data to be valid should not be equal to the value in `formatMaximum` (`formatMinimum`) keyword.\n\n```javascript\nrequire('ajv-keywords')(ajv, ['formatMinimum', 'formatMaximum']);\n\nvar schema = {\n format: 'date',\n formatMinimum: '2016-02-06',\n formatMaximum: '2016-12-27',\n formatExclusiveMaximum: true\n}\n\nvar validDataList = ['2016-02-06', '2016-12-26', 1];\n\nvar invalidDataList = ['2016-02-05', '2016-12-27', 'abc'];\n```\n\n\n### `dynamicDefaults`\n\nThis keyword allows to assign dynamic defaults to properties, such as timestamps, unique IDs etc.\n\nThis keyword only works if `useDefaults` options is used and not inside `anyOf` keywrods etc., in the same way as [default keyword treated by Ajv](https://github.com/epoberezkin/ajv#assigning-defaults).\n\nThe keyword should be added on the object level. Its value should be an object with each property corresponding to a property name, in the same way as in standard `properties` keyword. The value of each property can be:\n\n- an identifier of default function (a string)\n- an object with properties `func` (an identifier) and `args` (an object with parameters that will be passed to this function during schema compilation - see examples).\n\nThe properties used in `dynamicDefaults` should not be added to `required` keyword (or validation will fail), because unlike `default` this keyword is processed after validation.\n\nThere are several predefined dynamic default functions:\n\n- `\"timestamp\"` - current timestamp in milliseconds\n- `\"datetime\"` - current date and time as string (ISO, valid according to `date-time` format)\n- `\"date\"` - current date as string (ISO, valid according to `date` format)\n- `\"time\"` - current time as string (ISO, valid according to `time` format)\n- `\"random\"` - pseudo-random number in [0, 1) interval\n- `\"randomint\"` - pseudo-random integer number. If string is used as a property value, the function will randomly return 0 or 1. If object `{func: 'randomint', max: N}` is used then the default will be an integer number in [0, N) interval.\n- `\"seq\"` - sequential integer number starting from 0. If string is used as a property value, the default sequence will be used. If object `{func: 'seq', name: 'foo'}` is used then the sequence with name `\"foo\"` will be used. Sequences are global, even if different ajv instances are used.\n\n```javascript\nvar schema = {\n type: 'object',\n dynamicDefaults: {\n ts: 'datetime',\n r: { func: 'randomint', max: 100 },\n id: { func: 'seq', name: 'id' }\n },\n properties: {\n ts: {\n type: 'string',\n format: 'datetime'\n },\n r: {\n type: 'integer',\n minimum: 0,\n maximum: 100,\n exclusiveMaximum: true\n },\n id: {\n type: 'integer',\n minimum: 0\n }\n }\n};\n\nvar data = {};\najv.validate(data); // true\ndata; // { ts: '2016-12-01T22:07:28.829Z', r: 25, id: 0 }\n\nvar data1 = {};\najv.validate(data1); // true\ndata1; // { ts: '2016-12-01T22:07:29.832Z', r: 68, id: 1 }\n\najv.validate(data1); // true\ndata1; // didn't change, as all properties were defined\n```\n\nYou can add your own dynamic default function to be recognised by this keyword:\n\n```javascript\nvar uuid = require('uuid');\n\nfunction uuidV4() { return uuid.v4(); }\n\nvar definition = require('ajv-keywords').get('dynamicDefaults').definition;\n// or require('ajv-keywords/keywords/dynamicDefaults').definition;\ndefinition.DEFAULTS.uuid = uuidV4;\n\nvar schema = {\n dynamicDefaults: { id: 'uuid' },\n properties: { id: { type: 'string', format: 'uuid' } }\n};\n\nvar data = {};\najv.validate(schema, data); // true\ndata; // { id: 'a1183fbe-697b-4030-9bcc-cfeb282a9150' };\n\nvar data1 = {};\najv.validate(schema, data1); // true\ndata1; // { id: '5b008de7-1669-467a-a5c6-70fa244d7209' }\n```\n\nYou also can define dynamic default that accepts parameters, e.g. version of uuid:\n\n```javascript\nvar uuid = require('uuid');\n\nfunction getUuid(args) {\n var version = 'v' + (arvs && args.v || 4);\n return function() {\n return uuid[version]();\n };\n}\n\nvar definition = require('ajv-keywords').get('dynamicDefaults').definition;\ndefinition.DEFAULTS.uuid = getUuid;\n\nvar schema = {\n dynamicDefaults: {\n id1: 'uuid', // v4\n id2: { func: 'uuid', v: 4 }, // v4\n id3: { func: 'uuid', v: 1 } // v1\n }\n};\n```\n\n### `transform`\n\nThis keyword allows a string to be modified before validation. \n\nThese keywords apply only to strings. If the data is not a string, the transform is skipped.\n\nThere are limitation due to how ajv is written:\n- a stand alone string cannot be transformed. ie `data = 'a'; ajv.validate(schema, data);`\n- currently cannot work with `ajv-pack`\n\n**Supported options:**\n- `trim`: remove whitespace from start and end\n- `trimLeft`: remove whitespace from start\n- `trimRight`: remove whitespace from end\n- `toLowerCase`: case string to all lower case\n- `toUpperCase`: case string to all upper case\n- `toEnumCase`: case string to match case in schema\n\nOptions are applied in the order they are listed.\n\nNote: `toEnumCase` requires that all allowed values are unique when case insensitive.\n\n**Example: multiple options**\n```javascript\nrequire('ajv-keywords')(ajv, ['transform']);\n\nvar schema = {\n type: 'array',\n items: {\n type:'string',\n transform:['trim','lowercase']\n }\n};\n\nvar data = [' MixCase '];\navj.validate(schema, data);\nconsole.log(data); // ['mixcase']\n\n```\n\n**Example: `enumcase`**\n```javascript\nrequire('ajv-keywords')(ajv, ['transform']);\n\nvar schema = {\n type: 'array',\n items: {\n type:'string',\n transform:['trim','enumcase'],\n enum:['pH']\n }\n};\n\nvar data = ['ph',' Ph','PH','pH '];\navj.validate(schema, data);\nconsole.log(data); // ['pH','pH','pH','pH']\n```\n\n\n## License\n\n[MIT](https://github.com/epoberezkin/ajv-keywords/blob/master/LICENSE)\n", - "readmeFilename": "README.md", - "_id": "ajv-keywords@3.2.0", - "_requested": { - "type": "version", - "registry": true, - "raw": "ajv-keywords@3.2.0", - "name": "ajv-keywords", - "escapedName": "ajv-keywords", - "rawSpec": "3.2.0", - "saveSpec": "[Circular]", - "fetchSpec": "3.2.0" - }, - "_spec": "3.2.0", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "ajv-keywords@3.2.0", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "dependencies": {}, - "optionalDependencies": {}, - "_dependencies": {}, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/ajv-keywords", - "error": "[Circular]", - "extraneous": false - } - }, - "devDependencies": { - "@commitlint/cli": "^5.2.8", - "@commitlint/config-angular": "^5.1.1", - "@webpack-contrib/eslint-config-webpack": "^2.0.2", - "babel-cli": "^6.26.0", - "babel-jest": "^22.2.2", - "babel-plugin-transform-object-rest-spread": "^6.26.0", - "babel-polyfill": "^6.26.0", - "babel-preset-env": "^1.6.1", - "conventional-github-releaser": "^2.0.0", - "cross-env": "^5.1.3", - "del": "^3.0.0", - "del-cli": "^1.1.0", - "eslint": "^4.17.0", - "eslint-plugin-import": "^2.8.0", - "eslint-plugin-prettier": "^2.6.0", - "husky": "^0.14.3", - "jest": "^22.2.2", - "lint-staged": "^6.1.0", - "memory-fs": "^0.4.1", - "nsp": "^3.1.0", - "pre-commit": "^1.2.2", - "prettier": "^1.10.2", - "standard-version": "^4.3.0", - "webpack": "^3.11.0", - "webpack-defaults": "^2.0.0-rc.4" - }, - "engines": { - "node": ">= 4.8.0 || >= 6.9.0 || >= 8.9.0" - }, - "peerDependencies": { - "webpack": "^2.0.0 || ^3.0.0 || ^4.0.0" - }, - "homepage": "https://github.com/webpack-contrib/schema-utils", - "repository": { - "type": "git", - "url": "git+https://github.com/webpack-contrib/schema-utils.git" - }, - "bugs": { - "url": "https://github.com/webpack-contrib/schema-utils/issues" - }, - "pre-commit": "lint-staged", - "lint-staged": { - "*.js": [ - "eslint --fix", - "git add" - ] - }, - "_resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", - "_integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", - "_from": "schema-utils@0.4.5", - "readme": "[![npm][npm]][npm-url]\n[![node][node]][node-url]\n[![deps][deps]][deps-url]\n[![test][test]][test-url]\n[![coverage][cover]][cover-url]\n[![chat][chat]][chat-url]\n\n
\n \n \n \n \n \n \n

Schema Utils

\n
\n\n

Install

\n\n```bash\nnpm i schema-utils\n```\n\n

Usage

\n\n### `validateOptions`\n\n**schema.json**\n```js\n{\n \"type\": \"object\",\n \"properties\": {\n // Options...\n },\n \"additionalProperties\": false\n}\n```\n\n```js\nimport schema from 'path/to/schema.json'\nimport validateOptions from 'schema-utils'\n\nvalidateOptions(schema, options, 'Loader/Plugin Name')\n```\n\n

Examples

\n\n**schema.json**\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"test\": {\n \"anyOf\": [\n { \"type\": \"array\" },\n { \"type\": \"string\" },\n { \"instanceof\": \"RegExp\" }\n ]\n },\n \"transform\": {\n \"instanceof\": \"Function\"\n },\n \"sourceMap\": {\n \"type\": \"boolean\"\n }\n },\n \"additionalProperties\": false\n}\n```\n\n### `Loader`\n\n```js\nimport { getOptions } from 'loader-utils'\nimport validateOptions from 'schema-utils'\n\nimport schema from 'path/to/schema.json'\n\nfunction loader (src, map) {\n const options = getOptions(this) || {}\n\n validateOptions(schema, options, 'Loader Name')\n\n // Code...\n}\n```\n\n### `Plugin`\n\n```js\nimport validateOptions from 'schema-utils'\n\nimport schema from 'path/to/schema.json'\n\nclass Plugin {\n constructor (options) {\n validateOptions(schema, options, 'Plugin Name')\n\n this.options = options\n }\n\n apply (compiler) {\n // Code...\n }\n}\n```\n\n

Maintainers

\n\n\n \n \n \n \n \n \n \n
\n \n
\n Juho Vepsäläinen\n
\n \n
\n Joshua Wiens\n
\n \n
\n Michael Ciniawsky\n
\n\n\n[npm]: https://img.shields.io/npm/v/schema-utils.svg\n[npm-url]: https://npmjs.com/package/schema-utils\n\n[node]: https://img.shields.io/node/v/schema-utils.svg\n[node-url]: https://nodejs.org\n\n[deps]: https://david-dm.org/webpack-contrib/schema-utils.svg\n[deps-url]: https://david-dm.org/webpack-contrib/schema-utils\n\n[test]: http://img.shields.io/travis/webpack-contrib/schema-utils.svg\n[test-url]: https://travis-ci.org/webpack-contrib/schema-utils\n\n[cover]: https://codecov.io/gh/webpack-contrib/schema-utils/branch/master/graph/badge.svg\n[cover-url]: https://codecov.io/gh/webpack-contrib/schema-utils\n\n[chat]: https://img.shields.io/badge/gitter-webpack%2Fwebpack-brightgreen.svg\n[chat-url]: https://gitter.im/webpack/webpack\n", - "readmeFilename": "README.md", - "_id": "schema-utils@0.4.5", - "_requested": { - "type": "version", - "registry": true, - "raw": "schema-utils@0.4.5", - "name": "schema-utils", - "escapedName": "schema-utils", - "rawSpec": "0.4.5", - "saveSpec": "[Circular]", - "fetchSpec": "0.4.5" - }, - "_spec": "0.4.5", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "schema-utils@0.4.5", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/schema-utils", - "error": "[Circular]", - "extraneous": false - } - }, - "devDependencies": { - "babel-cli": "^6.0.0", - "babel-jest": "^21.0.0", - "babel-plugin-transform-object-rest-spread": "^6.0.0", - "babel-polyfill": "^6.0.0", - "babel-preset-env": "^1.0.0", - "cross-env": "^5.0.0", - "del": "^3.0.0", - "del-cli": "^1.0.0", - "eslint": "^4.0.0", - "eslint-config-webpack": "^1.0.0", - "eslint-plugin-import": "^2.2.0", - "jest": "^21.0.0", - "lint-staged": "^4.0.0", - "nsp": "^2.6.0", - "pre-commit": "^1.0.0", - "standard-version": "^4.0.0", - "webpack": "^3.0.0", - "webpack-defaults": "^1.6.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/webpack-contrib/worker-loader.git" - }, - "bugs": { - "url": "https://github.com/webpack-contrib/worker-loader/issues" - }, - "homepage": "https://github.com/webpack-contrib/html-loader", - "license": "MIT", - "pre-commit": "lint-staged", - "lint-staged": { - "*.js": [ - "eslint --fix", - "git add" - ] - }, - "_resolved": "https://registry.npmjs.org/worker-loader/-/worker-loader-1.1.1.tgz", - "_integrity": "sha512-qJZLVS/jMCBITDzPo/RuweYSIG8VJP5P67mP/71alGyTZRe1LYJFdwLjLalY3T5ifx0bMDRD3OB6P2p1escvlg==", - "_from": "worker-loader@1.1.1", - "readme": "[![npm][npm]][npm-url]\r\n[![node][node]][node-url]\r\n[![deps][deps]][deps-url]\r\n[![test][test]][test-url]\r\n[![coverage][cover]][cover-url]\r\n[![chat][chat]][chat-url]\r\n\r\n
\r\n \r\n \r\n \r\n

Worker Loader

\r\n

This loader registers the script as Web Worker

\r\n

\r\n\r\n\r\n

Install

\r\n\r\n```bash\r\nnpm i -D worker-loader\r\n```\r\n\r\n

Usage

\r\n\r\n### `Inlined`\r\n\r\n**App.js**\r\n```js\r\nimport Worker from 'worker-loader!./Worker.js';\r\n```\r\n\r\n### `Config`\r\n\r\n**webpack.config.js**\r\n```js\r\n{\r\n module: {\r\n rules: [\r\n {\r\n test: /\\.worker\\.js$/,\r\n use: { loader: 'worker-loader' }\r\n }\r\n ]\r\n }\r\n}\r\n```\r\n\r\n**App.js**\r\n```js\r\nimport Worker from './file.worker.js';\r\n\r\nconst worker = new Worker();\r\n\r\nworker.postMessage({ a: 1 });\r\nworker.onmessage = function (event) {};\r\n\r\nworker.addEventListener(\"message\", function (event) {});\r\n```\r\n\r\n

Options

\r\n\r\n|Name|Type|Default|Description|\r\n|:--:|:--:|:-----:|:----------|\r\n|[**`name`**](#name)|`{String}`|`[hash].worker.js`|Set a custom name for the output script|\r\n|[**`inline`**](#inline)|`{Boolean}`|`false`|Inline the worker as a BLOB|\r\n|[**`fallback`**](#fallback)|`{Boolean}`|`false`|Require a fallback for non-worker supporting environments|\r\n|[**`publicPath`**](#publicPath)|`{String}`|`null`|Override the path from which worker scripts are downloaded|\r\n\r\n### `name`\r\n\r\nTo set a custom name for the output script, use the `name` parameter. The name may contain the string `[hash]`, which will be replaced with a content dependent hash for caching purposes\r\n\r\n*webpack.config.js**\r\n```js\r\n{\r\n loader: 'worker-loader',\r\n options: { name: 'WorkerName.[hash].js' }\r\n}\r\n```\r\n\r\n### `inline`\r\n\r\nYou can also inline the worker as a BLOB with the `inline` parameter\r\n\r\n**webpack.config.js**\r\n```js\r\n{\r\n loader: 'worker-loader',\r\n options: { inline: true }\r\n}\r\n```\r\n\r\n> ℹ️ Inline mode will also create chunks for browsers without support for inline workers, to disable this behavior just set `fallback` parameter as `false`\r\n\r\n**webpack.config.js**\r\n```js\r\n{\r\n loader: 'worker-loader'\r\n options: { inline: true, fallback: false }\r\n}\r\n```\r\n\r\n### `fallback`\r\n\r\nRequire a fallback for non-worker supporting environments\r\n\r\n**webpack.config.js**\r\n```js\r\n{\r\n loader: 'worker-loader'\r\n options: { fallback: false }\r\n}\r\n```\r\n\r\n### `publicPath`\r\n\r\nOverrides the path from which worker scripts are downloaded. If not specified, the same public path used for other\r\nwebpack assets is used\r\n\r\n**webpack.config.js**\r\n```js\r\n{\r\n loader: 'worker-loader'\r\n options: { publicPath: '/scripts/workers/' }\r\n}\r\n```\r\n\r\n

Examples

\r\n\r\nThe worker file can import dependencies just like any other file\r\n\r\n**Worker.js**\r\n```js\r\nconst _ = require('lodash')\r\n\r\nconst obj = { foo: 'foo' }\r\n\r\n_.has(obj, 'foo')\r\n\r\n// Post data to parent thread\r\nself.postMessage({ foo: 'foo' })\r\n\r\n// Respond to message from parent thread\r\nself.addEventListener('message', (event) => console.log(event)) \r\n```\r\n\r\n### `Integrating with ES2015 Modules`\r\n\r\n> ℹ️ You can even use ES2015 Modules if you have the [`babel-loader`](https://github.com/babel/babel-loader) configured.\r\n\r\n**Worker.js**\r\n```js\r\nimport _ from 'lodash'\r\n\r\nconst obj = { foo: 'foo' }\r\n\r\n_.has(obj, 'foo')\r\n\r\n// Post data to parent thread\r\nself.postMessage({ foo: 'foo' })\r\n\r\n// Respond to message from parent thread\r\nself.addEventListener('message', (event) => console.log(event))\r\n```\r\n\r\n### `Integrating with TypeScript`\r\n\r\nTo integrate with TypeScript, you will need to define a custom module for the exports of your worker\r\n\r\n**typings/custom.d.ts**\r\n```typescript\r\ndeclare module \"worker-loader!*\" {\r\n class WebpackWorker extends Worker {\r\n constructor();\r\n }\r\n\r\n export = WebpackWorker;\r\n}\r\n```\r\n\r\n**Worker.ts**\r\n```typescript\r\nconst ctx: Worker = self as any;\r\n\r\n// Post data to parent thread\r\nctx.postMessage({ foo: \"foo\" });\r\n\r\n// Respond to message from parent thread\r\nctx.addEventListener(\"message\", (event) => console.log(event));\r\n```\r\n\r\n**App.ts**\r\n```typescript\r\nimport Worker = require(\"worker-loader!./Worker\");\r\n\r\nconst worker = new Worker();\r\n\r\nworker.postMessage({ a: 1 });\r\nworker.onmessage = (event) => {};\r\n\r\nworker.addEventListener(\"message\", (event) => {});\r\n```\r\n\r\n### `Cross-Origin Policy`\r\n\r\n[`WebWorkers`](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) are restricted by a [same-origin policy](https://en.wikipedia.org/wiki/Same-origin_policy), so if your `webpack` assets are not being served from the same origin as your application, their download may be blocked by your browser. This scenario can commonly occur if you are hosting your assets under a CDN domain. Even downloads from the `webpack-dev-server` could be blocked. There are two workarounds\r\n\r\nFirstly, you can inline the worker as a blob instead of downloading it as an external script via the [`inline`](#inline) parameter\r\n\r\n**App.js**\r\n```js\r\nimport Worker from './file.worker.js';\r\n```\r\n\r\n**webpack.config.js**\r\n```js\r\n{\r\n loader: 'worker-loader'\r\n options: { inline: true }\r\n}\r\n```\r\n\r\nSecondly, you may override the base download URL for your worker script via the [`publicPath`](#publicpath) option\r\n\r\n**App.js**\r\n```js\r\n// This will cause the worker to be downloaded from `/workers/file.worker.js`\r\nimport Worker from './file.worker.js';\r\n```\r\n\r\n**webpack.config.js**\r\n```js\r\n{\r\n loader: 'worker-loader'\r\n options: { publicPath: '/workers/' }\r\n}\r\n```\r\n\r\n

Maintainers

\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n Bogdan Chadkin\r\n
\r\n \r\n \r\n
\r\n Juho Vepsäläinen\r\n
\r\n
\r\n \r\n \r\n
\r\n Joshua Wiens\r\n
\r\n
\r\n \r\n \r\n
\r\n Michael Ciniawsky\r\n
\r\n
\r\n \r\n \r\n
\r\n Alexander Krasnoyarov\r\n
\r\n
\r\n\r\n\r\n[npm]: https://img.shields.io/npm/v/worker-loader.svg\r\n[npm-url]: https://npmjs.com/package/worker-loader\r\n\r\n[node]: https://img.shields.io/node/v/cache-loader.svg\r\n[node-url]: https://nodejs.org\r\n\r\n[deps]: https://david-dm.org/webpack-contrib/worker-loader.svg\r\n[deps-url]: https://david-dm.org/webpack-contrib/worker-loader\r\n\r\n[test]: http://img.shields.io/travis/webpack-contrib/worker-loader.svg\r\n[test-url]: https://travis-ci.org/webpack-contrib/worker-loader\r\n\r\n[cover]: https://codecov.io/gh/webpack-contrib/cache-loader/branch/master/graph/badge.svg\r\n[cover-url]: https://codecov.io/gh/webpack-contrib/cache-loader\r\n\r\n[chat]: https://img.shields.io/badge/gitter-webpack%2Fwebpack-brightgreen.svg\r\n[chat-url]: https://gitter.im/webpack/webpack\r\n", - "readmeFilename": "README.md", - "_id": "worker-loader@1.1.1", - "_requested": { - "type": "version", - "registry": true, - "raw": "worker-loader@1.1.1", - "name": "worker-loader", - "escapedName": "worker-loader", - "rawSpec": "1.1.1", - "saveSpec": "[Circular]", - "fetchSpec": "1.1.1" - }, - "_spec": "1.1.1", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "worker-loader@1.1.1", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "optionalDependencies": {}, - "_dependencies": { - "loader-utils": "^1.0.0", - "schema-utils": "^0.4.0" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/worker-loader", - "error": "[Circular]", - "extraneous": false - } - }, - "peerDependencies": { - "webpack": "^2.0.0 || ^3.0.0" - }, - "browser": { - "fs": false, - "http": false, - "https": false, - "node-ensure": false - }, - "format": "amd", - "repository": { - "type": "git", - "url": "git+https://github.com/mozilla/pdfjs-dist.git" - }, - "_resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-2.0.489.tgz", - "_integrity": "sha1-Y+VLKSqGeQpFRpfrRNQ0e4+/rSc=", - "_from": "pdfjs-dist@2.0.489", - "readme": "# PDF.js\n\nPDF.js is a Portable Document Format (PDF) library that is built with HTML5.\nOur goal is to create a general-purpose, web standards-based platform for\nparsing and rendering PDFs.\n\nThis is a pre-built version of the PDF.js source code. It is automatically\ngenerated by the build scripts.\n\nSee https://github.com/mozilla/pdf.js for learning and contributing.\n", - "readmeFilename": "README.md", - "_id": "pdfjs-dist@2.0.489", - "_requested": { - "type": "version", - "registry": true, - "raw": "pdfjs-dist@2.0.489", - "name": "pdfjs-dist", - "escapedName": "pdfjs-dist", - "rawSpec": "2.0.489", - "saveSpec": "[Circular]", - "fetchSpec": "2.0.489" - }, - "_spec": "2.0.489", - "_where": "/Users/dvuika/github/alfresco-content-app", - "_args": [ - [ - "pdfjs-dist@2.0.489", - "/Users/dvuika/github/alfresco-content-app" - ] - ], - "devDependencies": {}, - "optionalDependencies": {}, - "_dependencies": { - "node-ensure": "^0.0.0", - "worker-loader": "^1.1.1" - }, - "path": "/Users/dvuika/github/alfresco-content-app/node_modules/pdfjs-dist", - "error": "[Circular]", - "extraneous": false, - "peerMissing": [ - { - "requiredBy": "@alfresco/adf-core@2.6.1", - "requires": "pdfjs-dist@2.0.303" - } - ] - }, - "peerMissing": true - }, - "rxjs": { - "version": "6.3.3", - "from": "rxjs@6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz" - }, - "zone.js": { - "version": "0.8.26", - "from": "zone.js@0.8.26", - "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.26.tgz" - } - } -}