@symbo.ls/button 0.4.2 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -2
- package/packages/react/index.js +7 -0
- package/packages/react/node_modules/.yarn-integrity +91 -0
- package/packages/react/node_modules/@domql/cache/LICENSE +21 -0
- package/packages/react/node_modules/@domql/cache/index.js +0 -0
- package/packages/react/node_modules/@domql/cache/package.json +10 -0
- package/packages/react/node_modules/@domql/cookie/LICENSE +21 -0
- package/packages/react/node_modules/@domql/cookie/index.js +22 -0
- package/packages/react/node_modules/@domql/cookie/package.json +10 -0
- package/packages/react/node_modules/@domql/define/LICENSE +21 -0
- package/packages/react/node_modules/@domql/define/index.js +13 -0
- package/packages/react/node_modules/@domql/define/package.json +11 -0
- package/packages/react/node_modules/@domql/domql/LICENSE +21 -0
- package/packages/react/node_modules/@domql/domql/package.json +33 -0
- package/packages/react/node_modules/@domql/domql/src/all_exports.js +17 -0
- package/packages/react/node_modules/@domql/domql/src/index.js +15 -0
- package/packages/react/node_modules/@domql/element/LICENSE +21 -0
- package/packages/react/node_modules/@domql/element/package.json +20 -0
- package/packages/react/node_modules/@domql/element/src/assign.js +22 -0
- package/packages/react/node_modules/@domql/element/src/create.js +125 -0
- package/packages/react/node_modules/@domql/element/src/index.js +8 -0
- package/packages/react/node_modules/@domql/element/src/iterate.js +80 -0
- package/packages/react/node_modules/@domql/element/src/methods.js +96 -0
- package/packages/react/node_modules/@domql/element/src/set.js +44 -0
- package/packages/react/node_modules/@domql/element/src/update.js +98 -0
- package/packages/react/node_modules/@domql/event/LICENSE +21 -0
- package/packages/react/node_modules/@domql/event/package.json +14 -0
- package/packages/react/node_modules/@domql/event/src/can.js +10 -0
- package/packages/react/node_modules/@domql/event/src/index.js +11 -0
- package/packages/react/node_modules/@domql/event/src/is.js +13 -0
- package/packages/react/node_modules/@domql/event/src/on.js +33 -0
- package/packages/react/node_modules/@domql/event/src/store.js +6 -0
- package/packages/react/node_modules/@domql/event/src/wrappers.js +14 -0
- package/packages/react/node_modules/@domql/event/yarn-error.log +44 -0
- package/packages/react/node_modules/@domql/id/LICENSE +21 -0
- package/packages/react/node_modules/@domql/id/index.js +12 -0
- package/packages/react/node_modules/@domql/id/package.json +10 -0
- package/packages/react/node_modules/@domql/mixins/LICENSE +21 -0
- package/packages/react/node_modules/@domql/mixins/package.json +12 -0
- package/packages/react/node_modules/@domql/mixins/src/attr.js +19 -0
- package/packages/react/node_modules/@domql/mixins/src/classList.js +37 -0
- package/packages/react/node_modules/@domql/mixins/src/content.js +17 -0
- package/packages/react/node_modules/@domql/mixins/src/data.js +21 -0
- package/packages/react/node_modules/@domql/mixins/src/html.js +17 -0
- package/packages/react/node_modules/@domql/mixins/src/index.js +11 -0
- package/packages/react/node_modules/@domql/mixins/src/registry.js +55 -0
- package/packages/react/node_modules/@domql/mixins/src/state.js +16 -0
- package/packages/react/node_modules/@domql/mixins/src/style.js +14 -0
- package/packages/react/node_modules/@domql/mixins/src/text.js +19 -0
- package/packages/react/node_modules/@domql/node/LICENSE +21 -0
- package/packages/react/node_modules/@domql/node/package.json +17 -0
- package/packages/react/node_modules/@domql/node/src/cache.js +52 -0
- package/packages/react/node_modules/@domql/node/src/create.js +86 -0
- package/packages/react/node_modules/@domql/node/src/index.js +5 -0
- package/packages/react/node_modules/@domql/node/src/registry.js +139 -0
- package/packages/react/node_modules/@domql/parse/LICENSE +21 -0
- package/packages/react/node_modules/@domql/parse/index.js +16 -0
- package/packages/react/node_modules/@domql/parse/package.json +10 -0
- package/packages/react/node_modules/@domql/props/LICENSE +21 -0
- package/packages/react/node_modules/@domql/props/package.json +10 -0
- package/packages/react/node_modules/@domql/props/src/index.js +62 -0
- package/packages/react/node_modules/@domql/proto/LICENSE +21 -0
- package/packages/react/node_modules/@domql/proto/index.js +66 -0
- package/packages/react/node_modules/@domql/proto/package.json +10 -0
- package/packages/react/node_modules/@domql/react-transformer/LICENSE +21 -0
- package/packages/react/node_modules/@domql/react-transformer/index.js +26 -0
- package/packages/react/node_modules/@domql/react-transformer/package.json +12 -0
- package/packages/react/node_modules/@domql/react-transformer/yarn-error.log +41 -0
- package/packages/react/node_modules/@domql/report/LICENSE +21 -0
- package/packages/react/node_modules/@domql/report/index.js +62 -0
- package/packages/react/node_modules/@domql/report/package.json +7 -0
- package/packages/react/node_modules/@domql/state/LICENSE +21 -0
- package/packages/react/node_modules/@domql/state/package.json +11 -0
- package/packages/react/node_modules/@domql/state/src/index.js +51 -0
- package/packages/react/node_modules/@domql/tree/LICENSE +21 -0
- package/packages/react/node_modules/@domql/tree/index.js +6 -0
- package/packages/react/node_modules/@domql/tree/package.json +10 -0
- package/packages/react/node_modules/@domql/tree/root.js +8 -0
- package/packages/react/node_modules/@domql/utils/LICENSE +21 -0
- package/packages/react/node_modules/@domql/utils/package.json +13 -0
- package/packages/react/node_modules/@domql/utils/src/index.js +5 -0
- package/packages/react/node_modules/@domql/utils/src/node.js +10 -0
- package/packages/react/node_modules/@domql/utils/src/object.js +193 -0
- package/packages/react/node_modules/@domql/utils/src/protoUtils.js +119 -0
- package/packages/react/node_modules/js-tokens/CHANGELOG.md +151 -0
- package/packages/react/node_modules/js-tokens/LICENSE +21 -0
- package/packages/react/node_modules/js-tokens/README.md +240 -0
- package/packages/react/node_modules/js-tokens/index.js +23 -0
- package/packages/react/node_modules/js-tokens/package.json +30 -0
- package/packages/react/node_modules/loose-envify/LICENSE +21 -0
- package/packages/react/node_modules/loose-envify/README.md +45 -0
- package/packages/react/node_modules/loose-envify/cli.js +16 -0
- package/packages/react/node_modules/loose-envify/custom.js +4 -0
- package/packages/react/node_modules/loose-envify/index.js +3 -0
- package/packages/react/node_modules/loose-envify/loose-envify.js +36 -0
- package/packages/react/node_modules/loose-envify/package.json +36 -0
- package/packages/react/node_modules/loose-envify/replace.js +65 -0
- package/packages/react/node_modules/object-assign/index.js +90 -0
- package/packages/react/node_modules/object-assign/license +21 -0
- package/packages/react/node_modules/object-assign/package.json +42 -0
- package/packages/react/node_modules/object-assign/readme.md +61 -0
- package/packages/react/node_modules/react/LICENSE +21 -0
- package/packages/react/node_modules/react/README.md +13 -0
- package/packages/react/node_modules/react/build-info.json +8 -0
- package/packages/react/node_modules/react/cjs/react-jsx-dev-runtime.development.js +1203 -0
- package/packages/react/node_modules/react/cjs/react-jsx-dev-runtime.production.min.js +9 -0
- package/packages/react/node_modules/react/cjs/react-jsx-dev-runtime.profiling.min.js +9 -0
- package/packages/react/node_modules/react/cjs/react-jsx-runtime.development.js +1221 -0
- package/packages/react/node_modules/react/cjs/react-jsx-runtime.production.min.js +10 -0
- package/packages/react/node_modules/react/cjs/react-jsx-runtime.profiling.min.js +10 -0
- package/packages/react/node_modules/react/cjs/react.development.js +2333 -0
- package/packages/react/node_modules/react/cjs/react.production.min.js +23 -0
- package/packages/react/node_modules/react/index.js +7 -0
- package/packages/react/node_modules/react/jsx-dev-runtime.js +7 -0
- package/packages/react/node_modules/react/jsx-runtime.js +7 -0
- package/packages/react/node_modules/react/package.json +39 -0
- package/packages/react/node_modules/react/umd/react.development.js +3357 -0
- package/packages/react/node_modules/react/umd/react.production.min.js +31 -0
- package/packages/react/node_modules/react/umd/react.profiling.min.js +36 -0
- package/packages/react/node_modules/regenerator-runtime/LICENSE +21 -0
- package/packages/react/node_modules/regenerator-runtime/README.md +31 -0
- package/packages/react/node_modules/regenerator-runtime/package.json +19 -0
- package/packages/react/node_modules/regenerator-runtime/path.js +11 -0
- package/packages/react/node_modules/regenerator-runtime/runtime.js +754 -0
- package/packages/react/package.json +6 -2
- package/packages/react/yarn.lock +183 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var stream = require('stream');
|
|
4
|
+
var util = require('util');
|
|
5
|
+
var replace = require('./replace');
|
|
6
|
+
|
|
7
|
+
var jsonExtRe = /\.json$/;
|
|
8
|
+
|
|
9
|
+
module.exports = function(rootEnv) {
|
|
10
|
+
rootEnv = rootEnv || process.env;
|
|
11
|
+
return function (file, trOpts) {
|
|
12
|
+
if (jsonExtRe.test(file)) {
|
|
13
|
+
return stream.PassThrough();
|
|
14
|
+
}
|
|
15
|
+
var envs = trOpts ? [rootEnv, trOpts] : [rootEnv];
|
|
16
|
+
return new LooseEnvify(envs);
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
function LooseEnvify(envs) {
|
|
21
|
+
stream.Transform.call(this);
|
|
22
|
+
this._data = '';
|
|
23
|
+
this._envs = envs;
|
|
24
|
+
}
|
|
25
|
+
util.inherits(LooseEnvify, stream.Transform);
|
|
26
|
+
|
|
27
|
+
LooseEnvify.prototype._transform = function(buf, enc, cb) {
|
|
28
|
+
this._data += buf;
|
|
29
|
+
cb();
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
LooseEnvify.prototype._flush = function(cb) {
|
|
33
|
+
var replaced = replace(this._data, this._envs);
|
|
34
|
+
this.push(replaced);
|
|
35
|
+
cb();
|
|
36
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "loose-envify",
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"description": "Fast (and loose) selective `process.env` replacer using js-tokens instead of an AST",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"environment",
|
|
7
|
+
"variables",
|
|
8
|
+
"browserify",
|
|
9
|
+
"browserify-transform",
|
|
10
|
+
"transform",
|
|
11
|
+
"source",
|
|
12
|
+
"configuration"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/zertosh/loose-envify",
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"author": "Andres Suarez <zertosh@gmail.com>",
|
|
17
|
+
"main": "index.js",
|
|
18
|
+
"bin": {
|
|
19
|
+
"loose-envify": "cli.js"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git://github.com/zertosh/loose-envify.git"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"test": "tap test/*.js"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"js-tokens": "^3.0.0 || ^4.0.0"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"browserify": "^13.1.1",
|
|
33
|
+
"envify": "^3.4.0",
|
|
34
|
+
"tap": "^8.0.0"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsTokens = require('js-tokens').default;
|
|
4
|
+
|
|
5
|
+
var processEnvRe = /\bprocess\.env\.[_$a-zA-Z][$\w]+\b/;
|
|
6
|
+
var spaceOrCommentRe = /^(?:\s|\/[/*])/;
|
|
7
|
+
|
|
8
|
+
function replace(src, envs) {
|
|
9
|
+
if (!processEnvRe.test(src)) {
|
|
10
|
+
return src;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
var out = [];
|
|
14
|
+
var purge = envs.some(function(env) {
|
|
15
|
+
return env._ && env._.indexOf('purge') !== -1;
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
jsTokens.lastIndex = 0
|
|
19
|
+
var parts = src.match(jsTokens);
|
|
20
|
+
|
|
21
|
+
for (var i = 0; i < parts.length; i++) {
|
|
22
|
+
if (parts[i ] === 'process' &&
|
|
23
|
+
parts[i + 1] === '.' &&
|
|
24
|
+
parts[i + 2] === 'env' &&
|
|
25
|
+
parts[i + 3] === '.') {
|
|
26
|
+
var prevCodeToken = getAdjacentCodeToken(-1, parts, i);
|
|
27
|
+
var nextCodeToken = getAdjacentCodeToken(1, parts, i + 4);
|
|
28
|
+
var replacement = getReplacementString(envs, parts[i + 4], purge);
|
|
29
|
+
if (prevCodeToken !== '.' &&
|
|
30
|
+
nextCodeToken !== '.' &&
|
|
31
|
+
nextCodeToken !== '=' &&
|
|
32
|
+
typeof replacement === 'string') {
|
|
33
|
+
out.push(replacement);
|
|
34
|
+
i += 4;
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
out.push(parts[i]);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return out.join('');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function getAdjacentCodeToken(dir, parts, i) {
|
|
45
|
+
while (true) {
|
|
46
|
+
var part = parts[i += dir];
|
|
47
|
+
if (!spaceOrCommentRe.test(part)) {
|
|
48
|
+
return part;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function getReplacementString(envs, name, purge) {
|
|
54
|
+
for (var j = 0; j < envs.length; j++) {
|
|
55
|
+
var env = envs[j];
|
|
56
|
+
if (typeof env[name] !== 'undefined') {
|
|
57
|
+
return JSON.stringify(env[name]);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (purge) {
|
|
61
|
+
return 'undefined';
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
module.exports = replace;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/*
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use strict';
|
|
8
|
+
/* eslint-disable no-unused-vars */
|
|
9
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
10
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
11
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
|
|
13
|
+
function toObject(val) {
|
|
14
|
+
if (val === null || val === undefined) {
|
|
15
|
+
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return Object(val);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function shouldUseNative() {
|
|
22
|
+
try {
|
|
23
|
+
if (!Object.assign) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Detect buggy property enumeration order in older V8 versions.
|
|
28
|
+
|
|
29
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
30
|
+
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
31
|
+
test1[5] = 'de';
|
|
32
|
+
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
37
|
+
var test2 = {};
|
|
38
|
+
for (var i = 0; i < 10; i++) {
|
|
39
|
+
test2['_' + String.fromCharCode(i)] = i;
|
|
40
|
+
}
|
|
41
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
42
|
+
return test2[n];
|
|
43
|
+
});
|
|
44
|
+
if (order2.join('') !== '0123456789') {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
49
|
+
var test3 = {};
|
|
50
|
+
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
51
|
+
test3[letter] = letter;
|
|
52
|
+
});
|
|
53
|
+
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
54
|
+
'abcdefghijklmnopqrst') {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return true;
|
|
59
|
+
} catch (err) {
|
|
60
|
+
// We don't expect any of the above to throw, but better to be safe.
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
66
|
+
var from;
|
|
67
|
+
var to = toObject(target);
|
|
68
|
+
var symbols;
|
|
69
|
+
|
|
70
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
71
|
+
from = Object(arguments[s]);
|
|
72
|
+
|
|
73
|
+
for (var key in from) {
|
|
74
|
+
if (hasOwnProperty.call(from, key)) {
|
|
75
|
+
to[key] = from[key];
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (getOwnPropertySymbols) {
|
|
80
|
+
symbols = getOwnPropertySymbols(from);
|
|
81
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
82
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
83
|
+
to[symbols[i]] = from[symbols[i]];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return to;
|
|
90
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
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,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "object-assign",
|
|
3
|
+
"version": "4.1.1",
|
|
4
|
+
"description": "ES2015 `Object.assign()` ponyfill",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "sindresorhus/object-assign",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Sindre Sorhus",
|
|
9
|
+
"email": "sindresorhus@gmail.com",
|
|
10
|
+
"url": "sindresorhus.com"
|
|
11
|
+
},
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=0.10.0"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "xo && ava",
|
|
17
|
+
"bench": "matcha bench.js"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"index.js"
|
|
21
|
+
],
|
|
22
|
+
"keywords": [
|
|
23
|
+
"object",
|
|
24
|
+
"assign",
|
|
25
|
+
"extend",
|
|
26
|
+
"properties",
|
|
27
|
+
"es2015",
|
|
28
|
+
"ecmascript",
|
|
29
|
+
"harmony",
|
|
30
|
+
"ponyfill",
|
|
31
|
+
"prollyfill",
|
|
32
|
+
"polyfill",
|
|
33
|
+
"shim",
|
|
34
|
+
"browser"
|
|
35
|
+
],
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"ava": "^0.16.0",
|
|
38
|
+
"lodash": "^4.16.4",
|
|
39
|
+
"matcha": "^0.7.0",
|
|
40
|
+
"xo": "^0.16.0"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# object-assign [](https://travis-ci.org/sindresorhus/object-assign)
|
|
2
|
+
|
|
3
|
+
> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Use the built-in
|
|
7
|
+
|
|
8
|
+
Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari),
|
|
9
|
+
support `Object.assign()` :tada:. If you target only those environments, then by all
|
|
10
|
+
means, use `Object.assign()` instead of this package.
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
$ npm install --save object-assign
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```js
|
|
23
|
+
const objectAssign = require('object-assign');
|
|
24
|
+
|
|
25
|
+
objectAssign({foo: 0}, {bar: 1});
|
|
26
|
+
//=> {foo: 0, bar: 1}
|
|
27
|
+
|
|
28
|
+
// multiple sources
|
|
29
|
+
objectAssign({foo: 0}, {bar: 1}, {baz: 2});
|
|
30
|
+
//=> {foo: 0, bar: 1, baz: 2}
|
|
31
|
+
|
|
32
|
+
// overwrites equal keys
|
|
33
|
+
objectAssign({foo: 0}, {foo: 1}, {foo: 2});
|
|
34
|
+
//=> {foo: 2}
|
|
35
|
+
|
|
36
|
+
// ignores null and undefined sources
|
|
37
|
+
objectAssign({foo: 0}, null, {bar: 1}, undefined);
|
|
38
|
+
//=> {foo: 0, bar: 1}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## API
|
|
43
|
+
|
|
44
|
+
### objectAssign(target, [source, ...])
|
|
45
|
+
|
|
46
|
+
Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## Resources
|
|
50
|
+
|
|
51
|
+
- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## Related
|
|
55
|
+
|
|
56
|
+
- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()`
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
## License
|
|
60
|
+
|
|
61
|
+
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Facebook, Inc. and its affiliates.
|
|
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 all
|
|
13
|
+
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 THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# `react`
|
|
2
|
+
|
|
3
|
+
React is a JavaScript library for creating user interfaces.
|
|
4
|
+
|
|
5
|
+
The `react` package contains only the functionality necessary to define React components. It is typically used together with a React renderer like `react-dom` for the web, or `react-native` for the native environments.
|
|
6
|
+
|
|
7
|
+
**Note:** by default, React will be in development mode. The development version includes extra warnings about common mistakes, whereas the production version includes extra performance optimizations and strips all error messages. Don't forget to use the [production build](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build) when deploying your application.
|
|
8
|
+
|
|
9
|
+
## Example Usage
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
var React = require('react');
|
|
13
|
+
```
|