y0hami / o Goto Github PK
View Code? Open in Web Editor NEWcommon object helper functions
Home Page: https://o.hammy2899.dev
License: MIT License
common object helper functions
Home Page: https://o.hammy2899.dev
License: MIT License
Add support for array indexes in dot notation
const a = {
a: [
{
a: 'inside array',
},
],
};
get(a, 'a[0].a'); // => "inside array"
Add diff
function
Diff 2 objects
const a = {
a: 1,
b: 2,
c: 3
};
const b = {
a: 2,
c: 3,
d: 4
};
diff(a, b);
// {
// "removal": {
// "total": 1,
// "keys": [
// "b"
// ]
// },
// "addition": {
// "total": 1,
// "keys": [
// "d"
// ]
// },
// "changes": {
// "total": 1,
// "keys": [
// "a"
// ]
// },
// "original": {
// "a": 1,
// "b": 2,
// "c": 3
// },
// "changed": {
// "a": 2,
// "c": 3,
// "d": 4
// }
// }
Dependabot was set up to create pull requests against the branch develop
, but couldn't find it.
If the branch has been permanently deleted you can update Dependabot's target branch from your dashboard.
You can mention @dependabot in the comments below to contact the Dependabot team.
Add convert
function
Converts specified keys into something else
const a = {
testa: 1,
b: 2,
c: 3,
};
convert(a, 'testa', 'a'); // => { a: 1, b: 2, c: 3 }
const a = {
testa: 1,
testb: 2,
c: 3,
};
convert(a, [
'testa',
'testb',
], [
'a',
'b',
]); // => { a: 1, b: 2, c: 3 }
Add standard-version for a changelog
Two functions to check if two or more objects are exactly the same.
equal(object, ...compare)
deepEqual(object, ...compare)
(will check inner objects)Add "module": "src/index.js",
to package.json
for webpack, rollup etc support
Dependabot was set up to create pull requests against the branch develop
, but couldn't find it.
If the branch has been permanently deleted you can update Dependabot's target branch from your dashboard.
You can mention @dependabot in the comments below to contact the Dependabot team.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.