poe-code 12.0.11 → 13.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/dist/index.js +6 -3
  2. package/dist/index.js.map +2 -2
  3. package/dist/metafile.json +1 -1
  4. package/node_modules/esprima/LICENSE.BSD +21 -0
  5. package/node_modules/esprima/README.md +46 -0
  6. package/node_modules/esprima/bin/esparse.js +139 -0
  7. package/node_modules/esprima/bin/esvalidate.js +236 -0
  8. package/node_modules/esprima/dist/esprima.js +6709 -0
  9. package/node_modules/esprima/package.json +112 -0
  10. package/node_modules/extend-shallow/LICENSE +21 -0
  11. package/node_modules/extend-shallow/README.md +61 -0
  12. package/node_modules/extend-shallow/index.js +33 -0
  13. package/node_modules/extend-shallow/package.json +56 -0
  14. package/node_modules/gray-matter/LICENSE +21 -0
  15. package/node_modules/gray-matter/README.md +565 -0
  16. package/node_modules/gray-matter/gray-matter.d.ts +114 -0
  17. package/node_modules/gray-matter/index.js +228 -0
  18. package/node_modules/gray-matter/lib/defaults.js +18 -0
  19. package/node_modules/gray-matter/lib/engine.js +30 -0
  20. package/node_modules/gray-matter/lib/engines.js +54 -0
  21. package/node_modules/gray-matter/lib/excerpt.js +32 -0
  22. package/node_modules/gray-matter/lib/parse.js +13 -0
  23. package/node_modules/gray-matter/lib/stringify.js +56 -0
  24. package/node_modules/gray-matter/lib/to-file.js +43 -0
  25. package/node_modules/gray-matter/lib/utils.js +66 -0
  26. package/node_modules/gray-matter/node_modules/argparse/LICENSE +21 -0
  27. package/node_modules/gray-matter/node_modules/argparse/README.md +257 -0
  28. package/node_modules/gray-matter/node_modules/argparse/index.js +3 -0
  29. package/node_modules/gray-matter/node_modules/argparse/lib/action/append/constant.js +47 -0
  30. package/node_modules/gray-matter/node_modules/argparse/lib/action/append.js +53 -0
  31. package/node_modules/gray-matter/node_modules/argparse/lib/action/count.js +40 -0
  32. package/node_modules/gray-matter/node_modules/argparse/lib/action/help.js +47 -0
  33. package/node_modules/gray-matter/node_modules/argparse/lib/action/store/constant.js +43 -0
  34. package/node_modules/gray-matter/node_modules/argparse/lib/action/store/false.js +27 -0
  35. package/node_modules/gray-matter/node_modules/argparse/lib/action/store/true.js +26 -0
  36. package/node_modules/gray-matter/node_modules/argparse/lib/action/store.js +50 -0
  37. package/node_modules/gray-matter/node_modules/argparse/lib/action/subparsers.js +149 -0
  38. package/node_modules/gray-matter/node_modules/argparse/lib/action/version.js +47 -0
  39. package/node_modules/gray-matter/node_modules/argparse/lib/action.js +146 -0
  40. package/node_modules/gray-matter/node_modules/argparse/lib/action_container.js +482 -0
  41. package/node_modules/gray-matter/node_modules/argparse/lib/argparse.js +14 -0
  42. package/node_modules/gray-matter/node_modules/argparse/lib/argument/error.js +50 -0
  43. package/node_modules/gray-matter/node_modules/argparse/lib/argument/exclusive.js +54 -0
  44. package/node_modules/gray-matter/node_modules/argparse/lib/argument/group.js +75 -0
  45. package/node_modules/gray-matter/node_modules/argparse/lib/argument_parser.js +1161 -0
  46. package/node_modules/gray-matter/node_modules/argparse/lib/const.js +21 -0
  47. package/node_modules/gray-matter/node_modules/argparse/lib/help/added_formatters.js +87 -0
  48. package/node_modules/gray-matter/node_modules/argparse/lib/help/formatter.js +795 -0
  49. package/node_modules/gray-matter/node_modules/argparse/lib/namespace.js +76 -0
  50. package/node_modules/gray-matter/node_modules/argparse/lib/utils.js +57 -0
  51. package/node_modules/gray-matter/node_modules/argparse/package.json +34 -0
  52. package/node_modules/gray-matter/node_modules/js-yaml/LICENSE +21 -0
  53. package/node_modules/gray-matter/node_modules/js-yaml/README.md +302 -0
  54. package/node_modules/gray-matter/node_modules/js-yaml/bin/js-yaml.js +132 -0
  55. package/node_modules/gray-matter/node_modules/js-yaml/dist/js-yaml.js +4011 -0
  56. package/node_modules/gray-matter/node_modules/js-yaml/dist/js-yaml.min.js +1 -0
  57. package/node_modules/gray-matter/node_modules/js-yaml/index.js +7 -0
  58. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/common.js +59 -0
  59. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/dumper.js +850 -0
  60. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/exception.js +43 -0
  61. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/loader.js +1666 -0
  62. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/mark.js +76 -0
  63. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/core.js +18 -0
  64. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +25 -0
  65. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +28 -0
  66. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +17 -0
  67. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/json.js +25 -0
  68. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema.js +108 -0
  69. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/binary.js +138 -0
  70. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/bool.js +35 -0
  71. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/float.js +116 -0
  72. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/int.js +173 -0
  73. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/js/function.js +93 -0
  74. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +60 -0
  75. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +28 -0
  76. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/map.js +8 -0
  77. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/merge.js +12 -0
  78. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/null.js +34 -0
  79. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/omap.js +44 -0
  80. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/pairs.js +53 -0
  81. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/seq.js +8 -0
  82. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/set.js +29 -0
  83. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/str.js +8 -0
  84. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +88 -0
  85. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type.js +61 -0
  86. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml.js +39 -0
  87. package/node_modules/gray-matter/node_modules/js-yaml/package.json +52 -0
  88. package/node_modules/gray-matter/package.json +127 -0
  89. package/node_modules/is-extendable/LICENSE +21 -0
  90. package/node_modules/is-extendable/README.md +72 -0
  91. package/node_modules/is-extendable/index.js +13 -0
  92. package/node_modules/is-extendable/package.json +51 -0
  93. package/node_modules/kind-of/LICENSE +21 -0
  94. package/node_modules/kind-of/README.md +367 -0
  95. package/node_modules/kind-of/index.js +129 -0
  96. package/node_modules/kind-of/package.json +88 -0
  97. package/node_modules/section-matter/LICENSE +21 -0
  98. package/node_modules/section-matter/README.md +236 -0
  99. package/node_modules/section-matter/index.js +136 -0
  100. package/node_modules/section-matter/package.json +55 -0
  101. package/node_modules/sprintf-js/.npmignore +1 -0
  102. package/node_modules/sprintf-js/LICENSE +24 -0
  103. package/node_modules/sprintf-js/README.md +88 -0
  104. package/node_modules/sprintf-js/bower.json +14 -0
  105. package/node_modules/sprintf-js/demo/angular.html +20 -0
  106. package/node_modules/sprintf-js/dist/angular-sprintf.min.js +4 -0
  107. package/node_modules/sprintf-js/dist/angular-sprintf.min.js.map +1 -0
  108. package/node_modules/sprintf-js/dist/angular-sprintf.min.map +1 -0
  109. package/node_modules/sprintf-js/dist/sprintf.min.js +4 -0
  110. package/node_modules/sprintf-js/dist/sprintf.min.js.map +1 -0
  111. package/node_modules/sprintf-js/dist/sprintf.min.map +1 -0
  112. package/node_modules/sprintf-js/gruntfile.js +36 -0
  113. package/node_modules/sprintf-js/package.json +22 -0
  114. package/node_modules/sprintf-js/src/angular-sprintf.js +18 -0
  115. package/node_modules/sprintf-js/src/sprintf.js +208 -0
  116. package/node_modules/sprintf-js/test/test.js +82 -0
  117. package/node_modules/strip-bom-string/LICENSE +21 -0
  118. package/node_modules/strip-bom-string/README.md +66 -0
  119. package/node_modules/strip-bom-string/index.js +15 -0
  120. package/node_modules/strip-bom-string/package.json +60 -0
  121. package/package.json +6 -3
  122. package/packages/safe-fs/dist/fs/webdav/webdav.d.ts +2 -0
  123. package/packages/safe-js/dist/browser/chunks/{chunk-MUKMA7ZY.js → chunk-GJWMQ42Z.js} +35 -2
  124. package/packages/safe-js/dist/browser/chunks/{chunk-MUKMA7ZY.js.map → chunk-GJWMQ42Z.js.map} +2 -2
  125. package/packages/safe-js/dist/browser/safe-fs-core.js +1 -1
  126. package/packages/safe-js/dist/browser/safe-fs.js +1 -1
  127. package/packages/safe-js/dist/chunks/{chunk-HCODJUGF.js → chunk-EL23VF23.js} +3 -3
  128. package/packages/safe-js/dist/chunks/{chunk-YBQUQPZV.js → chunk-WVN5MMDR.js} +35 -2
  129. package/packages/safe-js/dist/chunks/chunk-WVN5MMDR.js.map +7 -0
  130. package/packages/safe-js/dist/chunks/{chunk-F7NY24BF.js → chunk-ZRX5HT5L.js} +2 -2
  131. package/packages/safe-js/dist/cli.js +3 -3
  132. package/packages/safe-js/dist/index.js +3 -3
  133. package/packages/safe-js/dist/safe-fs-core.js +1 -1
  134. package/packages/safe-js/dist/safe-fs-node.js +2 -2
  135. package/packages/safe-js/dist/safe-fs.js +2 -2
  136. package/packages/safe-js/dist/chunks/chunk-YBQUQPZV.js.map +0 -7
  137. /package/packages/safe-js/dist/chunks/{chunk-HCODJUGF.js.map → chunk-EL23VF23.js.map} +0 -0
  138. /package/packages/safe-js/dist/chunks/{chunk-F7NY24BF.js.map → chunk-ZRX5HT5L.js.map} +0 -0
