Skip to content

Commit b8c9954

Browse files
authored
Convert project to a ES Module (#95)
* Set up Web Test Runner * Convert project to Modules * Remove browserify and the build task * Remove build from CI
1 parent 2aa90d6 commit b8c9954

File tree

7 files changed

+262
-8564
lines changed

7 files changed

+262
-8564
lines changed

.github/workflows/nodejs.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- main
88

99
jobs:
10-
build:
10+
Test:
1111
name: Build
1212
runs-on: ubuntu-latest
1313
steps:
@@ -35,9 +35,6 @@ jobs:
3535
- name: Install dependencies
3636
run: npm install
3737

38-
- name: Build
39-
run: npm run build
40-
4138
- name: Test
4239
run: npm run test
4340
env:

index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
* MIT Licensed
66
*/
77

8-
var type = require('type-detect');
8+
import type from 'type-detect';
9+
910
function FakeMap() {
1011
this._key = 'chai/deep-eql__' + Math.random() + Date.now();
1112
}
@@ -24,7 +25,7 @@ FakeMap.prototype = {
2425
},
2526
};
2627

27-
var MemoizeMap = typeof WeakMap === 'function' ? WeakMap : FakeMap;
28+
export var MemoizeMap = typeof WeakMap === 'function' ? WeakMap : FakeMap;
2829
/*!
2930
* Check to see if the MemoizeMap has recorded a result of the two operands
3031
*
@@ -75,8 +76,7 @@ function memoizeSet(leftHandOperand, rightHandOperand, memoizeMap, result) {
7576
* Primary Export
7677
*/
7778

78-
module.exports = deepEqual;
79-
module.exports.MemoizeMap = MemoizeMap;
79+
export default deepEqual;
8080

8181
/**
8282
* Assert deeply nested sameValue equality between two objects of any type.

0 commit comments

Comments
 (0)