@bbn/bbn 1.0.443 → 1.0.444

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/dist/date.js CHANGED
@@ -256,10 +256,11 @@ class bbnDateTool {
256
256
  const d = new Date();
257
257
  return d;
258
258
  }
259
- format(format = '') {
259
+ format(format = 'y-m-d h:n:s') {
260
260
  let str = '';
261
261
  if (format) {
262
- const parts = format.split('/(' + Object.keys(unitsCorrespondence).join('|') + ')/');
262
+ const reg = new RegExp('(' + Object.keys(unitsCorrespondence).join('|') + ')', 'g');
263
+ const parts = format.split(reg);
263
264
  each(parts, (part) => {
264
265
  if (part in unitsCorrespondence) {
265
266
  const suffix = unitsMap[unitsCorrespondence[part]].toLowerCase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "1.0.443",
3
+ "version": "1.0.444",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",