@lopatnov/join
The TypeScript library template.
Install
npm install @lopatnov/join
Browser
<script src="https://lopatnov.github.io/join/dist/join.min.js"></script>
Import package to the project
TypeScript
import { join, JoinTypes } from "@lopatnov/join";
JavaScript
var library = require("@lopatnov/join");
var join = library.join;
var JoinTypes = library.JoinTypes;
How to use
As three separate operations
const rightJoin = join(JoinTypes.right);
const joinObject = rightJoin({
sample1: "One",
sample2: "Two",
sample3: "Three",
});
const m = joinObject({
sample2: "Dos",
sample3: "Tres",
sample4: "Quatro",
});
As a function
const c = join(JoinTypes.innerJoin)({
sample1: "One",
sample2: "Two",
sample3: {
smile: "cheese",
},
})({
sample2: "Dos",
sample3: {
sorrir: "queijo",
},
sample4: "Quatro",
});
Demo
See, how it's working: https://runkit.com/lopatnov/join
Test it with a runkit: https://npm.runkit.com/@lopatnov/join
Rights and Agreements
License Apache-2.0
Copyright 2020 Oleksandr Lopatnov