Skip to content

Commit

Permalink
Convert project to a ES Module (#95)
Browse files Browse the repository at this point in the history
* Set up Web Test Runner

* Convert project to Modules

* Remove browserify and the build task

* Remove build from CI
  • Loading branch information
koddsson authored Apr 28, 2023
1 parent 2aa90d6 commit b8c9954
Show file tree
Hide file tree
Showing 7 changed files with 262 additions and 8,564 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- main

jobs:
build:
Test:
name: Build
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -35,9 +35,6 @@ jobs:
- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Test
run: npm run test
env:
Expand Down
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
* MIT Licensed
*/

var type = require('type-detect');
import type from 'type-detect';

function FakeMap() {
this._key = 'chai/deep-eql__' + Math.random() + Date.now();
}
Expand All @@ -24,7 +25,7 @@ FakeMap.prototype = {
},
};

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

module.exports = deepEqual;
module.exports.MemoizeMap = MemoizeMap;
export default deepEqual;

/**
* Assert deeply nested sameValue equality between two objects of any type.
Expand Down
Loading

0 comments on commit b8c9954

Please sign in to comment.