Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

db64

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

db64 - npm Package Compare versions

Comparing version 0.7.6 to 0.7.7

src/_readme.md

17

create-distribution.js

@@ -10,2 +10,5 @@ import fs from 'fs/promises'

const paths = {
packageJSON: path.join(__dirname, './package.json'),
readmeSrc: path.join(__dirname, './src/_readme.md'),
readmeRoot: path.join(__dirname, './README.md'),
source: path.join(__dirname, './src/db64.js'),

@@ -21,5 +24,9 @@ cjsDist: path.join(__dirname, './dist/db64.cjs'),

const createCJS = async () => {
try {
const data = await fs.readFile(paths.source, 'utf8')
const readmeSrc = await fs.readFile(paths.readmeSrc, 'utf8')
const insertCJSImport = data.replace(/export default db64/g, 'module.exports = db64')

@@ -33,3 +40,3 @@

console.info(`Created ${paths.esDist}`)
// ES Min

@@ -55,2 +62,10 @@ await fs.writeFile(paths.esMinDist, minifiedESData.code, 'utf8')

const stats = await fs.stat(paths.esMinDist)
// Readme
const fileSizeInKB = stats.size / 1024
const readmeWithSize = readmeSrc.replace(/{{ size }}/g, `${fileSizeInKB.toFixed(2)}KB`)
await fs.writeFile(paths.readmeRoot, readmeWithSize, 'utf8')
console.info(`Created ${paths.readmeRoot}`)
} catch (err) {

@@ -57,0 +72,0 @@ console.error('Error:', err)

2

package.json
{
"name": "db64",
"version": "0.7.6",
"version": "0.7.7",
"description": "A Practical IndexedDB API",

@@ -5,0 +5,0 @@ "main": "db64.js",

@@ -14,3 +14,3 @@ # db64

- No versioning
- Around 2kB minified
- 2.47KB minified

@@ -144,5 +144,8 @@ E.g.

### Contributors
Don't hesitate just contribute, it's a tiny library we will figure it out.
Don't hesitate just contribute, it's a tiny library we will figure it out.
If you want to edit `./README.md` edit `./src/_readme.md` which will update `./README.md` when `node create-distribution.js` is called.
This is to keep the minified size accurate.
---
MIT © Julien Etienne 2023
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc