1.1.2 • Published 8 years ago

zion-context v1.1.2

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

Zion-Context

API de context para aplicações front-end

Funções

Read

Executa o seed, lê e retorna o que está no cookie 'context' decodificado

//Void => Object
Context.read()

toQueryString

Lê e retorna o que está no cookie 'context' em formato de query string

//Void => String
Context.toQueryString()

writeJson

Escreve no cookie de context e retorna o cookie decodificado

//Object => Object
Context.writeJson({'chave1': 'valor1', 'chave2': 'valor2'});

write

Escreve no cookie de context e retorna o cookie decodificado

//String, (Numbers or Strings) => Object
Context.write('chave',  'valor');

seed

Preenche o cookie com informação inicial e retorna o cookie decodificado.

Atualmente pega o cookie b2wSid, b2wUid, b2wPid, b2wOpen, b2wDeviceType, b2wChannel e escreve no contexto

//Void => Object
Context.seed();

Comandos

  • Dev npm run dev
  • Distribuição npm run dist
  • Relase 0.0.X npm run release
  • Relase 0.X.0 npm run release:minor
  • Relase X.0.0 npm run release:major

Desenvolvimento

Você precisa rodar em node 4.4.x

Testes:

$ npm test

Dist:

$ npm run prepublish

Release:

$ npm run release
1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago