@itrocks/sorted-array
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -5,25 +5,11 @@ { | ||
"devDependencies": { | ||
"@types/jest": "^29.5", | ||
"esbuild": "^0.24", | ||
"jest": "^29.7", | ||
"typescript": "5.6" | ||
}, | ||
"exports": { | ||
".": { | ||
"import": "./sorted-array.js", | ||
"require": "./sorted-array.cjs" | ||
}, | ||
"./min": { | ||
"import": "./sorted-array.min.js", | ||
"require": "./sorted-array.min.cjs" | ||
} | ||
}, | ||
"files": [ | ||
"LICENSE", | ||
"README.md", | ||
"sorted-array.cjs", | ||
"esm/sorted-array.d.js", | ||
"esm/sorted-array.js", | ||
"sorted-array.d.ts", | ||
"sorted-array.js", | ||
"sorted-array.min.cjs", | ||
"sorted-array.min.js" | ||
"sorted-array.js" | ||
], | ||
@@ -44,13 +30,13 @@ "keywords": [ | ||
"license": "MIT", | ||
"main": "./sorted-array.cjs", | ||
"module": "./sorted-array.js", | ||
"main": "./sorted-array.js", | ||
"module": "./esm/sorted-array.js", | ||
"name": "@itrocks/sorted-array", | ||
"repository": "https://github.com/itrocks-ts/sorted-array", | ||
"scripts": { | ||
"build": "tsc && node esbuild.config.js", | ||
"esbuild": "node esbuild.config.js" | ||
"build": "npm run build:cjs && npm run build:esm", | ||
"build:cjs": "tsc -p tsconfig.cjs.json", | ||
"build:esm": "tsc -p tsconfig.esm.json" | ||
}, | ||
"type": "module", | ||
"types": "./sorted-array.d.ts", | ||
"version": "0.0.3" | ||
"version": "0.0.4" | ||
} |
@@ -26,8 +26,4 @@  | ||
Isomorphic, load-anywhere, and typescript typed: | ||
- Written in Typescript; the types declaration file is included into this package, | ||
- Can be included in any CommonJS (`require('@itrocks/sorted-array')`) or ES6 (`import '@itrocks/sorted-array'`) scripts, | ||
- Usable as a Node.js module, CommonJS script, or ES6 module: | ||
- CommonJS script: `<script src="sorted-array.cjs"></script>`, | ||
- ES6 module: `<script src="sorted-array.js" type="module"></script>`, | ||
- Minified versions `.min.cjs` / `.min.js` are also available to reduce browser bandwidth usage by 75%. | ||
- Written in Typescript; the types declaration files are included in this package, | ||
- Can be required or imported in any CommonJS or ES6 script running in node.js or your browser. | ||
@@ -173,3 +169,3 @@ ## Usage | ||
``` | ||
The array will be continuously sorted by the value of the property named `name` into the object element. | ||
The array will be continuously sorted by the value of the `name` property in each object element. | ||
<br/><br/> | ||
@@ -234,3 +230,3 @@ | ||
Inserts an element into the array, sorted. | ||
Inserts an element into the array in sorted order. | ||
@@ -237,0 +233,0 @@ Equivalent to |
@@ -0,1 +1,4 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SortedArrayCompareFn = exports.SortedArrayBy = exports.SortedArray = void 0; | ||
class ASortedArray extends Array { | ||
@@ -9,3 +12,3 @@ distinct = false; | ||
} | ||
export class SortedArray extends ASortedArray { | ||
class SortedArray extends ASortedArray { | ||
#leftOf(element) { | ||
@@ -49,3 +52,4 @@ let left = 0; | ||
} | ||
export class SortedArrayBy extends ASortedArray { | ||
exports.SortedArray = SortedArray; | ||
class SortedArrayBy extends ASortedArray { | ||
compareBy; | ||
@@ -103,3 +107,4 @@ constructor(compareBy, ...items) { | ||
} | ||
export class SortedArrayCompareFn extends ASortedArray { | ||
exports.SortedArrayBy = SortedArrayBy; | ||
class SortedArrayCompareFn extends ASortedArray { | ||
compareFn; | ||
@@ -151,1 +156,2 @@ constructor(compareFn, ...items) { | ||
} | ||
exports.SortedArrayCompareFn = SortedArrayCompareFn; |
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
1
372
22465
7
257
1
No