@flock/kotlin-ts
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -1,2 +0,2 @@ | ||
import { Sequence } from "./Sequence"; | ||
import { Sequence } from "./Sequence.js"; | ||
declare global { | ||
@@ -3,0 +3,0 @@ /** @tsplus type Iterable */ |
@@ -6,4 +6,4 @@ "use strict"; | ||
// From: https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/common/src/generated/_Collections.kt | ||
const utils_1 = require("../utils"); | ||
const Exceptions_1 = require("../Exceptions"); | ||
const utils_js_1 = require("../utils.js"); | ||
const Exceptions_js_1 = require("../Exceptions.js"); | ||
exports.Iterable = {}; | ||
@@ -238,3 +238,3 @@ function createIterable(iteratorFactory) { | ||
*/ | ||
const elementAt = (self, index) => find(zip(self, exports.naturals), ([, i]) => i === index)?.[0] ?? (0, utils_1.throws)(new Exceptions_1.IndexOutOfBoundsException()); | ||
const elementAt = (self, index) => find(zip(self, exports.naturals), ([, i]) => i === index)?.[0] ?? (0, utils_js_1.throws)(new Exceptions_js_1.IndexOutOfBoundsException()); | ||
exports.elementAt = elementAt; | ||
@@ -241,0 +241,0 @@ /** |
@@ -8,3 +8,3 @@ "use strict"; | ||
const tsplus_module_5 = require("./Number"); | ||
const Iterable_1 = require("./Iterable"); | ||
const Iterable_js_1 = require("./Iterable.js"); | ||
describe("Iterable", () => { | ||
@@ -161,3 +161,3 @@ const empty = new Set(); | ||
test("zip", () => { | ||
expect(tsplus_module_1.toArray(tsplus_module_1.zip(iterable, Iterable_1.naturals))).toMatchInlineSnapshot(` | ||
expect(tsplus_module_1.toArray(tsplus_module_1.zip(iterable, Iterable_js_1.naturals))).toMatchInlineSnapshot(` | ||
[ | ||
@@ -164,0 +164,0 @@ ["a", 0], |
@@ -1,2 +0,2 @@ | ||
import * as tsplus_module_1 from "./Array"; | ||
import * as tsplus_module_1 from "./Array.js"; | ||
describe("Array", () => { | ||
@@ -3,0 +3,0 @@ const numbers = [1, 2, 3]; |
@@ -1,2 +0,2 @@ | ||
import { Sequence } from "./Sequence"; | ||
import { Sequence } from "./Sequence.js"; | ||
declare global { | ||
@@ -3,0 +3,0 @@ /** @tsplus type Iterable */ |
@@ -1,5 +0,5 @@ | ||
import * as tsplus_module_1 from "./Sequence"; | ||
import * as tsplus_module_1 from "./Sequence.js"; | ||
// From: https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/common/src/generated/_Collections.kt | ||
import { throws } from "../utils"; | ||
import { IndexOutOfBoundsException } from "../Exceptions"; | ||
import { throws } from "../utils.js"; | ||
import { IndexOutOfBoundsException } from "../Exceptions.js"; | ||
export const Iterable = {}; | ||
@@ -6,0 +6,0 @@ export function createIterable(iteratorFactory) { |
@@ -1,7 +0,7 @@ | ||
import * as tsplus_module_1 from "./Iterable"; | ||
import * as tsplus_module_2 from "../util/Standard"; | ||
import * as tsplus_module_3 from "./Map"; | ||
import * as tsplus_module_4 from "./Array"; | ||
import * as tsplus_module_5 from "./Number"; | ||
import { naturals } from "./Iterable"; | ||
import * as tsplus_module_1 from "./Iterable.js"; | ||
import * as tsplus_module_2 from "../util/Standard.js"; | ||
import * as tsplus_module_3 from "./Map.js"; | ||
import * as tsplus_module_4 from "./Array.js"; | ||
import * as tsplus_module_5 from "./Number.js"; | ||
import { naturals } from "./Iterable.js"; | ||
describe("Iterable", () => { | ||
@@ -8,0 +8,0 @@ const empty = new Set(); |
@@ -1,2 +0,2 @@ | ||
import * as tsplus_module_1 from "./Iterable"; | ||
import * as tsplus_module_1 from "./Iterable.js"; | ||
/** | ||
@@ -3,0 +3,0 @@ * @tsplus fluent Map asString |
@@ -1,2 +0,2 @@ | ||
import * as tsplus_module_1 from "./Iterable"; | ||
import * as tsplus_module_1 from "./Iterable.js"; | ||
/** | ||
@@ -3,0 +3,0 @@ * Creates a range from this value to the specified [other] value. |
@@ -1,2 +0,2 @@ | ||
import * as tsplus_module_1 from "./Iterable"; | ||
import * as tsplus_module_1 from "./Iterable.js"; | ||
export const Sequence = {}; | ||
@@ -3,0 +3,0 @@ /** |
@@ -1,5 +0,5 @@ | ||
export { Iterable } from "./collection/Iterable"; | ||
export * from "./collection/Iterator"; | ||
export { Sequence } from "./collection/Sequence"; | ||
export * from "./collection/Map"; | ||
export * from "./collection/Number"; | ||
export { Iterable } from "./collection/Iterable.js"; | ||
export * from "./collection/Iterator.js"; | ||
export { Sequence } from "./collection/Sequence.js"; | ||
export * from "./collection/Map.js"; | ||
export * from "./collection/Number.js"; |
@@ -1,6 +0,6 @@ | ||
export { Iterable } from "./collection/Iterable"; | ||
export * from "./collection/Iterator"; | ||
export { Sequence } from "./collection/Sequence"; | ||
export * from "./collection/Map"; | ||
export * from "./collection/Number"; | ||
export { Iterable } from "./collection/Iterable.js"; | ||
export * from "./collection/Iterator.js"; | ||
export { Sequence } from "./collection/Sequence.js"; | ||
export * from "./collection/Map.js"; | ||
export * from "./collection/Number.js"; | ||
//# sourceMappingURL=index.js.map |
// From https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/src/kotlin/util/Standard.kt | ||
import { throws } from "../utils"; | ||
import { NotImplementedError } from "../Exceptions"; | ||
import { throws } from "../utils.js"; | ||
import { NotImplementedError } from "../Exceptions.js"; | ||
/** | ||
@@ -5,0 +5,0 @@ * Calls the specified function [block] with `this` value as its argument and returns `this` value. |
@@ -1,3 +0,3 @@ | ||
import * as tsplus_module_1 from "./Standard"; | ||
import * as tsplus_module_2 from "../collection/Array"; | ||
import * as tsplus_module_1 from "./Standard.js"; | ||
import * as tsplus_module_2 from "../collection/Array.js"; | ||
describe("Object", () => { | ||
@@ -4,0 +4,0 @@ test("let", () => { |
@@ -1,2 +0,2 @@ | ||
import { AssertionError } from "./Exceptions"; | ||
import { AssertionError } from "./Exceptions.js"; | ||
export function assertNever(_) { | ||
@@ -3,0 +3,0 @@ throw new AssertionError("This point should never be reached."); |
@@ -1,5 +0,5 @@ | ||
export { Iterable } from "./collection/Iterable"; | ||
export * from "./collection/Iterator"; | ||
export { Sequence } from "./collection/Sequence"; | ||
export * from "./collection/Map"; | ||
export * from "./collection/Number"; | ||
export { Iterable } from "./collection/Iterable.js"; | ||
export * from "./collection/Iterator.js"; | ||
export { Sequence } from "./collection/Sequence.js"; | ||
export * from "./collection/Map.js"; | ||
export * from "./collection/Number.js"; |
14
index.js
@@ -18,9 +18,9 @@ "use strict"; | ||
exports.Sequence = exports.Iterable = void 0; | ||
var Iterable_1 = require("./collection/Iterable"); | ||
Object.defineProperty(exports, "Iterable", { enumerable: true, get: function () { return Iterable_1.Iterable; } }); | ||
__exportStar(require("./collection/Iterator"), exports); | ||
var Sequence_1 = require("./collection/Sequence"); | ||
Object.defineProperty(exports, "Sequence", { enumerable: true, get: function () { return Sequence_1.Sequence; } }); | ||
__exportStar(require("./collection/Map"), exports); | ||
__exportStar(require("./collection/Number"), exports); | ||
var Iterable_js_1 = require("./collection/Iterable.js"); | ||
Object.defineProperty(exports, "Iterable", { enumerable: true, get: function () { return Iterable_js_1.Iterable; } }); | ||
__exportStar(require("./collection/Iterator.js"), exports); | ||
var Sequence_js_1 = require("./collection/Sequence.js"); | ||
Object.defineProperty(exports, "Sequence", { enumerable: true, get: function () { return Sequence_js_1.Sequence; } }); | ||
__exportStar(require("./collection/Map.js"), exports); | ||
__exportStar(require("./collection/Number.js"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@flock/kotlin-ts", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"author": "Kasper Peulen", | ||
@@ -27,3 +27,5 @@ "license": "MIT", | ||
"build:cjs": "tsc -b tsconfig.cjs.json", | ||
"build:esm": "tsc -b tsconfig.json", | ||
"build:esm": "tsc -b tsconfig.esm.json", | ||
"build-cjs": "babel build/esm --config-file ./.babel.cjs.json --out-dir build/cjs --out-file-extension .js --source-maps", | ||
"build-mjs": "babel build/esm --config-file ./.babel.mjs.json --out-dir build/mjs --out-file-extension .mjs --source-maps", | ||
"build:clean": "rimraf build", | ||
@@ -30,0 +32,0 @@ "postinstall": "tsplus-install", |
@@ -5,4 +5,4 @@ "use strict"; | ||
// From https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/src/kotlin/util/Standard.kt | ||
const utils_1 = require("../utils"); | ||
const Exceptions_1 = require("../Exceptions"); | ||
const utils_js_1 = require("../utils.js"); | ||
const Exceptions_js_1 = require("../Exceptions.js"); | ||
/** | ||
@@ -50,4 +50,4 @@ * Calls the specified function [block] with `this` value as its argument and returns `this` value. | ||
*/ | ||
const TODO = (reason) => (0, utils_1.throws)(new Exceptions_1.NotImplementedError(reason == null ? undefined : `"An operation is not implemented: ${reason}`)); | ||
const TODO = (reason) => (0, utils_js_1.throws)(new Exceptions_js_1.NotImplementedError(reason == null ? undefined : `"An operation is not implemented: ${reason}`)); | ||
exports.TODO = TODO; | ||
//# sourceMappingURL=Standard.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.up = exports.throws = exports.assert = exports.assertNever = void 0; | ||
const Exceptions_1 = require("./Exceptions"); | ||
const Exceptions_js_1 = require("./Exceptions.js"); | ||
function assertNever(_) { | ||
throw new Exceptions_1.AssertionError("This point should never be reached."); | ||
throw new Exceptions_js_1.AssertionError("This point should never be reached."); | ||
} | ||
@@ -11,3 +11,3 @@ exports.assertNever = assertNever; | ||
if (!condition) | ||
throw typeof message === "string" ? new Exceptions_1.AssertionError(message) : message; | ||
throw typeof message === "string" ? new Exceptions_js_1.AssertionError(message) : message; | ||
} | ||
@@ -14,0 +14,0 @@ exports.assert = assert; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
167397
0