@polkadot/primitives
Advanced tools
Comparing version 0.13.10 to 0.14.1
@@ -1,7 +0,5 @@ | ||
'use strict'; | ||
"use strict"; | ||
var _bn = require('bn.js'); | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
var _bn2 = _interopRequireDefault(_bn); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var _bn = _interopRequireDefault(require("bn.js")); |
@@ -1,1 +0,1 @@ | ||
'use strict'; | ||
"use strict"; |
@@ -1,1 +0,1 @@ | ||
'use strict'; | ||
"use strict"; |
@@ -1,1 +0,1 @@ | ||
'use strict'; | ||
"use strict"; |
@@ -1,1 +0,1 @@ | ||
'use strict'; | ||
"use strict"; |
@@ -1,1 +0,1 @@ | ||
'use strict'; | ||
"use strict"; |
@@ -1,1 +0,1 @@ | ||
'use strict'; | ||
"use strict"; |
{ | ||
"name": "@polkadot/primitives", | ||
"version": "0.13.10", | ||
"version": "0.14.1", | ||
"description": "Type defintions for the Polkadot network", | ||
@@ -32,4 +32,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"@polkadot/util": "^0.19.7", | ||
"babel-runtime": "^6.26.0" | ||
"@babel/runtime": "^7.0.0-beta.47", | ||
"@polkadot/util": "^0.20.3" | ||
}, | ||
@@ -36,0 +36,0 @@ "devDependencies": { |
@@ -1,1 +0,1 @@ | ||
'use strict'; | ||
"use strict"; |
@@ -1,11 +0,12 @@ | ||
'use strict'; | ||
"use strict"; | ||
// Copyright 2017-2018 Jaco Greeff | ||
// This software may be modified and distributed under the terms | ||
// of the ISC license. See the LICENSE file for details. | ||
module.exports = { | ||
none: 0, | ||
full: 1, | ||
light: 2, | ||
collator: 4, | ||
validator: 8 | ||
}; // Copyright 2017-2018 Jaco Greeff | ||
// This software may be modified and distributed under the terms | ||
// of the ISC license. See the LICENSE file for details. | ||
none: 0b00000000, | ||
full: 0b00000001, | ||
light: 0b00000010, | ||
collator: 0b00000100, | ||
validator: 0b00001000 | ||
}; |
@@ -1,27 +0,21 @@ | ||
'use strict'; | ||
"use strict"; | ||
var _keys = require('babel-runtime/core-js/object/keys'); | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
var _keys2 = _interopRequireDefault(_keys); | ||
var _keys = _interopRequireDefault(require("@babel/runtime/core-js/object/keys")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var assert = require('@polkadot/util/assert'); // Copyright 2017-2018 Jaco Greeff | ||
// Copyright 2017-2018 Jaco Greeff | ||
// This software may be modified and distributed under the terms | ||
// of the ISC license. See the LICENSE file for details. | ||
const assert = require('@polkadot/util/assert'); | ||
const isUndefined = require('@polkadot/util/is/undefined'); | ||
var isUndefined = require('@polkadot/util/is/undefined'); | ||
const all = require('./all'); | ||
var all = require('./all'); | ||
module.exports = function roleFromId(roleId) { | ||
var role = (0, _keys2.default)(all).find(function (key) { | ||
return all[key] === roleId; | ||
}); | ||
const role = (0, _keys.default)(all).find(key => all[key] === roleId); | ||
assert(!isUndefined(role), `Unable to find valid role for '${roleId}'`); // $FlowFixMe undefined check done above | ||
assert(!isUndefined(role), 'Unable to find valid role for \'' + roleId + '\''); | ||
// $FlowFixMe undefined check done above | ||
return role; | ||
}; |
@@ -1,1 +0,1 @@ | ||
'use strict'; | ||
"use strict"; |
@@ -1,18 +0,16 @@ | ||
'use strict'; | ||
"use strict"; | ||
var assert = require('@polkadot/util/assert'); // Copyright 2017-2018 Jaco Greeff | ||
// Copyright 2017-2018 Jaco Greeff | ||
// This software may be modified and distributed under the terms | ||
// of the ISC license. See the LICENSE file for details. | ||
const assert = require('@polkadot/util/assert'); | ||
const isUndefined = require('@polkadot/util/is/undefined'); | ||
var isUndefined = require('@polkadot/util/is/undefined'); | ||
const all = require('./all'); | ||
var all = require('./all'); | ||
module.exports = function roleToId(role) { | ||
var roleId = all[role]; | ||
assert(!isUndefined(roleId), 'Unable to perform mapping from role \'' + role + '\''); | ||
const roleId = all[role]; | ||
assert(!isUndefined(roleId), `Unable to perform mapping from role '${role}'`); | ||
return roleId; | ||
}; |
@@ -1,1 +0,1 @@ | ||
'use strict'; | ||
"use strict"; |
@@ -1,1 +0,1 @@ | ||
'use strict'; | ||
"use strict"; |
12244
31
36
+ Added@polkadot/util@0.20.5(transitive)
- Removedbabel-runtime@^6.26.0
- Removed@polkadot/util@0.19.9(transitive)
- Removedbabel-runtime@6.26.0(transitive)
- Removedcore-js@2.6.12(transitive)
- Removedregenerator-runtime@0.11.1(transitive)
Updated@polkadot/util@^0.20.3