Comparing version 0.2.0 to 0.2.1
@@ -18,5 +18,5 @@ import { IObject } from "@daybrush/utils"; | ||
setObject(obj: IObject<T[]>): void; | ||
getObject(): {}; | ||
getObject(): IObject<T[]>; | ||
clone(): OrderMap<T>; | ||
} | ||
export default OrderMap; |
@@ -7,3 +7,3 @@ /* | ||
repository: git+https://github.com/daybrush/order-map.git | ||
version: 0.2.0 | ||
version: 0.2.1 | ||
*/ | ||
@@ -10,0 +10,0 @@ 'use strict'; |
@@ -7,3 +7,3 @@ /* | ||
repository: git+https://github.com/daybrush/order-map.git | ||
version: 0.2.0 | ||
version: 0.2.1 | ||
*/ | ||
@@ -10,0 +10,0 @@ /** |
@@ -7,3 +7,3 @@ /* | ||
repository: git+https://github.com/daybrush/order-map.git | ||
version: 0.2.0 | ||
version: 0.2.1 | ||
*/ | ||
@@ -10,0 +10,0 @@ (function (global, factory) { |
@@ -7,5 +7,5 @@ /* | ||
repository: git+https://github.com/daybrush/order-map.git | ||
version: 0.2.0 | ||
version: 0.2.1 | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).OrderMap=e()}(this,function(){"use strict";return function(){function a(t){this.separator=t,this.orderMap={}}var t=a.prototype;return t.getFullName=function(t){return t.join(this.separator)},t.get=function(t){return this.orderMap[this.getFullName(t)]},t.gets=function(t,e){void 0===e&&(e=!0);var a=[],r=this;return function n(i,o){var t=r.get(i);if(t)return t.forEach(function(t){var e=o.concat([t]),r=n(i.concat([t]),e);r&&r.length||a.push(o.concat([t]))}),t}(t,e?t:[]),a},t.set=function(r,t){var n=this;return r.forEach(function(t,e){n.addName(r.slice(0,e),t)}),this.orderMap[this.getFullName(r)]=t},t.add=function(t){var e=t.length;return e?this.addName(t.slice(0,-1),t[e-1]):[]},t.addName=function(t,e){var r=this.get(t)||this.set(t,[]);return-1===r.indexOf(e)&&r.push(e),r},t.findIndex=function(t,e){var r=this.orderMap[this.getFullName(t)];return r?r.indexOf(e):-1},t.remove=function(t){var e=this.getFullName(t),r=this.orderMap;for(var n in r)0===n.indexOf(e)&&delete r[n];var i=t.length;if(i){var o=t.slice(0,-1),a=t[i-1];this.splice(o,this.findIndex(o,a),1)}return this},t.filter=function(t,e,r){void 0===r&&(r=!0);var n=this.gets(t,r).filter(e),i=new a(this.separator),o=r?[]:t;return n.forEach(function(t){i.add(o.concat(t))}),i},t.splice=function(t,e,r){for(var n=[],i=3;i<arguments.length;i++)n[i-3]=arguments[i];var o=this.get(t)||this.set(t,[]);return o.splice.apply(o,[e,r].concat(n)),this},t.clear=function(){this.orderMap={}},t.setObject=function(t){var e=this.orderMap;for(var r in t)e[r]=t[r].slice()},t.getObject=function(){var t={},e=this.orderMap;for(var r in e)t[r]=e[r].slice();return t},t.clone=function(){var t=new a(this.separator);return t.setObject(t.orderMap),t},a}()}); | ||
//# sourceMappingURL=order-map.min.js.map |
{ | ||
"name": "order-map", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "A order-map collection in the form of key, value, that ensures the index.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/order-map.cjs.js", |
@@ -177,3 +177,3 @@ import { IObject } from "@daybrush/utils"; | ||
*/ | ||
public getObject() { | ||
public getObject(): IObject<T[]> { | ||
const nextMap = {}; | ||
@@ -180,0 +180,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60946