bloc-react
Advanced tools
Comparing version 0.1.10 to 0.1.11
@@ -5,3 +5,2 @@ 'use strict'; | ||
var nanoid = require('nanoid'); | ||
var React = require('react'); | ||
@@ -19,2 +18,6 @@ | ||
const createId = () => { | ||
return "_" + Math.random().toString(36).substr(2, 9); | ||
}; | ||
class BehaviorSubject { | ||
@@ -30,3 +33,3 @@ constructor(initialValue) { | ||
subscribe(observer) { | ||
const id = nanoid.nanoid(); | ||
const id = createId(); | ||
this.observers.push({ observer, id }); | ||
@@ -130,3 +133,3 @@ this.triggerObservers(); | ||
super(initialValue, blocOptions); | ||
this.id = nanoid.nanoid(); | ||
this.id = createId(); | ||
this.createdAt = new Date(); | ||
@@ -133,0 +136,0 @@ this.meta = { |
{ | ||
"name": "bloc-react", | ||
"version": "0.1.10", | ||
"version": "0.1.11", | ||
"license": "MIT", | ||
@@ -24,5 +24,3 @@ "main": "dist/bloc-react.js", | ||
}, | ||
"dependencies": { | ||
"nanoid": "^3.1.23" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
@@ -29,0 +27,0 @@ "@babel/preset-env": "^7.14.2", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
104152
0
1086
0
- Removednanoid@^3.1.23
- Removednanoid@3.3.8(transitive)