Socket
Socket
Sign inDemoInstall

@mootable/hashmap

Package Overview
Dependencies
0
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
2345Next

1.0.7

Diff

Changelog

Source

1.0.7

  • Updated Dependencies, including rollup
jackmoxley
published 1.0.6 •

Changelog

Source

1.0.6

  • Made CreateContainer properly private (programmatically)
  • Finished Documenting the base HashMap
  • Removed comments and docs from the browser dist files.
jackmoxley
published 1.0.5 •

Changelog

Source

1.0.5

  • Updated Dev Dependencies.
  • Added more documentation.
jackmoxley
published 1.0.4 •

Changelog

Source

1.0.4

Added badges

jackmoxley
published 1.0.3 •

Changelog

Source

1.0.3

  • Removed JSDoc which had an underlying dependency (underscore) which had a security vulnerability, as it is a dev dependency, there is no additional risk to projects that depend on @mootable/hashmap.
  • Replaced with Documentation.js
    • Built a Mootable theme.
  • Fixed up a load of the ReadMe and Documentation pages.
jackmoxley
published 1.0.2 •

Changelog

Source

1.0.2

  • Added overrides for every() as it fails fast and being able to search in reverse maybe optimal.
  • Made equalsFor and equalsAndHash methods on the hashmap using Object.defineProperty(), in preparation for typed maps.
  • made emplace match the proposal more closely, by not using insert to update.
  • removed jshint and replaced with eslint as the linting tool.
  • More Documentation
  • More Examples
  • Removed unneeded node environment variables for testing.
  • moved common support code into its own file.
jackmoxley
published 1.0.1 •

Changelog

Source

1.0.1

  • More Documentation
  • Fixed usage of obj.hasOwnProperty('blah') to be Object.prototype.hasOwnProperty.call(obj,'blah')
    • this could be a potential security vulnerability. So please update.
jackmoxley
published 1.0.0 •

Changelog

Source

1.0.0

  • Breaking Changes
  • Functionality
    • HashMap & LinkedHashMap
      • Iterators
        • Added entries() iterator
        • Added entriesRight() reverse of entries() iterator
        • Added keys() iterator
        • Added keysRight() reverse of keys() iterator
        • Added values() iterator
        • Added valuesRight() reverse of values() iterator
      • Emplace
        • added emplace() method as per the proposed map spec
      • Get
        • added keyOf() which retrieves the key for a provided value.
        • added optionalKeyOf() which retrieves the key for a provided value, and wraps it in an option.
      • Higher Order Functions
        • Added reduce() similar to the array method
        • Added reduceRight() similar to the array method
        • Added some() similar to the array method
        • Added every() similar to the array method
        • Added keyOf() similar to the array method indexOf
        • Added lastKeyOf() similar to the array method indexOf
        • Added find() similar to the array method
        • Added findLast() find in the opposite directory
        • Added findKey() similar to the array method findIndex
        • Added findLastKey() findKey in the opposite directory
        • Added optionalKeyOf() an optional varient
        • Added optionalLastKeyOf() an optional varient
        • Added optionalFind() an optional varient
        • Added optionalFindLast() an optional varient
        • Added optionalFindKey() an optional varient
        • Added optionalFindLastKey() an optional varient
      • Parameters
        • length and size are now both derived.
    • LinkedHashMap only
      • Set
        • Added setLeft() to add to the head of the map, overwrites don't move
        • Added push() to add to the tail of the map, forces a move on overwrite, to the tail.
        • Added unshift() to add to the head of the map, forces a move on overwrite, to the head.
      • Emplace
        • Added emplaceLeft() to add to the head of the map, overwrites don't move
        • Added pushEmplace() to add to the tail of the map, forces a move on overwrite, to the tail.
        • Added unshiftEmplace() to add to the head of the map, forces a move on overwrite, to the head.
      • Get
        • added tail() which retrieves the value at the end of the map.
        • added head() which retrieves the value at the start of the map.
        • added tailKey() which retrieves the key at the end of the map.
        • added headKey() which retrieves the key at the start of the map.
        • added optionalTail() which retrieves the value at the end of the map. and wraps it in an Option
        • added optionalHead() which retrieves the value at the start of the map. and wraps it in an Option
        • added optionalTailKey() which retrieves the key at the end of the map. and wraps it in an Option
        • added optionalHeadKey() which retrieves the key at the start of the map. and wraps it in an Option
      • Delete
        • added shift() to remove the first element on the map. This is a very fast method.
        • added pop() to remove the last element on the map. This is a very fast method.
      • Reverse
        • Added reverse() method, this modifies the map, and reverses the order of its elements.
    • MapIterator & SetIterator the higher order wrappers, have gone.
      • They will be back at some point, but I want to focus on releasing hashmap and linkedhashmap first. I have migrated most functions to hashmap and linkedhashmap and there are plenty of libraries such as lodash that give similar functionality.
  • Testing
    • 100% Code Coverage on Everything.
    • Some minor defects fixed as part of the process, these will improve performance.
jackmoxley
published 0.15.0 •

Changelog

Source

0.15.0

  • Functionality
    • Breaking changes
      • option to fine tune hashmap has been removed, as we can massively improve performance, by removing it.
    • Introduced proper HAMT layers above the bottom the layer. This means we will get optimal performance, with only a small memory sacrifice for small maps.
    • Put back in the Containers at lower levels, but shift them a level now rather than copy them, if a collision occurs.
    • Improved performance of hashcode and equals, by recombining them.
      • uncovered a type collision bug when using option (fixed)
    • Removed entry class, and replaced with an array of length 2.
    • Moved container class into the hashmap implementation, and removed hashcontainer.
    • introduced a new linkedcontainer for linkedhashmaps
    • added reverse iterators for all maps.
  • Testing
    • Removed or migrated old tests.
    • created tests for new equalsHashCode methos.
  • Benchmarks
    • improved output graph and code of benchmarks.
    • tried to improve certainty of executions on the benchmark
      • this has some issues as map at 4 million entries grinds to a halt if I try to prestress it.
    • recollecting memory to be reported on in a later version.
jackmoxley
published 0.14.0 •

Changelog

Source

0.14.0

  • Breaking Changes
    • Switched to an options parameter for all methods.
    • Internal classes have been restructured.
  • Switched to using Benny, for cleaner benchmarking.
  • Cleaned up benchmarking, and included optional parameters.
  • Added Graph for better comparison.
  • Simplified code, ready for optimisation phase later on.
  • Fixed some potential bugs around keys being overwritten when branching.
  • Allowed arrays to resize themselves rather than provide a set size.
  • Started work on the emplace method.
2345Next
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc