functionalscript 0.0.154 → 0.0.155

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/map/index.js CHANGED
@@ -57,7 +57,7 @@ const create = root => ({
57
57
  * readonly root: undefined
58
58
  * }}
59
59
  */
60
- const map = {
60
+ const empty = {
61
61
  get: () => undefined,
62
62
  set: name => value => create([[name, value]]),
63
63
  entries: () => [],
@@ -66,5 +66,5 @@ const map = {
66
66
 
67
67
  module.exports = {
68
68
  /** @readonly */
69
- map,
69
+ empty,
70
70
  }
package/lib/map/test.js CHANGED
@@ -1,8 +1,8 @@
1
- const { map } = require('.')
1
+ const { empty } = require('.')
2
2
  const lib = require('..')
3
3
 
4
4
  {
5
- let m = map.set('a')(1)
5
+ let m = empty.set('a')(1)
6
6
 
7
7
  if (m.get('a') !== 1) { throw 'error' }
8
8
  if (m.get('b') !== undefined) { throw 'error' }
@@ -41,7 +41,7 @@ const lib = require('..')
41
41
  }
42
42
 
43
43
  {
44
- const m = map.set('x')(12).set('y')(44)
44
+ const m = empty.set('x')(12).set('y')(44)
45
45
  lib.panic_if('map.get(\'x\')')(m.get('x') !== 12)
46
46
  lib.panic_if('map.get(\'y\')')(m.get('y') !== 44)
47
47
  lib.panic_if('map.get(\'a\')')(m.get('a') !== undefined)
@@ -52,7 +52,7 @@ const lib = require('..')
52
52
 
53
53
  {
54
54
  /** @type {import('.').Map<number>} */
55
- let m = map
55
+ let m = empty
56
56
  for (let i = 0; i < 1_000_000; ++i) {
57
57
  m = m.set((i*i).toString())(i)
58
58
  /*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "functionalscript",
3
- "version": "0.0.154",
3
+ "version": "0.0.155",
4
4
  "description": "FunctionalScript is a functional subset of JavaScript",
5
5
  "main": "index.js",
6
6
  "scripts": {