@@ -0,0 +1,61 @@
1
+ 'use strict';
2
+
3
+ var YAMLException = require('./exception');
4
+
5
+ var TYPE_CONSTRUCTOR_OPTIONS = [
6
+ 'kind',
7
+ 'resolve',
8
+ 'construct',
9
+ 'instanceOf',
10
+ 'predicate',
11
+ 'represent',
12
+ 'defaultStyle',
13
+ 'styleAliases'
14
+ ];
15
+
16
+ var YAML_NODE_KINDS = [
17
+ 'scalar',
18
+ 'sequence',
19
+ 'mapping'
20
+ ];
21
+
22
+ function compileStyleAliases(map) {
23
+ var result = {};
24
+
25
+ if (map !== null) {
26
+ Object.keys(map).forEach(function (style) {
27
+ map[style].forEach(function (alias) {
28
+ result[String(alias)] = style;
29
+ });
30
+ });
31
+ }
32
+
33
+ return result;
34
+ }
35
+
36
+ function Type(tag, options) {
37
+ options = options || {};
38
+
39
+ Object.keys(options).forEach(function (name) {
40
+ if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
41
+ throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
42
+ }
43
+ });
44
+
45
+ // TODO: Add tag format check.
46
+ this.tag = tag;
47
+ this.kind = options['kind'] || null;
48
+ this.resolve = options['resolve'] || function () { return true; };
49
+ this.construct = options['construct'] || function (data) { return data; };
50
+ this.instanceOf = options['instanceOf'] || null;
51
+ this.predicate = options['predicate'] || null;
52
+ this.represent = options['represent'] || null;
53
+ this.defaultStyle = options['defaultStyle'] || null;
54
+ this.styleAliases = compileStyleAliases(options['styleAliases'] || null);
55
+
56
+ if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
57
+ throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
58
+ }
59
+ }
60
+
61
+ module.exports = Type;
@@ -0,0 +1,39 @@
1
+ 'use strict';
2
+
3
+
4
+ var loader = require('./js-yaml/loader');
5
+ var dumper = require('./js-yaml/dumper');
6
+
7
+
8
+ function deprecated(name) {
9
+ return function () {
10
+ throw new Error('Function ' + name + ' is deprecated and cannot be used.');
11
+ };
12
+ }
13
+
14
+
15
+ module.exports.Type = require('./js-yaml/type');
16
+ module.exports.Schema = require('./js-yaml/schema');
17
+ module.exports.FAILSAFE_SCHEMA = require('./js-yaml/schema/failsafe');
18
+ module.exports.JSON_SCHEMA = require('./js-yaml/schema/json');
19
+ module.exports.CORE_SCHEMA = require('./js-yaml/schema/core');
20
+ module.exports.DEFAULT_SAFE_SCHEMA = require('./js-yaml/schema/default_safe');
21
+ module.exports.DEFAULT_FULL_SCHEMA = require('./js-yaml/schema/default_full');
22
+ module.exports.load = loader.load;
23
+ module.exports.loadAll = loader.loadAll;
24
+ module.exports.safeLoad = loader.safeLoad;
25
+ module.exports.safeLoadAll = loader.safeLoadAll;
26
+ module.exports.dump = dumper.dump;
27
+ module.exports.safeDump = dumper.safeDump;
28
+ module.exports.YAMLException = require('./js-yaml/exception');
29
+
30
+ // Deprecated schema names from JS-YAML 2.0.x
31
+ module.exports.MINIMAL_SCHEMA = require('./js-yaml/schema/failsafe');
32
+ module.exports.SAFE_SCHEMA = require('./js-yaml/schema/default_safe');
33
+ module.exports.DEFAULT_SCHEMA = require('./js-yaml/schema/default_full');
34
+
35
+ // Deprecated functions from JS-YAML 1.x.x
36
+ module.exports.scan = deprecated('scan');
37
+ module.exports.parse = deprecated('parse');
38
+ module.exports.compose = deprecated('compose');
39
+ module.exports.addConstructor = deprecated('addConstructor');
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "js-yaml",
3
+ "version": "3.15.1",
4
+ "description": "YAML 1.2 parser and serializer",
5
+ "keywords": [
6
+ "yaml",
7
+ "parser",
8
+ "serializer",
9
+ "pyyaml"
10
+ ],
11
+ "homepage": "https://github.com/nodeca/js-yaml",
12
+ "author": "Vladimir Zapparov <dervus.grim@gmail.com>",
13
+ "contributors": [
14
+ "Aleksey V Zapparov <ixti@member.fsf.org> (http://www.ixti.net/)",
15
+ "Vitaly Puzrin <vitaly@rcdesign.ru> (https://github.com/puzrin)",
16
+ "Martin Grenfell <martin.grenfell@gmail.com> (http://got-ravings.blogspot.com)"
17
+ ],
18
+ "license": "MIT",
19
+ "repository": "nodeca/js-yaml",
20
+ "files": [
21
+ "index.js",
22
+ "lib/",
23
+ "bin/",
24
+ "dist/"
25
+ ],
26
+ "publishConfig": {
27
+ "tag": "v3-legacy"
28
+ },
29
+ "bin": {
30
+ "js-yaml": "bin/js-yaml.js"
31
+ },
32
+ "unpkg": "dist/js-yaml.min.js",
33
+ "jsdelivr": "dist/js-yaml.min.js",
34
+ "dependencies": {
35
+ "argparse": "^1.0.7",
36
+ "esprima": "^4.0.0"
37
+ },
38
+ "devDependencies": {
39
+ "ansi": "^0.3.1",
40
+ "benchmark": "^2.1.4",
41
+ "browserify": "^16.2.2",
42
+ "codemirror": "^5.13.4",
43
+ "eslint": "^7.0.0",
44
+ "fast-check": "^1.24.2",
45
+ "istanbul": "^0.4.5",
46
+ "mocha": "^7.1.2",
47
+ "uglify-js": "^3.0.1"
48
+ },
49
+ "scripts": {
50
+ "test": "make test"
51
+ }
52
+ }
@@ -0,0 +1,127 @@
1
+ {
2
+ "name": "gray-matter",
3
+ "description": "Parse front-matter from a string or file. Fast, reliable and easy to use. Parses YAML front matter by default, but also has support for YAML, JSON, TOML or Coffee Front-Matter, with options to set custom delimiters. Used by metalsmith, assemble, verb and many other projects.",
4
+ "version": "4.0.3",
5
+ "homepage": "https://github.com/jonschlinkert/gray-matter",
6
+ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
7
+ "contributors": [
8
+ "Andrew Meyer (https://github.com/Ajedi32)",
9
+ "Brian Woodward (https://twitter.com/doowb)",
10
+ "Caesar Schinas (https://caesarschinas.com)",
11
+ "Ian Storm Taylor (http://ianstormtaylor.com)",
12
+ "Jon Schlinkert (http://twitter.com/jonschlinkert)",
13
+ "Osman Nuri Okumuş (http://onokumus.com)",
14
+ "Pawel Kadluczka (http://blog.3d-logic.com)",
15
+ "Rob Loach (http://robloach.net)",
16
+ "(https://github.com/heymind)",
17
+ "Zach Whaley (http://zachwhaleys.website)"
18
+ ],
19
+ "repository": "jonschlinkert/gray-matter",
20
+ "bugs": {
21
+ "url": "https://github.com/jonschlinkert/gray-matter/issues"
22
+ },
23
+ "license": "MIT",
24
+ "files": [
25
+ "gray-matter.d.ts",
26
+ "index.js",
27
+ "lib"
28
+ ],
29
+ "main": "index.js",
30
+ "engines": {
31
+ "node": ">=6.0"
32
+ },
33
+ "scripts": {
34
+ "test": "mocha"
35
+ },
36
+ "dependencies": {
37
+ "js-yaml": "^3.13.1",
38
+ "kind-of": "^6.0.2",
39
+ "section-matter": "^1.0.0",
40
+ "strip-bom-string": "^1.0.0"
41
+ },
42
+ "devDependencies": {
43
+ "ansi-green": "^0.1.1",
44
+ "benchmarked": "^2.0.0",
45
+ "coffeescript": "^2.2.3",
46
+ "delimiter-regex": "^2.0.0",
47
+ "extend-shallow": "^3.0.2",
48
+ "front-matter": "^2.3.0",
49
+ "gulp-format-md": "^1.0.0",
50
+ "minimist": "^1.2.0",
51
+ "mocha": "^6.1.4",
52
+ "toml": "^2.3.3",
53
+ "vinyl": "^2.1.0",
54
+ "write": "^1.0.3"
55
+ },
56
+ "keywords": [
57
+ "assemble",
58
+ "coffee",
59
+ "coffee-script",
60
+ "data",
61
+ "docs",
62
+ "documentation",
63
+ "extract",
64
+ "extracting",
65
+ "front",
66
+ "front-matter",
67
+ "frontmatter",
68
+ "generate",
69
+ "generator",
70
+ "gh-pages",
71
+ "gray",
72
+ "javascript",
73
+ "jekyll",
74
+ "js",
75
+ "JSON",
76
+ "markdown",
77
+ "matter",
78
+ "parse",
79
+ "parser",
80
+ "parsing",
81
+ "site",
82
+ "static",
83
+ "template",
84
+ "toml",
85
+ "yaml",
86
+ "yfm"
87
+ ],
88
+ "browser": {
89
+ "fs": false
90
+ },
91
+ "typings": "gray-matter.d.ts",
92
+ "eslintConfig": {
93
+ "rules": {
94
+ "no-console": 0
95
+ }
96
+ },
97
+ "verb": {
98
+ "toc": false,
99
+ "layout": "default",
100
+ "tasks": [
101
+ "readme"
102
+ ],
103
+ "plugins": [
104
+ "gulp-format-md"
105
+ ],
106
+ "helpers": {
107
+ "examples": "./examples/helper.js"
108
+ },
109
+ "lint": {
110
+ "reflinks": true
111
+ },
112
+ "related": {
113
+ "list": [
114
+ "assemble",
115
+ "metalsmith",
116
+ "verb"
117
+ ]
118
+ },
119
+ "reflinks": [
120
+ "coffe-script",
121
+ "generate",
122
+ "js-yaml",
123
+ "toml",
124
+ "update"
125
+ ]
126
+ }
127
+ }
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015, Jon Schlinkert.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,72 @@
1
+ # is-extendable [![NPM version](https://badge.fury.io/js/is-extendable.svg)](http://badge.fury.io/js/is-extendable)
2
+
3
+ > Returns true if a value is any of the object types: array, regexp, plain object, function or date. This is useful for determining if a value can be extended, e.g. "can the value have keys?"
4
+
5
+ ## Install
6
+
7
+ Install with [npm](https://www.npmjs.com/)
8
+
9
+ ```sh
10
+ $ npm i is-extendable --save
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```js
16
+ var isExtendable = require('is-extendable');
17
+ ```
18
+
19
+ Returns true if the value is any of the following:
20
+
21
+ * `array`
22
+ * `regexp`
23
+ * `plain object`
24
+ * `function`
25
+ * `date`
26
+ * `error`
27
+
28
+ ## Notes
29
+
30
+ All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and:
31
+
32
+ * the value is not a primitive, or
33
+ * that the object is an `object`, `function`
34
+
35
+ Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`.
36
+
37
+ ## Related projects
38
+
39
+ * [assign-deep](https://github.com/jonschlinkert/assign-deep): Deeply assign the enumerable properties of source objects to a destination object.
40
+ * [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util.
41
+ * [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null.
42
+ * [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor.
43
+ * [is-equal-shallow](https://github.com/jonschlinkert/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ.
44
+ * [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value.
45
+
46
+ ## Running tests
47
+
48
+ Install dev dependencies:
49
+
50
+ ```sh
51
+ $ npm i -d && npm test
52
+ ```
53
+
54
+ ## Contributing
55
+
56
+ Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-extendable/issues/new)
57
+
58
+ ## Author
59
+
60
+ **Jon Schlinkert**
61
+
62
+ + [github/jonschlinkert](https://github.com/jonschlinkert)
63
+ + [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
64
+
65
+ ## License
66
+
67
+ Copyright © 2015 Jon Schlinkert
68
+ Released under the MIT license.
69
+
70
+ ***
71
+
72
+ _This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 04, 2015._
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * is-extendable <https://github.com/jonschlinkert/is-extendable>
3
+ *
4
+ * Copyright (c) 2015, Jon Schlinkert.
5
+ * Licensed under the MIT License.
6
+ */
7
+
8
+ 'use strict';
9
+
10
+ module.exports = function isExtendable(val) {
11
+ return typeof val !== 'undefined' && val !== null
12
+ && (typeof val === 'object' || typeof val === 'function');
13
+ };
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "is-extendable",
3
+ "description": "Returns true if a value is any of the object types: array, regexp, plain object, function or date. This is useful for determining if a value can be extended, e.g. \"can the value have keys?\"",
4
+ "version": "0.1.1",
5
+ "homepage": "https://github.com/jonschlinkert/is-extendable",
6
+ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
7
+ "repository": "jonschlinkert/is-extendable",
8
+ "bugs": {
9
+ "url": "https://github.com/jonschlinkert/is-extendable/issues"
10
+ },
11
+ "license": "MIT",
12
+ "files": [
13
+ "index.js"
14
+ ],
15
+ "main": "index.js",
16
+ "engines": {
17
+ "node": ">=0.10.0"
18
+ },
19
+ "scripts": {
20
+ "test": "mocha"
21
+ },
22
+ "devDependencies": {
23
+ "mocha": "*"
24
+ },
25
+ "keywords": [
26
+ "array",
27
+ "assign",
28
+ "check",
29
+ "date",
30
+ "extend",
31
+ "extensible",
32
+ "function",
33
+ "is",
34
+ "object",
35
+ "regex",
36
+ "test"
37
+ ],
38
+ "verbiage": {
39
+ "related": {
40
+ "list": [
41
+ "isobject",
42
+ "is-plain-object",
43
+ "kind-of",
44
+ "is-extendable",
45
+ "is-equal-shallow",
46
+ "extend-shallow",
47
+ "assign-deep"
48
+ ]
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014-2017, Jon Schlinkert.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.