Skip to content

Commit 905c432

Browse files
committed
Update.
1 parent 3af4b45 commit 905c432

13 files changed

+2744
-3507
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ insert_final_newline = true
1212
trim_trailing_whitespace = true
1313

1414

15-
[{*.json,*.yml,.eslintrc}]
15+
[{*.json,*.yml}]
1616
indent_size = 2
1717

1818

.eslintrc .eslintrc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
node: true
77

88
parserOptions:
9-
ecmaVersion: 2019
9+
ecmaVersion: 2020
1010

1111
rules:
1212
array-bracket-spacing: [2, never]

.travis.yml

-15
This file was deleted.

README.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# modulejs
22

33
[![license][license-img]][github] [![web][web-img]][web] [![github][github-img]][github] [![npm][npm-img]][npm]
4-
[![version][npm-v-img]][npm] [![downloads][npm-dm-img]][npm] [![build status][travis-img]][travis]
4+
[![version][npm-v-img]][npm] [![downloads][npm-dm-img]][npm]
55

66
Lightweight JavaScript module system.
77

88

99
## License
1010
The MIT License (MIT)
1111

12-
Copyright (c) 2019 Lars Jung (https://larsjung.de)
12+
Copyright (c) 2020 Lars Jung (https://larsjung.de)
1313

1414
Permission is hereby granted, free of charge, to any person obtaining a copy
1515
of this software and associated documentation files (the "Software"), to deal
@@ -33,7 +33,6 @@ THE SOFTWARE.
3333
[web]: https://larsjung.de/modulejs/
3434
[github]: https://github.com/lrsjng/modulejs
3535
[npm]: https://www.npmjs.org/package/modulejs
36-
[travis]: https://travis-ci.org/lrsjng/modulejs
3736

3837
[license-img]: https://img.shields.io/badge/license-MIT-a0a060.svg?style=flat-square
3938
[web-img]: https://img.shields.io/badge/web-larsjung.de/modulejs-a0a060.svg?style=flat-square
@@ -42,4 +41,3 @@ THE SOFTWARE.
4241

4342
[npm-v-img]: https://img.shields.io/npm/v/modulejs.svg?style=flat-square
4443
[npm-dm-img]: https://img.shields.io/npm/dm/modulejs.svg?style=flat-square
45-
[travis-img]: https://img.shields.io/travis/lrsjng/modulejs.svg?style=flat-square

dist/modulejs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! modulejs v2.7.0 - https://larsjung.de/modulejs/ */
1+
/*! modulejs v2.8.0 - https://larsjung.de/modulejs/ */
22
(function webpackUniversalModuleDefinition(root, factory) {
33
if(typeof exports === 'object' && typeof module === 'object')
44
module.exports = factory();

dist/modulejs.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/modulejs.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const {assert, forOwn, has, resolve} = require('./util');
1+
const {assert, for_own, has, resolve} = require('./util');
22

33
const create = () => {
44
// Module definitions.
@@ -39,7 +39,7 @@ const create = () => {
3939
const state = () => {
4040
const res = {};
4141

42-
forOwn(definitions, (def, id) => {
42+
for_own(definitions, (def, id) => {
4343
res[id] = {
4444

4545
// direct dependencies
@@ -53,10 +53,10 @@ const create = () => {
5353
};
5454
});
5555

56-
forOwn(definitions, (def, id) => {
56+
for_own(definitions, (def, id) => {
5757
const inv = [];
5858

59-
forOwn(definitions, (def2, id2) => {
59+
for_own(definitions, (def2, id2) => {
6060
if (res[id2].reqs.indexOf(id) >= 0) {
6161
inv.push(id2);
6262
}
@@ -73,7 +73,7 @@ const create = () => {
7373
const log = inv => {
7474
let out = '\n';
7575

76-
forOwn(state(), (st, id) => {
76+
for_own(state(), (st, id) => {
7777
const list = inv ? st.reqd : st.reqs;
7878
out += `${st.init ? '*' : ' '} ${id} -> [ ${list.join(', ')} ]\n`;
7979
});

lib/util.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const assert = (expr, msg) => {
66
};
77

88
// Iterates over all own props of an object.
9-
const forOwn = (x, fn) => {
9+
const for_own = (x, fn) => {
1010
Object.keys(x).forEach(k => fn(x[k], k));
1111
};
1212

@@ -77,7 +77,7 @@ const resolve = (defs, insts, id, stack) => {
7777

7878
module.exports = {
7979
assert,
80-
forOwn,
80+
for_own,
8181
has,
8282
resolve,
8383
uniq

0 commit comments

Comments
 (0)