@es-git/core
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -37,9 +37,3 @@ export { decode, encode, concat, flatten, fromDec, fromHex, fromOct, fromDecChar, fromHexChar, packHash, unpackHash, toHexChar, NEWLINE } from './utils'; | ||
export declare type Hash = string; | ||
export declare type Constructor<T> = new (...args: any[]) => T; | ||
export interface ConstructorWith<T> { | ||
new (...args: any[]): T; | ||
with<T2>(mixin: Mixin<T, T2>): ConstructorWith<T & T2>; | ||
} | ||
export declare type Mixin<T1, T2> = (base: Constructor<T1>) => Constructor<T2> & Constructor<T1>; | ||
export declare function mix<T>(base: Constructor<T>): ConstructorWith<T>; | ||
export { default as mix, Constructor, ConstructorWith, Mixin, MixinWithParam } from '@es-git/mix'; | ||
export { default as Buffer } from './Buffer'; |
@@ -40,9 +40,4 @@ export { decode, encode, concat, flatten, fromDec, fromHex, fromOct, fromDecChar, fromHexChar, packHash, unpackHash, toHexChar, NEWLINE } from './utils'; | ||
} | ||
; | ||
export function mix(base) { | ||
const baseWith = base; | ||
baseWith.with = (mixin) => mix(mixin(base)); | ||
return baseWith; | ||
} | ||
export { default as mix } from '@es-git/mix'; | ||
export { default as Buffer } from './Buffer'; | ||
//# sourceMappingURL=index.js.map |
@@ -6,8 +6,3 @@ "use strict"; | ||
}); | ||
exports.Buffer = exports.Type = exports.Mode = exports.Mask = exports.NEWLINE = exports.toHexChar = exports.unpackHash = exports.packHash = exports.fromHexChar = exports.fromDecChar = exports.fromOct = exports.fromHex = exports.fromDec = exports.flatten = exports.concat = exports.encode = exports.decode = undefined; | ||
var _newArrowCheck2 = require("babel-runtime/helpers/newArrowCheck"); | ||
var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2); | ||
var _utils = require("./utils"); | ||
@@ -96,4 +91,12 @@ | ||
exports.toType = toType; | ||
exports.mix = mix; | ||
var _mix = require("@es-git/mix"); | ||
Object.defineProperty(exports, "mix", { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_mix).default; | ||
} | ||
}); | ||
var _Buffer = require("./Buffer"); | ||
@@ -145,13 +148,2 @@ | ||
} | ||
; | ||
function mix(base) { | ||
var _this = this; | ||
var baseWith = base; | ||
baseWith.with = function (mixin) { | ||
(0, _newArrowCheck3.default)(this, _this); | ||
return mix(mixin(base)); | ||
}.bind(this); | ||
return baseWith; | ||
} | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@es-git/core", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "", | ||
@@ -42,4 +42,5 @@ "main": "js/index.js", | ||
"dependencies": { | ||
"@es-git/mix": "^0.1.1", | ||
"text-encoding": "^0.6.4" | ||
} | ||
} |
@@ -69,17 +69,4 @@ export { | ||
export type Constructor<T> = new(...args: any[]) => T; | ||
export { default as mix, Constructor, ConstructorWith, Mixin, MixinWithParam } from '@es-git/mix'; | ||
export interface ConstructorWith<T> { | ||
new(...args: any[]) : T; | ||
with<T2>(mixin : Mixin<T, T2>) : ConstructorWith<T & T2> | ||
}; | ||
export type Mixin<T1, T2> = (base : Constructor<T1>) => Constructor<T2> & Constructor<T1>; | ||
export function mix<T>(base : Constructor<T>){ | ||
const baseWith = base as ConstructorWith<T>; | ||
baseWith.with = <TWith>(mixin : Mixin<T, TWith>) => mix<T & TWith>(mixin(base)); | ||
return baseWith; | ||
} | ||
export { default as Buffer } from './Buffer'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
0
71971
3
864
+ Added@es-git/mix@^0.1.1
+ Added@es-git/mix@0.1.2(transitive)