Comparing

tslib@1.13.0
npmjs.comunpkgBundlephobiaPackagephobia
...
tslib@2.0.0
npmjs.comunpkgBundlephobiaPackagephobia

Packagephobia

31.8 kB

31.8 kB

Publish

Install

npm diff

Options

files: **/!(*.map|*.min.js)

Showing 5 changed files with 34 additions and 17 deletions
SplitUnified

tslib.es6.js +++14---5

View file

@@ -103,13 +103,16 @@

103103 }
104104}
105105
106export function __createBinding(o, m, k, k2) {
106export var __createBinding = Object.create ? (function(o, m, k, k2) {
107107 if (k2 === undefined) k2 = k;
108 Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
109}) : (function(o, m, k, k2) {
110 if (k2 === undefined) k2 = k;
108111 o[k2] = m[k];
109}
112});
110113
111114export function __exportStar(m, exports) {
112 for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
115 for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
113116}
114117
115118export function __values(o) {

@@ -190,11 +193,17 @@

190193 return cooked;
191194};
192195
196var __setModuleDefault = Object.create ? (function(o, v) {
197 Object.defineProperty(o, "default", { enumerable: true, value: v });
198}) : function(o, v) {
199 o["default"] = v;
200};
201
193202export function __importStar(mod) {
194203 if (mod && mod.__esModule) return mod;
195204 var result = {};
196 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
197 result.default = mod;
205 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
206 __setModuleDefault(result, mod);
198207 return result;
199208}
200209

tslib.js +++17---9

View file

@@ -12,7 +12,6 @@

1212OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1313PERFORMANCE OF THIS SOFTWARE.
1414***************************************************************************** */
15
1615/* global global, define, System, Reflect, Promise */
1716var __extends;
1817var __assign;

@@ -144,15 +143,18 @@

144143 }
145144 };
146145
147 __createBinding = function(o, m, k, k2) {
146 __exportStar = function(m, exports) {
147 for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
148 };
149
150 __createBinding = Object.create ? (function(o, m, k, k2) {
148151 if (k2 === undefined) k2 = k;
152 Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
153 }) : (function(o, m, k, k2) {
154 if (k2 === undefined) k2 = k;
149155 o[k2] = m[k];
150 };
156 });
151157
152 __exportStar = function (m, exports) {
153 for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
154 };
155
156158 __values = function (o) {
157159 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
158160 if (m) return m.call(o);

@@ -231,11 +233,17 @@

231233 return cooked;
232234 };
233235
236 var __setModuleDefault = Object.create ? (function(o, v) {
237 Object.defineProperty(o, "default", { enumerable: true, value: v });
238 }) : function(o, v) {
239 o["default"] = v;
240 };
241
234242 __importStar = function (mod) {
235243 if (mod && mod.__esModule) return mod;
236244 var result = {};
237 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
238 result["default"] = mod;
245 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
246 __setModuleDefault(result, mod);
239247 return result;
240248 };
241249

package.json +++1---1

View file

@@ -2,7 +2,7 @@

22 "name": "tslib",
33 "author": "Microsoft Corp.",
44 "homepage": "https://www.typescriptlang.org/",
5 "version": "1.13.0",
5 "version": "2.0.0",
66 "license": "0BSD",
77 "description": "Runtime library for TypeScript helper functions",
88 "keywords": [

README.md +++1---1

View file

@@ -118,7 +118,7 @@

118118 "importHelpers": true,
119119 "baseUrl": "./",
120120 "paths": {
121 "tslib" : ["jspm_packages/npm/tslib@1.13.0/tslib.d.ts"]
121 "tslib" : ["jspm_packages/npm/tslib@2.0.0/tslib.d.ts"]
122122 }
123123 }
124124}

tslib.d.ts +++1---1

View file

@@ -34,4 +34,4 @@

3434export declare function __importDefault<T>(mod: T): T | { default: T };
3535export declare function __classPrivateFieldGet<T extends object, V>(receiver: T, privateMap: { has(o: T): boolean, get(o: T): V | undefined }): V;
3636export declare function __classPrivateFieldSet<T extends object, V>(receiver: T, privateMap: { has(o: T): boolean, set(o: T, value: V): any }, value: V): V;
37export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void;
37export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void;