Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ephox/polaris

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ephox/polaris - npm Package Compare versions

Comparing version 3.0.37 to 3.0.39

2

lib/main/ts/ephox/polaris/api/Arrays.d.ts

@@ -8,5 +8,5 @@ import { Splitting } from './Splitting';

declare const splitbyAdv: SplitByAdvApi;
declare type SliceByApi = <T>(list: T[], pred: (x: T, i: number, xs: ArrayLike<T>) => boolean) => T[];
declare type SliceByApi = <T>(list: T[], pred: (x: T, i: number) => boolean) => T[];
declare const sliceby: SliceByApi;
export { splitby, splitbyAdv, sliceby, boundAt };
//# sourceMappingURL=Arrays.d.ts.map

@@ -13,7 +13,7 @@ declare type SplittingHandler<T, U> = (item: T) => U;

include: <T>(item: T) => Splitting<T>;
excludeWith: <T>(item: T) => Splitting<T>;
excludeWithout: <T>(item: T) => Splitting<T>;
cata: <T, U>(subject: Splitting<T>, onInclude: SplittingHandler<T, U>, onExcludeWith: SplittingHandler<T, U>, onExcludeWithout: SplittingHandler<T, U>) => U;
excludeWith: <T_1>(item: T_1) => Splitting<T_1>;
excludeWithout: <T_2>(item: T_2) => Splitting<T_2>;
cata: <T_3, U>(subject: Splitting<T_3>, onInclude: SplittingHandler<T_3, U>, onExcludeWith: SplittingHandler<T_3, U>, onExcludeWithout: SplittingHandler<T_3, U>) => U;
};
export {};
//# sourceMappingURL=Splitting.d.ts.map
/**
* Slice an array at the first item matched by the predicate
*/
declare const sliceby: <T>(list: T[], pred: (x: T, i: number, xs: ArrayLike<T>) => boolean) => T[];
declare const sliceby: <T>(list: T[], pred: (x: T, i: number) => boolean) => T[];
export { sliceby };
//# sourceMappingURL=Slice.d.ts.map

@@ -1,2 +0,2 @@

import * as tslib_1 from "tslib";
import { __assign } from "tslib";
import { Arr, Fun } from '@ephox/katamari';

@@ -6,3 +6,3 @@ /** Adjust a PositionArray positions by an offset */

return Arr.map(parray, function (unit) {
return tslib_1.__assign({}, unit, { start: Fun.constant(unit.start() + offset), finish: Fun.constant(unit.finish() + offset) });
return __assign(__assign({}, unit), { start: Fun.constant(unit.start() + offset), finish: Fun.constant(unit.finish() + offset) });
});

@@ -9,0 +9,0 @@ };

@@ -1,2 +0,2 @@

import * as tslib_1 from "tslib";
import { __assign } from "tslib";
import { Arr } from '@ephox/katamari';

@@ -28,3 +28,3 @@ import * as Find from './Find';

return Arr.map(results, function (r) {
return tslib_1.__assign({}, t, r);
return __assign(__assign({}, t), r);
});

@@ -31,0 +31,0 @@ });

@@ -1,2 +0,2 @@

import * as tslib_1 from "tslib";
import { __assign } from "tslib";
import { classify } from './StringMapper';

@@ -62,3 +62,3 @@ import * as UnicodeData from './UnicodeData';

var getWords = function (chars, extract, options) {
options = tslib_1.__assign({}, getDefaultOptions(), options);
options = __assign(__assign({}, getDefaultOptions()), options);
var filteredChars = [];

@@ -65,0 +65,0 @@ var extractedChars = [];

{
"name": "@ephox/polaris",
"description": "This project does data manipulation on arrays and strings.",
"version": "3.0.37",
"version": "3.0.39",
"repository": {

@@ -22,3 +22,3 @@ "type": "git",

"@ephox/dom-globals": "^1.1.2",
"@ephox/katamari": "^3.0.1",
"@ephox/katamari": "^4.0.1",
"tslib": "^1.9.3"

@@ -36,3 +36,3 @@ },

"types": "./lib/main/ts/ephox/polaris/api/Main.d.ts",
"gitHead": "7a3393372149aad81da6a14f0178e7b6e03d7460"
"gitHead": "ae1155c29c6fca69088768c4e85c507b7f062ec5"
}

@@ -15,3 +15,3 @@ import * as Boundaries from '../array/Boundaries';

type SliceByApi = <T>(list: T[], pred: (x: T, i: number, xs: ArrayLike<T>) => boolean) => T[];
type SliceByApi = <T>(list: T[], pred: (x: T, i: number) => boolean) => T[];
const sliceby: SliceByApi = Slice.sliceby;

@@ -18,0 +18,0 @@

@@ -6,3 +6,3 @@ import { Arr } from '@ephox/katamari';

*/
const sliceby = function <T> (list: T[], pred: (x: T, i: number, xs: ArrayLike<T>) => boolean) {
const sliceby = function <T> (list: T[], pred: (x: T, i: number) => boolean) {
const index = Arr.findIndex(list, pred).getOr(-1);

@@ -14,2 +14,2 @@ return list.slice(0, index);

sliceby
};
};

@@ -5,3 +5,3 @@ import { assert, UnitTest } from '@ephox/bedrock';

UnitTest.test('api.Arrays.sliceby', function () {
const check = function (expected: number[], input: number[], pred: (x: number, i: number, xs: ArrayLike<number>) => boolean) {
const check = function (expected: number[], input: number[], pred: (x: number, i: number) => boolean) {
const actual = Arrays.sliceby(input, pred);

@@ -8,0 +8,0 @@ assert.eq(expected, actual);

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc